GET List accounts
{{baseUrl}}/accounts
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/accounts");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/accounts")
require "http/client"

url = "{{baseUrl}}/accounts"

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}}/accounts"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/accounts");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/accounts"

	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/accounts HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/accounts")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/accounts"))
    .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}}/accounts")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/accounts")
  .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}}/accounts');

xhr.send(data);
import axios from 'axios';

const options = {method: 'GET', url: '{{baseUrl}}/accounts'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/accounts';
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}}/accounts',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/accounts")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/accounts',
  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}}/accounts'};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/accounts');

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}}/accounts'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/accounts';
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}}/accounts"]
                                                       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}}/accounts" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/accounts",
  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}}/accounts');

echo $response->getBody();
setUrl('{{baseUrl}}/accounts');
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/accounts');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/accounts' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/accounts' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/accounts")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/accounts"

response = requests.get(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/accounts"

response <- VERB("GET", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/accounts")

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/accounts') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/accounts";

    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}}/accounts
http GET {{baseUrl}}/accounts
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/accounts
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/accounts")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": [
    {
      "id": 1,
      "email": "example-account@example.com",
      "plan_identifier": "teams-v1-monthly",
      "created_at": "2015-09-18T23:04:37Z",
      "updated_at": "2016-06-09T20:03:39Z"
    }
  ]
}
GET Analytics about DNS queries
{{baseUrl}}/:account/dns_analytics
QUERY PARAMS

account
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/dns_analytics");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/:account/dns_analytics")
require "http/client"

url = "{{baseUrl}}/:account/dns_analytics"

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}}/:account/dns_analytics"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/:account/dns_analytics");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/dns_analytics"

	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/:account/dns_analytics HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/:account/dns_analytics")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/dns_analytics"))
    .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}}/:account/dns_analytics")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/:account/dns_analytics")
  .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}}/:account/dns_analytics');

xhr.send(data);
import axios from 'axios';

const options = {method: 'GET', url: '{{baseUrl}}/:account/dns_analytics'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/dns_analytics';
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}}/:account/dns_analytics',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/:account/dns_analytics")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/:account/dns_analytics',
  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}}/:account/dns_analytics'};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/:account/dns_analytics');

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}}/:account/dns_analytics'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/dns_analytics';
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}}/:account/dns_analytics"]
                                                       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}}/:account/dns_analytics" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/dns_analytics",
  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}}/:account/dns_analytics');

echo $response->getBody();
setUrl('{{baseUrl}}/:account/dns_analytics');
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/:account/dns_analytics');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/:account/dns_analytics' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/dns_analytics' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/:account/dns_analytics")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/dns_analytics"

response = requests.get(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/dns_analytics"

response <- VERB("GET", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/:account/dns_analytics")

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/:account/dns_analytics') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:account/dns_analytics";

    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}}/:account/dns_analytics
http GET {{baseUrl}}/:account/dns_analytics
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/:account/dns_analytics
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/dns_analytics")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "query": {
    "sort": "date:asc,zone_name:asc",
    "groupings": "date,zone_name",
    "page": 1,
    "per_page": 1000
  },
  "pagination": {
    "current_page": 1,
    "per_page": 30,
    "total_entries": 2,
    "total_pages": 1
  }
}
GET List billing charges
{{baseUrl}}/:account/billing/charges
QUERY PARAMS

account
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/billing/charges");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/:account/billing/charges")
require "http/client"

url = "{{baseUrl}}/:account/billing/charges"

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}}/:account/billing/charges"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/:account/billing/charges");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/billing/charges"

	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/:account/billing/charges HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/:account/billing/charges")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/billing/charges"))
    .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}}/:account/billing/charges")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/:account/billing/charges")
  .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}}/:account/billing/charges');

xhr.send(data);
import axios from 'axios';

const options = {method: 'GET', url: '{{baseUrl}}/:account/billing/charges'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/billing/charges';
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}}/:account/billing/charges',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/:account/billing/charges")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/:account/billing/charges',
  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}}/:account/billing/charges'};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/:account/billing/charges');

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}}/:account/billing/charges'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/billing/charges';
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}}/:account/billing/charges"]
                                                       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}}/:account/billing/charges" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/billing/charges",
  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}}/:account/billing/charges');

echo $response->getBody();
setUrl('{{baseUrl}}/:account/billing/charges');
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/:account/billing/charges');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/:account/billing/charges' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/billing/charges' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/:account/billing/charges")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/billing/charges"

response = requests.get(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/billing/charges"

response <- VERB("GET", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/:account/billing/charges")

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/:account/billing/charges') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:account/billing/charges";

    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}}/:account/billing/charges
http GET {{baseUrl}}/:account/billing/charges
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/:account/billing/charges
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/billing/charges")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": [
    {
      "invoiced_at": "2017-03-03T13:49:58.000Z",
      "total_amount": "50.00",
      "balance_amount": "50.00",
      "reference": "20170303-0001",
      "state": "collected",
      "items": [
        {
          "description": "Auto Renew example.com",
          "amount": "50.00",
          "product_id": 153,
          "product_type": "domain-renewal",
          "product_reference": "example.com"
        }
      ]
    }
  ],
  "pagination": {
    "current_page": 1,
    "per_page": 30,
    "total_entries": 2,
    "total_pages": 1
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Authentication failed"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "quota exceeded"
}
POST Create a contact
{{baseUrl}}/:account/contacts
QUERY PARAMS

account
BODY json

{
  "label": "",
  "first_name": "",
  "last_name": "",
  "address1": "",
  "address2": "",
  "city": "",
  "state_province": "",
  "postal_code": "",
  "country": "",
  "email": "",
  "phone": "",
  "fax": "",
  "organization_name": "",
  "job_title": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/contacts");

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  \"label\": \"\",\n  \"first_name\": \"\",\n  \"last_name\": \"\",\n  \"address1\": \"\",\n  \"address2\": \"\",\n  \"city\": \"\",\n  \"state_province\": \"\",\n  \"postal_code\": \"\",\n  \"country\": \"\",\n  \"email\": \"\",\n  \"phone\": \"\",\n  \"fax\": \"\",\n  \"organization_name\": \"\",\n  \"job_title\": \"\"\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/:account/contacts" {:content-type :json
                                                              :form-params {:label ""
                                                                            :first_name ""
                                                                            :last_name ""
                                                                            :address1 ""
                                                                            :address2 ""
                                                                            :city ""
                                                                            :state_province ""
                                                                            :postal_code ""
                                                                            :country ""
                                                                            :email ""
                                                                            :phone ""
                                                                            :fax ""
                                                                            :organization_name ""
                                                                            :job_title ""}})
require "http/client"

url = "{{baseUrl}}/:account/contacts"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"label\": \"\",\n  \"first_name\": \"\",\n  \"last_name\": \"\",\n  \"address1\": \"\",\n  \"address2\": \"\",\n  \"city\": \"\",\n  \"state_province\": \"\",\n  \"postal_code\": \"\",\n  \"country\": \"\",\n  \"email\": \"\",\n  \"phone\": \"\",\n  \"fax\": \"\",\n  \"organization_name\": \"\",\n  \"job_title\": \"\"\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}}/:account/contacts"),
    Content = new StringContent("{\n  \"label\": \"\",\n  \"first_name\": \"\",\n  \"last_name\": \"\",\n  \"address1\": \"\",\n  \"address2\": \"\",\n  \"city\": \"\",\n  \"state_province\": \"\",\n  \"postal_code\": \"\",\n  \"country\": \"\",\n  \"email\": \"\",\n  \"phone\": \"\",\n  \"fax\": \"\",\n  \"organization_name\": \"\",\n  \"job_title\": \"\"\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}}/:account/contacts");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"label\": \"\",\n  \"first_name\": \"\",\n  \"last_name\": \"\",\n  \"address1\": \"\",\n  \"address2\": \"\",\n  \"city\": \"\",\n  \"state_province\": \"\",\n  \"postal_code\": \"\",\n  \"country\": \"\",\n  \"email\": \"\",\n  \"phone\": \"\",\n  \"fax\": \"\",\n  \"organization_name\": \"\",\n  \"job_title\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/contacts"

	payload := strings.NewReader("{\n  \"label\": \"\",\n  \"first_name\": \"\",\n  \"last_name\": \"\",\n  \"address1\": \"\",\n  \"address2\": \"\",\n  \"city\": \"\",\n  \"state_province\": \"\",\n  \"postal_code\": \"\",\n  \"country\": \"\",\n  \"email\": \"\",\n  \"phone\": \"\",\n  \"fax\": \"\",\n  \"organization_name\": \"\",\n  \"job_title\": \"\"\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/:account/contacts HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 257

{
  "label": "",
  "first_name": "",
  "last_name": "",
  "address1": "",
  "address2": "",
  "city": "",
  "state_province": "",
  "postal_code": "",
  "country": "",
  "email": "",
  "phone": "",
  "fax": "",
  "organization_name": "",
  "job_title": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/:account/contacts")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"label\": \"\",\n  \"first_name\": \"\",\n  \"last_name\": \"\",\n  \"address1\": \"\",\n  \"address2\": \"\",\n  \"city\": \"\",\n  \"state_province\": \"\",\n  \"postal_code\": \"\",\n  \"country\": \"\",\n  \"email\": \"\",\n  \"phone\": \"\",\n  \"fax\": \"\",\n  \"organization_name\": \"\",\n  \"job_title\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/contacts"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"label\": \"\",\n  \"first_name\": \"\",\n  \"last_name\": \"\",\n  \"address1\": \"\",\n  \"address2\": \"\",\n  \"city\": \"\",\n  \"state_province\": \"\",\n  \"postal_code\": \"\",\n  \"country\": \"\",\n  \"email\": \"\",\n  \"phone\": \"\",\n  \"fax\": \"\",\n  \"organization_name\": \"\",\n  \"job_title\": \"\"\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  \"label\": \"\",\n  \"first_name\": \"\",\n  \"last_name\": \"\",\n  \"address1\": \"\",\n  \"address2\": \"\",\n  \"city\": \"\",\n  \"state_province\": \"\",\n  \"postal_code\": \"\",\n  \"country\": \"\",\n  \"email\": \"\",\n  \"phone\": \"\",\n  \"fax\": \"\",\n  \"organization_name\": \"\",\n  \"job_title\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/:account/contacts")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/:account/contacts")
  .header("content-type", "application/json")
  .body("{\n  \"label\": \"\",\n  \"first_name\": \"\",\n  \"last_name\": \"\",\n  \"address1\": \"\",\n  \"address2\": \"\",\n  \"city\": \"\",\n  \"state_province\": \"\",\n  \"postal_code\": \"\",\n  \"country\": \"\",\n  \"email\": \"\",\n  \"phone\": \"\",\n  \"fax\": \"\",\n  \"organization_name\": \"\",\n  \"job_title\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  label: '',
  first_name: '',
  last_name: '',
  address1: '',
  address2: '',
  city: '',
  state_province: '',
  postal_code: '',
  country: '',
  email: '',
  phone: '',
  fax: '',
  organization_name: '',
  job_title: ''
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/:account/contacts');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/:account/contacts',
  headers: {'content-type': 'application/json'},
  data: {
    label: '',
    first_name: '',
    last_name: '',
    address1: '',
    address2: '',
    city: '',
    state_province: '',
    postal_code: '',
    country: '',
    email: '',
    phone: '',
    fax: '',
    organization_name: '',
    job_title: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/contacts';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"label":"","first_name":"","last_name":"","address1":"","address2":"","city":"","state_province":"","postal_code":"","country":"","email":"","phone":"","fax":"","organization_name":"","job_title":""}'
};

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}}/:account/contacts',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "label": "",\n  "first_name": "",\n  "last_name": "",\n  "address1": "",\n  "address2": "",\n  "city": "",\n  "state_province": "",\n  "postal_code": "",\n  "country": "",\n  "email": "",\n  "phone": "",\n  "fax": "",\n  "organization_name": "",\n  "job_title": ""\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"label\": \"\",\n  \"first_name\": \"\",\n  \"last_name\": \"\",\n  \"address1\": \"\",\n  \"address2\": \"\",\n  \"city\": \"\",\n  \"state_province\": \"\",\n  \"postal_code\": \"\",\n  \"country\": \"\",\n  \"email\": \"\",\n  \"phone\": \"\",\n  \"fax\": \"\",\n  \"organization_name\": \"\",\n  \"job_title\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/:account/contacts")
  .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/:account/contacts',
  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({
  label: '',
  first_name: '',
  last_name: '',
  address1: '',
  address2: '',
  city: '',
  state_province: '',
  postal_code: '',
  country: '',
  email: '',
  phone: '',
  fax: '',
  organization_name: '',
  job_title: ''
}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/:account/contacts',
  headers: {'content-type': 'application/json'},
  body: {
    label: '',
    first_name: '',
    last_name: '',
    address1: '',
    address2: '',
    city: '',
    state_province: '',
    postal_code: '',
    country: '',
    email: '',
    phone: '',
    fax: '',
    organization_name: '',
    job_title: ''
  },
  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}}/:account/contacts');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  label: '',
  first_name: '',
  last_name: '',
  address1: '',
  address2: '',
  city: '',
  state_province: '',
  postal_code: '',
  country: '',
  email: '',
  phone: '',
  fax: '',
  organization_name: '',
  job_title: ''
});

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}}/:account/contacts',
  headers: {'content-type': 'application/json'},
  data: {
    label: '',
    first_name: '',
    last_name: '',
    address1: '',
    address2: '',
    city: '',
    state_province: '',
    postal_code: '',
    country: '',
    email: '',
    phone: '',
    fax: '',
    organization_name: '',
    job_title: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/contacts';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"label":"","first_name":"","last_name":"","address1":"","address2":"","city":"","state_province":"","postal_code":"","country":"","email":"","phone":"","fax":"","organization_name":"","job_title":""}'
};

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 = @{ @"label": @"",
                              @"first_name": @"",
                              @"last_name": @"",
                              @"address1": @"",
                              @"address2": @"",
                              @"city": @"",
                              @"state_province": @"",
                              @"postal_code": @"",
                              @"country": @"",
                              @"email": @"",
                              @"phone": @"",
                              @"fax": @"",
                              @"organization_name": @"",
                              @"job_title": @"" };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/:account/contacts"]
                                                       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}}/:account/contacts" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"label\": \"\",\n  \"first_name\": \"\",\n  \"last_name\": \"\",\n  \"address1\": \"\",\n  \"address2\": \"\",\n  \"city\": \"\",\n  \"state_province\": \"\",\n  \"postal_code\": \"\",\n  \"country\": \"\",\n  \"email\": \"\",\n  \"phone\": \"\",\n  \"fax\": \"\",\n  \"organization_name\": \"\",\n  \"job_title\": \"\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/contacts",
  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([
    'label' => '',
    'first_name' => '',
    'last_name' => '',
    'address1' => '',
    'address2' => '',
    'city' => '',
    'state_province' => '',
    'postal_code' => '',
    'country' => '',
    'email' => '',
    'phone' => '',
    'fax' => '',
    'organization_name' => '',
    'job_title' => ''
  ]),
  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}}/:account/contacts', [
  'body' => '{
  "label": "",
  "first_name": "",
  "last_name": "",
  "address1": "",
  "address2": "",
  "city": "",
  "state_province": "",
  "postal_code": "",
  "country": "",
  "email": "",
  "phone": "",
  "fax": "",
  "organization_name": "",
  "job_title": ""
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/:account/contacts');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'label' => '',
  'first_name' => '',
  'last_name' => '',
  'address1' => '',
  'address2' => '',
  'city' => '',
  'state_province' => '',
  'postal_code' => '',
  'country' => '',
  'email' => '',
  'phone' => '',
  'fax' => '',
  'organization_name' => '',
  'job_title' => ''
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'label' => '',
  'first_name' => '',
  'last_name' => '',
  'address1' => '',
  'address2' => '',
  'city' => '',
  'state_province' => '',
  'postal_code' => '',
  'country' => '',
  'email' => '',
  'phone' => '',
  'fax' => '',
  'organization_name' => '',
  'job_title' => ''
]));
$request->setRequestUrl('{{baseUrl}}/:account/contacts');
$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}}/:account/contacts' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "label": "",
  "first_name": "",
  "last_name": "",
  "address1": "",
  "address2": "",
  "city": "",
  "state_province": "",
  "postal_code": "",
  "country": "",
  "email": "",
  "phone": "",
  "fax": "",
  "organization_name": "",
  "job_title": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/contacts' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "label": "",
  "first_name": "",
  "last_name": "",
  "address1": "",
  "address2": "",
  "city": "",
  "state_province": "",
  "postal_code": "",
  "country": "",
  "email": "",
  "phone": "",
  "fax": "",
  "organization_name": "",
  "job_title": ""
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"label\": \"\",\n  \"first_name\": \"\",\n  \"last_name\": \"\",\n  \"address1\": \"\",\n  \"address2\": \"\",\n  \"city\": \"\",\n  \"state_province\": \"\",\n  \"postal_code\": \"\",\n  \"country\": \"\",\n  \"email\": \"\",\n  \"phone\": \"\",\n  \"fax\": \"\",\n  \"organization_name\": \"\",\n  \"job_title\": \"\"\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/:account/contacts", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/contacts"

payload = {
    "label": "",
    "first_name": "",
    "last_name": "",
    "address1": "",
    "address2": "",
    "city": "",
    "state_province": "",
    "postal_code": "",
    "country": "",
    "email": "",
    "phone": "",
    "fax": "",
    "organization_name": "",
    "job_title": ""
}
headers = {"content-type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/contacts"

payload <- "{\n  \"label\": \"\",\n  \"first_name\": \"\",\n  \"last_name\": \"\",\n  \"address1\": \"\",\n  \"address2\": \"\",\n  \"city\": \"\",\n  \"state_province\": \"\",\n  \"postal_code\": \"\",\n  \"country\": \"\",\n  \"email\": \"\",\n  \"phone\": \"\",\n  \"fax\": \"\",\n  \"organization_name\": \"\",\n  \"job_title\": \"\"\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}}/:account/contacts")

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  \"label\": \"\",\n  \"first_name\": \"\",\n  \"last_name\": \"\",\n  \"address1\": \"\",\n  \"address2\": \"\",\n  \"city\": \"\",\n  \"state_province\": \"\",\n  \"postal_code\": \"\",\n  \"country\": \"\",\n  \"email\": \"\",\n  \"phone\": \"\",\n  \"fax\": \"\",\n  \"organization_name\": \"\",\n  \"job_title\": \"\"\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/:account/contacts') do |req|
  req.body = "{\n  \"label\": \"\",\n  \"first_name\": \"\",\n  \"last_name\": \"\",\n  \"address1\": \"\",\n  \"address2\": \"\",\n  \"city\": \"\",\n  \"state_province\": \"\",\n  \"postal_code\": \"\",\n  \"country\": \"\",\n  \"email\": \"\",\n  \"phone\": \"\",\n  \"fax\": \"\",\n  \"organization_name\": \"\",\n  \"job_title\": \"\"\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:account/contacts";

    let payload = json!({
        "label": "",
        "first_name": "",
        "last_name": "",
        "address1": "",
        "address2": "",
        "city": "",
        "state_province": "",
        "postal_code": "",
        "country": "",
        "email": "",
        "phone": "",
        "fax": "",
        "organization_name": "",
        "job_title": ""
    });

    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}}/:account/contacts \
  --header 'content-type: application/json' \
  --data '{
  "label": "",
  "first_name": "",
  "last_name": "",
  "address1": "",
  "address2": "",
  "city": "",
  "state_province": "",
  "postal_code": "",
  "country": "",
  "email": "",
  "phone": "",
  "fax": "",
  "organization_name": "",
  "job_title": ""
}'
echo '{
  "label": "",
  "first_name": "",
  "last_name": "",
  "address1": "",
  "address2": "",
  "city": "",
  "state_province": "",
  "postal_code": "",
  "country": "",
  "email": "",
  "phone": "",
  "fax": "",
  "organization_name": "",
  "job_title": ""
}' |  \
  http POST {{baseUrl}}/:account/contacts \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "label": "",\n  "first_name": "",\n  "last_name": "",\n  "address1": "",\n  "address2": "",\n  "city": "",\n  "state_province": "",\n  "postal_code": "",\n  "country": "",\n  "email": "",\n  "phone": "",\n  "fax": "",\n  "organization_name": "",\n  "job_title": ""\n}' \
  --output-document \
  - {{baseUrl}}/:account/contacts
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [
  "label": "",
  "first_name": "",
  "last_name": "",
  "address1": "",
  "address2": "",
  "city": "",
  "state_province": "",
  "postal_code": "",
  "country": "",
  "email": "",
  "phone": "",
  "fax": "",
  "organization_name": "",
  "job_title": ""
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/contacts")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "id": 1,
    "account_id": 1010,
    "label": "Default",
    "first_name": "First",
    "last_name": "User",
    "organization_name": "Awesome Company",
    "job_title": "CEO",
    "address1": "Italian Street, 10",
    "address2": "",
    "city": "Roma",
    "state_province": "RM",
    "postal_code": "00100",
    "country": "IT",
    "phone": "+1.8001234567",
    "fax": "+1.8011234567",
    "email": "first@example.com",
    "created_at": "2013-11-08T17:23:15Z",
    "updated_at": "2015-01-08T21:30:50Z"
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "string",
  "errors": {
    "property1": {
      "field": "string",
      "errors": [
        "string"
      ]
    },
    "property2": {
      "field": "string",
      "errors": [
        "string"
      ]
    }
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Validation failed",
  "errors": {
    "address1": [
      "can't be blank"
    ],
    "city": [
      "can't be blank"
    ],
    "country": [
      "can't be blank"
    ],
    "email": [
      "can't be blank",
      "is an invalid email address"
    ],
    "first_name": [
      "can't be blank"
    ],
    "last_name": [
      "can't be blank"
    ],
    "phone": [
      "can't be blank",
      "is probably not a phone number"
    ],
    "postal_code": [
      "can't be blank"
    ],
    "state_province": [
      "can't be blank"
    ]
  }
}
DELETE Delete a contact
{{baseUrl}}/:account/contacts/:contact
QUERY PARAMS

account
contact
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/contacts/:contact");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/delete "{{baseUrl}}/:account/contacts/:contact")
require "http/client"

url = "{{baseUrl}}/:account/contacts/:contact"

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}}/:account/contacts/:contact"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/:account/contacts/:contact");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/contacts/:contact"

	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/:account/contacts/:contact HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/:account/contacts/:contact")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/contacts/:contact"))
    .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}}/:account/contacts/:contact")
  .delete(null)
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/:account/contacts/:contact")
  .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}}/:account/contacts/:contact');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'DELETE',
  url: '{{baseUrl}}/:account/contacts/:contact'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/contacts/:contact';
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}}/:account/contacts/:contact',
  method: 'DELETE',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/:account/contacts/:contact")
  .delete(null)
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'DELETE',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/:account/contacts/:contact',
  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}}/:account/contacts/:contact'
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('DELETE', '{{baseUrl}}/:account/contacts/:contact');

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}}/:account/contacts/:contact'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/contacts/:contact';
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}}/:account/contacts/:contact"]
                                                       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}}/:account/contacts/:contact" in

Client.call `DELETE uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/contacts/:contact",
  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}}/:account/contacts/:contact');

echo $response->getBody();
setUrl('{{baseUrl}}/:account/contacts/:contact');
$request->setMethod(HTTP_METH_DELETE);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/:account/contacts/:contact');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/:account/contacts/:contact' -Method DELETE 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/contacts/:contact' -Method DELETE 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("DELETE", "/baseUrl/:account/contacts/:contact")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/contacts/:contact"

response = requests.delete(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/contacts/:contact"

response <- VERB("DELETE", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/:account/contacts/:contact")

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/:account/contacts/:contact') do |req|
end

puts response.status
puts response.body
use std::str::FromStr;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:account/contacts/:contact";

    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}}/:account/contacts/:contact
http DELETE {{baseUrl}}/:account/contacts/:contact
wget --quiet \
  --method DELETE \
  --output-document \
  - {{baseUrl}}/:account/contacts/:contact
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/contacts/:contact")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Not Found"
}
GET List contacts
{{baseUrl}}/:account/contacts
QUERY PARAMS

account
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/contacts");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/:account/contacts")
require "http/client"

url = "{{baseUrl}}/:account/contacts"

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}}/:account/contacts"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/:account/contacts");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/contacts"

	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/:account/contacts HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/:account/contacts")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/contacts"))
    .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}}/:account/contacts")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/:account/contacts")
  .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}}/:account/contacts');

xhr.send(data);
import axios from 'axios';

const options = {method: 'GET', url: '{{baseUrl}}/:account/contacts'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/contacts';
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}}/:account/contacts',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/:account/contacts")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/:account/contacts',
  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}}/:account/contacts'};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/:account/contacts');

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}}/:account/contacts'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/contacts';
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}}/:account/contacts"]
                                                       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}}/:account/contacts" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/contacts",
  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}}/:account/contacts');

echo $response->getBody();
setUrl('{{baseUrl}}/:account/contacts');
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/:account/contacts');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/:account/contacts' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/contacts' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/:account/contacts")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/contacts"

response = requests.get(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/contacts"

response <- VERB("GET", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/:account/contacts")

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/:account/contacts') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:account/contacts";

    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}}/:account/contacts
http GET {{baseUrl}}/:account/contacts
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/:account/contacts
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/contacts")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": [
    {
      "id": 1,
      "account_id": 1010,
      "label": "Default",
      "first_name": "First",
      "last_name": "User",
      "organization_name": "Awesome Company",
      "job_title": "CEO",
      "address1": "Italian Street, 10",
      "address2": "",
      "city": "Roma",
      "state_province": "RM",
      "postal_code": "00100",
      "country": "IT",
      "phone": "+1.8001234567",
      "fax": "+1.8011234567",
      "email": "first@example.com",
      "created_at": "2013-11-08T17:23:15Z",
      "updated_at": "2015-01-08T21:30:50Z"
    }
  ],
  "pagination": {
    "current_page": 1,
    "per_page": 30,
    "total_entries": 2,
    "total_pages": 1
  }
}
GET Retrieve a contact
{{baseUrl}}/:account/contacts/:contact
QUERY PARAMS

account
contact
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/contacts/:contact");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/:account/contacts/:contact")
require "http/client"

url = "{{baseUrl}}/:account/contacts/:contact"

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}}/:account/contacts/:contact"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/:account/contacts/:contact");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/contacts/:contact"

	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/:account/contacts/:contact HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/:account/contacts/:contact")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/contacts/:contact"))
    .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}}/:account/contacts/:contact")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/:account/contacts/:contact")
  .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}}/:account/contacts/:contact');

xhr.send(data);
import axios from 'axios';

const options = {method: 'GET', url: '{{baseUrl}}/:account/contacts/:contact'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/contacts/:contact';
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}}/:account/contacts/:contact',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/:account/contacts/:contact")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/:account/contacts/:contact',
  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}}/:account/contacts/:contact'};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/:account/contacts/:contact');

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}}/:account/contacts/:contact'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/contacts/:contact';
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}}/:account/contacts/:contact"]
                                                       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}}/:account/contacts/:contact" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/contacts/:contact",
  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}}/:account/contacts/:contact');

echo $response->getBody();
setUrl('{{baseUrl}}/:account/contacts/:contact');
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/:account/contacts/:contact');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/:account/contacts/:contact' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/contacts/:contact' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/:account/contacts/:contact")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/contacts/:contact"

response = requests.get(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/contacts/:contact"

response <- VERB("GET", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/:account/contacts/:contact")

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/:account/contacts/:contact') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:account/contacts/:contact";

    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}}/:account/contacts/:contact
http GET {{baseUrl}}/:account/contacts/:contact
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/:account/contacts/:contact
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/contacts/:contact")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "id": 1,
    "account_id": 1010,
    "label": "Default",
    "first_name": "First",
    "last_name": "User",
    "organization_name": "Awesome Company",
    "job_title": "CEO",
    "address1": "Italian Street, 10",
    "address2": "",
    "city": "Roma",
    "state_province": "RM",
    "postal_code": "00100",
    "country": "IT",
    "phone": "+1.8001234567",
    "fax": "+1.8011234567",
    "email": "first@example.com",
    "created_at": "2013-11-08T17:23:15Z",
    "updated_at": "2015-01-08T21:30:50Z"
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Not Found"
}
PATCH Update a contact
{{baseUrl}}/:account/contacts/:contact
QUERY PARAMS

account
contact
BODY json

{
  "label": "",
  "first_name": "",
  "last_name": "",
  "address1": "",
  "address2": "",
  "city": "",
  "state_province": "",
  "postal_code": "",
  "country": "",
  "email": "",
  "phone": "",
  "fax": "",
  "organization_name": "",
  "job_title": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/contacts/:contact");

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  \"label\": \"\",\n  \"first_name\": \"\",\n  \"last_name\": \"\",\n  \"address1\": \"\",\n  \"address2\": \"\",\n  \"city\": \"\",\n  \"state_province\": \"\",\n  \"postal_code\": \"\",\n  \"country\": \"\",\n  \"email\": \"\",\n  \"phone\": \"\",\n  \"fax\": \"\",\n  \"organization_name\": \"\",\n  \"job_title\": \"\"\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/patch "{{baseUrl}}/:account/contacts/:contact" {:content-type :json
                                                                        :form-params {:label ""
                                                                                      :first_name ""
                                                                                      :last_name ""
                                                                                      :address1 ""
                                                                                      :address2 ""
                                                                                      :city ""
                                                                                      :state_province ""
                                                                                      :postal_code ""
                                                                                      :country ""
                                                                                      :email ""
                                                                                      :phone ""
                                                                                      :fax ""
                                                                                      :organization_name ""
                                                                                      :job_title ""}})
require "http/client"

url = "{{baseUrl}}/:account/contacts/:contact"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"label\": \"\",\n  \"first_name\": \"\",\n  \"last_name\": \"\",\n  \"address1\": \"\",\n  \"address2\": \"\",\n  \"city\": \"\",\n  \"state_province\": \"\",\n  \"postal_code\": \"\",\n  \"country\": \"\",\n  \"email\": \"\",\n  \"phone\": \"\",\n  \"fax\": \"\",\n  \"organization_name\": \"\",\n  \"job_title\": \"\"\n}"

response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Patch,
    RequestUri = new Uri("{{baseUrl}}/:account/contacts/:contact"),
    Content = new StringContent("{\n  \"label\": \"\",\n  \"first_name\": \"\",\n  \"last_name\": \"\",\n  \"address1\": \"\",\n  \"address2\": \"\",\n  \"city\": \"\",\n  \"state_province\": \"\",\n  \"postal_code\": \"\",\n  \"country\": \"\",\n  \"email\": \"\",\n  \"phone\": \"\",\n  \"fax\": \"\",\n  \"organization_name\": \"\",\n  \"job_title\": \"\"\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}}/:account/contacts/:contact");
var request = new RestRequest("", Method.Patch);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"label\": \"\",\n  \"first_name\": \"\",\n  \"last_name\": \"\",\n  \"address1\": \"\",\n  \"address2\": \"\",\n  \"city\": \"\",\n  \"state_province\": \"\",\n  \"postal_code\": \"\",\n  \"country\": \"\",\n  \"email\": \"\",\n  \"phone\": \"\",\n  \"fax\": \"\",\n  \"organization_name\": \"\",\n  \"job_title\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/contacts/:contact"

	payload := strings.NewReader("{\n  \"label\": \"\",\n  \"first_name\": \"\",\n  \"last_name\": \"\",\n  \"address1\": \"\",\n  \"address2\": \"\",\n  \"city\": \"\",\n  \"state_province\": \"\",\n  \"postal_code\": \"\",\n  \"country\": \"\",\n  \"email\": \"\",\n  \"phone\": \"\",\n  \"fax\": \"\",\n  \"organization_name\": \"\",\n  \"job_title\": \"\"\n}")

	req, _ := http.NewRequest("PATCH", 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))

}
PATCH /baseUrl/:account/contacts/:contact HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 257

{
  "label": "",
  "first_name": "",
  "last_name": "",
  "address1": "",
  "address2": "",
  "city": "",
  "state_province": "",
  "postal_code": "",
  "country": "",
  "email": "",
  "phone": "",
  "fax": "",
  "organization_name": "",
  "job_title": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/:account/contacts/:contact")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"label\": \"\",\n  \"first_name\": \"\",\n  \"last_name\": \"\",\n  \"address1\": \"\",\n  \"address2\": \"\",\n  \"city\": \"\",\n  \"state_province\": \"\",\n  \"postal_code\": \"\",\n  \"country\": \"\",\n  \"email\": \"\",\n  \"phone\": \"\",\n  \"fax\": \"\",\n  \"organization_name\": \"\",\n  \"job_title\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/contacts/:contact"))
    .header("content-type", "application/json")
    .method("PATCH", HttpRequest.BodyPublishers.ofString("{\n  \"label\": \"\",\n  \"first_name\": \"\",\n  \"last_name\": \"\",\n  \"address1\": \"\",\n  \"address2\": \"\",\n  \"city\": \"\",\n  \"state_province\": \"\",\n  \"postal_code\": \"\",\n  \"country\": \"\",\n  \"email\": \"\",\n  \"phone\": \"\",\n  \"fax\": \"\",\n  \"organization_name\": \"\",\n  \"job_title\": \"\"\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  \"label\": \"\",\n  \"first_name\": \"\",\n  \"last_name\": \"\",\n  \"address1\": \"\",\n  \"address2\": \"\",\n  \"city\": \"\",\n  \"state_province\": \"\",\n  \"postal_code\": \"\",\n  \"country\": \"\",\n  \"email\": \"\",\n  \"phone\": \"\",\n  \"fax\": \"\",\n  \"organization_name\": \"\",\n  \"job_title\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/:account/contacts/:contact")
  .patch(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/:account/contacts/:contact")
  .header("content-type", "application/json")
  .body("{\n  \"label\": \"\",\n  \"first_name\": \"\",\n  \"last_name\": \"\",\n  \"address1\": \"\",\n  \"address2\": \"\",\n  \"city\": \"\",\n  \"state_province\": \"\",\n  \"postal_code\": \"\",\n  \"country\": \"\",\n  \"email\": \"\",\n  \"phone\": \"\",\n  \"fax\": \"\",\n  \"organization_name\": \"\",\n  \"job_title\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  label: '',
  first_name: '',
  last_name: '',
  address1: '',
  address2: '',
  city: '',
  state_province: '',
  postal_code: '',
  country: '',
  email: '',
  phone: '',
  fax: '',
  organization_name: '',
  job_title: ''
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('PATCH', '{{baseUrl}}/:account/contacts/:contact');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'PATCH',
  url: '{{baseUrl}}/:account/contacts/:contact',
  headers: {'content-type': 'application/json'},
  data: {
    label: '',
    first_name: '',
    last_name: '',
    address1: '',
    address2: '',
    city: '',
    state_province: '',
    postal_code: '',
    country: '',
    email: '',
    phone: '',
    fax: '',
    organization_name: '',
    job_title: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/contacts/:contact';
const options = {
  method: 'PATCH',
  headers: {'content-type': 'application/json'},
  body: '{"label":"","first_name":"","last_name":"","address1":"","address2":"","city":"","state_province":"","postal_code":"","country":"","email":"","phone":"","fax":"","organization_name":"","job_title":""}'
};

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}}/:account/contacts/:contact',
  method: 'PATCH',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "label": "",\n  "first_name": "",\n  "last_name": "",\n  "address1": "",\n  "address2": "",\n  "city": "",\n  "state_province": "",\n  "postal_code": "",\n  "country": "",\n  "email": "",\n  "phone": "",\n  "fax": "",\n  "organization_name": "",\n  "job_title": ""\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"label\": \"\",\n  \"first_name\": \"\",\n  \"last_name\": \"\",\n  \"address1\": \"\",\n  \"address2\": \"\",\n  \"city\": \"\",\n  \"state_province\": \"\",\n  \"postal_code\": \"\",\n  \"country\": \"\",\n  \"email\": \"\",\n  \"phone\": \"\",\n  \"fax\": \"\",\n  \"organization_name\": \"\",\n  \"job_title\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/:account/contacts/:contact")
  .patch(body)
  .addHeader("content-type", "application/json")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'PATCH',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/:account/contacts/:contact',
  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({
  label: '',
  first_name: '',
  last_name: '',
  address1: '',
  address2: '',
  city: '',
  state_province: '',
  postal_code: '',
  country: '',
  email: '',
  phone: '',
  fax: '',
  organization_name: '',
  job_title: ''
}));
req.end();
const request = require('request');

const options = {
  method: 'PATCH',
  url: '{{baseUrl}}/:account/contacts/:contact',
  headers: {'content-type': 'application/json'},
  body: {
    label: '',
    first_name: '',
    last_name: '',
    address1: '',
    address2: '',
    city: '',
    state_province: '',
    postal_code: '',
    country: '',
    email: '',
    phone: '',
    fax: '',
    organization_name: '',
    job_title: ''
  },
  json: true
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('PATCH', '{{baseUrl}}/:account/contacts/:contact');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  label: '',
  first_name: '',
  last_name: '',
  address1: '',
  address2: '',
  city: '',
  state_province: '',
  postal_code: '',
  country: '',
  email: '',
  phone: '',
  fax: '',
  organization_name: '',
  job_title: ''
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'PATCH',
  url: '{{baseUrl}}/:account/contacts/:contact',
  headers: {'content-type': 'application/json'},
  data: {
    label: '',
    first_name: '',
    last_name: '',
    address1: '',
    address2: '',
    city: '',
    state_province: '',
    postal_code: '',
    country: '',
    email: '',
    phone: '',
    fax: '',
    organization_name: '',
    job_title: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/contacts/:contact';
const options = {
  method: 'PATCH',
  headers: {'content-type': 'application/json'},
  body: '{"label":"","first_name":"","last_name":"","address1":"","address2":"","city":"","state_province":"","postal_code":"","country":"","email":"","phone":"","fax":"","organization_name":"","job_title":""}'
};

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 = @{ @"label": @"",
                              @"first_name": @"",
                              @"last_name": @"",
                              @"address1": @"",
                              @"address2": @"",
                              @"city": @"",
                              @"state_province": @"",
                              @"postal_code": @"",
                              @"country": @"",
                              @"email": @"",
                              @"phone": @"",
                              @"fax": @"",
                              @"organization_name": @"",
                              @"job_title": @"" };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/:account/contacts/:contact"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[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}}/:account/contacts/:contact" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"label\": \"\",\n  \"first_name\": \"\",\n  \"last_name\": \"\",\n  \"address1\": \"\",\n  \"address2\": \"\",\n  \"city\": \"\",\n  \"state_province\": \"\",\n  \"postal_code\": \"\",\n  \"country\": \"\",\n  \"email\": \"\",\n  \"phone\": \"\",\n  \"fax\": \"\",\n  \"organization_name\": \"\",\n  \"job_title\": \"\"\n}" in

Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/contacts/:contact",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PATCH",
  CURLOPT_POSTFIELDS => json_encode([
    'label' => '',
    'first_name' => '',
    'last_name' => '',
    'address1' => '',
    'address2' => '',
    'city' => '',
    'state_province' => '',
    'postal_code' => '',
    'country' => '',
    'email' => '',
    'phone' => '',
    'fax' => '',
    'organization_name' => '',
    'job_title' => ''
  ]),
  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('PATCH', '{{baseUrl}}/:account/contacts/:contact', [
  'body' => '{
  "label": "",
  "first_name": "",
  "last_name": "",
  "address1": "",
  "address2": "",
  "city": "",
  "state_province": "",
  "postal_code": "",
  "country": "",
  "email": "",
  "phone": "",
  "fax": "",
  "organization_name": "",
  "job_title": ""
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/:account/contacts/:contact');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'label' => '',
  'first_name' => '',
  'last_name' => '',
  'address1' => '',
  'address2' => '',
  'city' => '',
  'state_province' => '',
  'postal_code' => '',
  'country' => '',
  'email' => '',
  'phone' => '',
  'fax' => '',
  'organization_name' => '',
  'job_title' => ''
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'label' => '',
  'first_name' => '',
  'last_name' => '',
  'address1' => '',
  'address2' => '',
  'city' => '',
  'state_province' => '',
  'postal_code' => '',
  'country' => '',
  'email' => '',
  'phone' => '',
  'fax' => '',
  'organization_name' => '',
  'job_title' => ''
]));
$request->setRequestUrl('{{baseUrl}}/:account/contacts/:contact');
$request->setRequestMethod('PATCH');
$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}}/:account/contacts/:contact' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
  "label": "",
  "first_name": "",
  "last_name": "",
  "address1": "",
  "address2": "",
  "city": "",
  "state_province": "",
  "postal_code": "",
  "country": "",
  "email": "",
  "phone": "",
  "fax": "",
  "organization_name": "",
  "job_title": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/contacts/:contact' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
  "label": "",
  "first_name": "",
  "last_name": "",
  "address1": "",
  "address2": "",
  "city": "",
  "state_province": "",
  "postal_code": "",
  "country": "",
  "email": "",
  "phone": "",
  "fax": "",
  "organization_name": "",
  "job_title": ""
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"label\": \"\",\n  \"first_name\": \"\",\n  \"last_name\": \"\",\n  \"address1\": \"\",\n  \"address2\": \"\",\n  \"city\": \"\",\n  \"state_province\": \"\",\n  \"postal_code\": \"\",\n  \"country\": \"\",\n  \"email\": \"\",\n  \"phone\": \"\",\n  \"fax\": \"\",\n  \"organization_name\": \"\",\n  \"job_title\": \"\"\n}"

headers = { 'content-type': "application/json" }

conn.request("PATCH", "/baseUrl/:account/contacts/:contact", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/contacts/:contact"

payload = {
    "label": "",
    "first_name": "",
    "last_name": "",
    "address1": "",
    "address2": "",
    "city": "",
    "state_province": "",
    "postal_code": "",
    "country": "",
    "email": "",
    "phone": "",
    "fax": "",
    "organization_name": "",
    "job_title": ""
}
headers = {"content-type": "application/json"}

response = requests.patch(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/contacts/:contact"

payload <- "{\n  \"label\": \"\",\n  \"first_name\": \"\",\n  \"last_name\": \"\",\n  \"address1\": \"\",\n  \"address2\": \"\",\n  \"city\": \"\",\n  \"state_province\": \"\",\n  \"postal_code\": \"\",\n  \"country\": \"\",\n  \"email\": \"\",\n  \"phone\": \"\",\n  \"fax\": \"\",\n  \"organization_name\": \"\",\n  \"job_title\": \"\"\n}"

encode <- "json"

response <- VERB("PATCH", url, body = payload, content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/:account/contacts/:contact")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["content-type"] = 'application/json'
request.body = "{\n  \"label\": \"\",\n  \"first_name\": \"\",\n  \"last_name\": \"\",\n  \"address1\": \"\",\n  \"address2\": \"\",\n  \"city\": \"\",\n  \"state_province\": \"\",\n  \"postal_code\": \"\",\n  \"country\": \"\",\n  \"email\": \"\",\n  \"phone\": \"\",\n  \"fax\": \"\",\n  \"organization_name\": \"\",\n  \"job_title\": \"\"\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.patch('/baseUrl/:account/contacts/:contact') do |req|
  req.body = "{\n  \"label\": \"\",\n  \"first_name\": \"\",\n  \"last_name\": \"\",\n  \"address1\": \"\",\n  \"address2\": \"\",\n  \"city\": \"\",\n  \"state_province\": \"\",\n  \"postal_code\": \"\",\n  \"country\": \"\",\n  \"email\": \"\",\n  \"phone\": \"\",\n  \"fax\": \"\",\n  \"organization_name\": \"\",\n  \"job_title\": \"\"\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}}/:account/contacts/:contact";

    let payload = json!({
        "label": "",
        "first_name": "",
        "last_name": "",
        "address1": "",
        "address2": "",
        "city": "",
        "state_province": "",
        "postal_code": "",
        "country": "",
        "email": "",
        "phone": "",
        "fax": "",
        "organization_name": "",
        "job_title": ""
    });

    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("PATCH").unwrap(), url)
        .headers(headers)
        .json(&payload)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request PATCH \
  --url {{baseUrl}}/:account/contacts/:contact \
  --header 'content-type: application/json' \
  --data '{
  "label": "",
  "first_name": "",
  "last_name": "",
  "address1": "",
  "address2": "",
  "city": "",
  "state_province": "",
  "postal_code": "",
  "country": "",
  "email": "",
  "phone": "",
  "fax": "",
  "organization_name": "",
  "job_title": ""
}'
echo '{
  "label": "",
  "first_name": "",
  "last_name": "",
  "address1": "",
  "address2": "",
  "city": "",
  "state_province": "",
  "postal_code": "",
  "country": "",
  "email": "",
  "phone": "",
  "fax": "",
  "organization_name": "",
  "job_title": ""
}' |  \
  http PATCH {{baseUrl}}/:account/contacts/:contact \
  content-type:application/json
wget --quiet \
  --method PATCH \
  --header 'content-type: application/json' \
  --body-data '{\n  "label": "",\n  "first_name": "",\n  "last_name": "",\n  "address1": "",\n  "address2": "",\n  "city": "",\n  "state_province": "",\n  "postal_code": "",\n  "country": "",\n  "email": "",\n  "phone": "",\n  "fax": "",\n  "organization_name": "",\n  "job_title": ""\n}' \
  --output-document \
  - {{baseUrl}}/:account/contacts/:contact
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [
  "label": "",
  "first_name": "",
  "last_name": "",
  "address1": "",
  "address2": "",
  "city": "",
  "state_province": "",
  "postal_code": "",
  "country": "",
  "email": "",
  "phone": "",
  "fax": "",
  "organization_name": "",
  "job_title": ""
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/contacts/:contact")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "id": 1,
    "account_id": 1010,
    "label": "Default",
    "first_name": "First",
    "last_name": "User",
    "organization_name": "Awesome Company",
    "job_title": "CEO",
    "address1": "Italian Street, 10",
    "address2": "",
    "city": "Roma",
    "state_province": "RM",
    "postal_code": "00100",
    "country": "IT",
    "phone": "+1.8001234567",
    "fax": "+1.8011234567",
    "email": "first@example.com",
    "created_at": "2013-11-08T17:23:15Z",
    "updated_at": "2015-01-08T21:30:50Z"
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "string",
  "errors": {
    "property1": {
      "field": "string",
      "errors": [
        "string"
      ]
    },
    "property2": {
      "field": "string",
      "errors": [
        "string"
      ]
    }
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Validation failed",
  "errors": {
    "address1": [
      "can't be blank"
    ],
    "city": [
      "can't be blank"
    ],
    "country": [
      "can't be blank"
    ],
    "email": [
      "can't be blank",
      "is an invalid email address"
    ],
    "first_name": [
      "can't be blank"
    ],
    "last_name": [
      "can't be blank"
    ],
    "phone": [
      "can't be blank",
      "is probably not a phone number"
    ],
    "postal_code": [
      "can't be blank"
    ],
    "state_province": [
      "can't be blank"
    ]
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Not Found"
}
GET Download a certificate
{{baseUrl}}/:account/domains/:domain/certificates/:certificate/download
QUERY PARAMS

account
domain
certificate
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/domains/:domain/certificates/:certificate/download");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/:account/domains/:domain/certificates/:certificate/download")
require "http/client"

url = "{{baseUrl}}/:account/domains/:domain/certificates/:certificate/download"

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}}/:account/domains/:domain/certificates/:certificate/download"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/:account/domains/:domain/certificates/:certificate/download");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/domains/:domain/certificates/:certificate/download"

	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/:account/domains/:domain/certificates/:certificate/download HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/:account/domains/:domain/certificates/:certificate/download")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/domains/:domain/certificates/:certificate/download"))
    .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}}/:account/domains/:domain/certificates/:certificate/download")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/:account/domains/:domain/certificates/:certificate/download")
  .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}}/:account/domains/:domain/certificates/:certificate/download');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'GET',
  url: '{{baseUrl}}/:account/domains/:domain/certificates/:certificate/download'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/domains/:domain/certificates/:certificate/download';
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}}/:account/domains/:domain/certificates/:certificate/download',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/:account/domains/:domain/certificates/:certificate/download")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/:account/domains/:domain/certificates/:certificate/download',
  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}}/:account/domains/:domain/certificates/:certificate/download'
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/:account/domains/:domain/certificates/:certificate/download');

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}}/:account/domains/:domain/certificates/:certificate/download'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/domains/:domain/certificates/:certificate/download';
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}}/:account/domains/:domain/certificates/:certificate/download"]
                                                       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}}/:account/domains/:domain/certificates/:certificate/download" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/domains/:domain/certificates/:certificate/download",
  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}}/:account/domains/:domain/certificates/:certificate/download');

echo $response->getBody();
setUrl('{{baseUrl}}/:account/domains/:domain/certificates/:certificate/download');
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/:account/domains/:domain/certificates/:certificate/download');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/:account/domains/:domain/certificates/:certificate/download' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/domains/:domain/certificates/:certificate/download' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/:account/domains/:domain/certificates/:certificate/download")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/domains/:domain/certificates/:certificate/download"

response = requests.get(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/domains/:domain/certificates/:certificate/download"

response <- VERB("GET", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/:account/domains/:domain/certificates/:certificate/download")

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/:account/domains/:domain/certificates/:certificate/download') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:account/domains/:domain/certificates/:certificate/download";

    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}}/:account/domains/:domain/certificates/:certificate/download
http GET {{baseUrl}}/:account/domains/:domain/certificates/:certificate/download
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/:account/domains/:domain/certificates/:certificate/download
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/domains/:domain/certificates/:certificate/download")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "server": "-----BEGIN CERTIFICATE-----\nMIIE7TCCA9WgAwIBAgITAPpTe4O3vjuQ9L4gLsogi/ukujANBgkqhkiG9w0BAQsF\nADAiMSAwHgYDVQQDDBdGYWtlIExFIEludGVybWVkaWF0ZSBYMTAeFw0xNjA2MTEx\nNzQ4MDBaFw0xNjA5MDkxNzQ4MDBaMBkxFzAVBgNVBAMTDnd3dy53ZXBwb3MubmV0\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAtzCcMfWoQRt5AMEY0HUb\n2GaraL1GsWOo6YXdPfe+YDvtnmDw23NcoTX7VSeCgU9M3RKs19AsCJcRNTLJ2dmD\nrAuyCTud9YTAaXQcTOLUhtO8T8+9AFVIva2OmAlKCR5saBW3JaRxW7V2aHEd/d1s\ns1CvNOO7jNppc9NwGSnDHcn3rqNv/U3MaU0gpJJRqsKkvcLU6IHJGgxyQ6AbpwJD\nIqBnzkjHu2IuhGEbRuMjyWLA2qtsjyVlfPotDxUdVouUQpz7dGHUFrLR7ma8QAYu\nOfl1ZMyrc901HGMa7zwbnFWurs3fed7vAosTRZIjnn72/3Wo7L9RiMB+vwr3NX7c\n9QIDAQABo4ICIzCCAh8wDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUF\nBwMBBggrBgEFBQcDAjAMBgNVHRMBAf8EAjAAMB0GA1UdDgQWBBRh9q/3Zxbk4yA/\nt7j+8xA+rkiZBTAfBgNVHSMEGDAWgBTAzANGuVggzFxycPPhLssgpvVoOjB4Bggr\nBgEFBQcBAQRsMGowMwYIKwYBBQUHMAGGJ2h0dHA6Ly9vY3NwLnN0Zy1pbnQteDEu\nbGV0c2VuY3J5cHQub3JnLzAzBggrBgEFBQcwAoYnaHR0cDovL2NlcnQuc3RnLWlu\ndC14MS5sZXRzZW5jcnlwdC5vcmcvMCUGA1UdEQQeMByCCndlcHBvcy5uZXSCDnd3\ndy53ZXBwb3MubmV0MIH+BgNVHSAEgfYwgfMwCAYGZ4EMAQIBMIHmBgsrBgEEAYLf\nEwEBATCB1jAmBggrBgEFBQcCARYaaHR0cDovL2Nwcy5sZXRzZW5jcnlwdC5vcmcw\ngasGCCsGAQUFBwICMIGeDIGbVGhpcyBDZXJ0aWZpY2F0ZSBtYXkgb25seSBiZSBy\nZWxpZWQgdXBvbiBieSBSZWx5aW5nIFBhcnRpZXMgYW5kIG9ubHkgaW4gYWNjb3Jk\nYW5jZSB3aXRoIHRoZSBDZXJ0aWZpY2F0ZSBQb2xpY3kgZm91bmQgYXQgaHR0cHM6\nLy9sZXRzZW5jcnlwdC5vcmcvcmVwb3NpdG9yeS8wDQYJKoZIhvcNAQELBQADggEB\nAEqMdWrmdIyQxthWsX3iHmM2h/wXwEesD0VIaA+Pq4mjwmKBkoPSmHGQ/O4v8RaK\nB6gl8v+qmvCwwqC1SkBmm+9C2yt/P6WhAiA/DD+WppYgJWfcz2lEKrgufFlHPukB\nDzE0mJDuXm09QTApWlaTZWYfWKY50T5uOT/rs+OwGFFCO/8o7v5AZRAHos6uzjvq\nAtFZj/FEnXXMjSSlQ7YKTXToVpnAYH4e3/UMsi6/O4orkVz82ZfhKwMWHV8dXlRw\ntQaemFWTjGPgSLXJAtQO30DgNJBHX/fJEaHv6Wy8TF3J0wOGpzGbOwaTX8YAmEzC\nlzzjs+clg5MN5rd1g4POJtU=\n-----END CERTIFICATE-----\n",
    "root": null,
    "chain": [
      "-----BEGIN CERTIFICATE-----\nMIIEqzCCApOgAwIBAgIRAIvhKg5ZRO08VGQx8JdhT+UwDQYJKoZIhvcNAQELBQAw\nGjEYMBYGA1UEAwwPRmFrZSBMRSBSb290IFgxMB4XDTE2MDUyMzIyMDc1OVoXDTM2\nMDUyMzIyMDc1OVowIjEgMB4GA1UEAwwXRmFrZSBMRSBJbnRlcm1lZGlhdGUgWDEw\nggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDtWKySDn7rWZc5ggjz3ZB0\n8jO4xti3uzINfD5sQ7Lj7hzetUT+wQob+iXSZkhnvx+IvdbXF5/yt8aWPpUKnPym\noLxsYiI5gQBLxNDzIec0OIaflWqAr29m7J8+NNtApEN8nZFnf3bhehZW7AxmS1m0\nZnSsdHw0Fw+bgixPg2MQ9k9oefFeqa+7Kqdlz5bbrUYV2volxhDFtnI4Mh8BiWCN\nxDH1Hizq+GKCcHsinDZWurCqder/afJBnQs+SBSL6MVApHt+d35zjBD92fO2Je56\ndhMfzCgOKXeJ340WhW3TjD1zqLZXeaCyUNRnfOmWZV8nEhtHOFbUCU7r/KkjMZO9\nAgMBAAGjgeMwgeAwDgYDVR0PAQH/BAQDAgGGMBIGA1UdEwEB/wQIMAYBAf8CAQAw\nHQYDVR0OBBYEFMDMA0a5WCDMXHJw8+EuyyCm9Wg6MHoGCCsGAQUFBwEBBG4wbDA0\nBggrBgEFBQcwAYYoaHR0cDovL29jc3Auc3RnLXJvb3QteDEubGV0c2VuY3J5cHQu\nb3JnLzA0BggrBgEFBQcwAoYoaHR0cDovL2NlcnQuc3RnLXJvb3QteDEubGV0c2Vu\nY3J5cHQub3JnLzAfBgNVHSMEGDAWgBTBJnSkikSg5vogKNhcI5pFiBh54DANBgkq\nhkiG9w0BAQsFAAOCAgEABYSu4Il+fI0MYU42OTmEj+1HqQ5DvyAeyCA6sGuZdwjF\nUGeVOv3NnLyfofuUOjEbY5irFCDtnv+0ckukUZN9lz4Q2YjWGUpW4TTu3ieTsaC9\nAFvCSgNHJyWSVtWvB5XDxsqawl1KzHzzwr132bF2rtGtazSqVqK9E07sGHMCf+zp\nDQVDVVGtqZPHwX3KqUtefE621b8RI6VCl4oD30Olf8pjuzG4JKBFRFclzLRjo/h7\nIkkfjZ8wDa7faOjVXx6n+eUQ29cIMCzr8/rNWHS9pYGGQKJiY2xmVC9h12H99Xyf\nzWE9vb5zKP3MVG6neX1hSdo7PEAb9fqRhHkqVsqUvJlIRmvXvVKTwNCP3eCjRCCI\nPTAvjV+4ni786iXwwFYNz8l3PmPLCyQXWGohnJ8iBm+5nk7O2ynaPVW0U2W+pt2w\nSVuvdDM5zGv2f9ltNWUiYZHJ1mmO97jSY/6YfdOUH66iRtQtDkHBRdkNBsMbD+Em\n2TgBldtHNSJBfB3pm9FblgOcJ0FSWcUDWJ7vO0+NTXlgrRofRT6pVywzxVo6dND0\nWzYlTWeUVsO40xJqhgUQRER9YLOLxJ0O6C8i0xFxAMKOtSdodMB3RIwt7RFQ0uyt\nn5Z5MqkYhlMI3J1tPRTp1nEt9fyGspBOO05gi148Qasp+3N+svqKomoQglNoAxU=\n-----END CERTIFICATE-----"
    ]
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Not Found"
}
POST Let's Encrypt- Issue a certificate renewal
{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt/:certificate/renewals/:renewalId/issue
QUERY PARAMS

account
domain
certificate
renewalId
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt/:certificate/renewals/:renewalId/issue");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt/:certificate/renewals/:renewalId/issue")
require "http/client"

url = "{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt/:certificate/renewals/:renewalId/issue"

response = HTTP::Client.post url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Post,
    RequestUri = new Uri("{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt/:certificate/renewals/:renewalId/issue"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt/:certificate/renewals/:renewalId/issue");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt/:certificate/renewals/:renewalId/issue"

	req, _ := http.NewRequest("POST", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
POST /baseUrl/:account/domains/:domain/certificates/letsencrypt/:certificate/renewals/:renewalId/issue HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt/:certificate/renewals/:renewalId/issue")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt/:certificate/renewals/:renewalId/issue"))
    .method("POST", 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}}/:account/domains/:domain/certificates/letsencrypt/:certificate/renewals/:renewalId/issue")
  .post(null)
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt/:certificate/renewals/:renewalId/issue")
  .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('POST', '{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt/:certificate/renewals/:renewalId/issue');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt/:certificate/renewals/:renewalId/issue'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt/:certificate/renewals/:renewalId/issue';
const options = {method: 'POST'};

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}}/:account/domains/:domain/certificates/letsencrypt/:certificate/renewals/:renewalId/issue',
  method: 'POST',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt/:certificate/renewals/:renewalId/issue")
  .post(null)
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'POST',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/:account/domains/:domain/certificates/letsencrypt/:certificate/renewals/:renewalId/issue',
  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: 'POST',
  url: '{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt/:certificate/renewals/:renewalId/issue'
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('POST', '{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt/:certificate/renewals/:renewalId/issue');

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}}/:account/domains/:domain/certificates/letsencrypt/:certificate/renewals/:renewalId/issue'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt/:certificate/renewals/:renewalId/issue';
const options = {method: 'POST'};

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}}/:account/domains/:domain/certificates/letsencrypt/:certificate/renewals/:renewalId/issue"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];

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}}/:account/domains/:domain/certificates/letsencrypt/:certificate/renewals/:renewalId/issue" in

Client.call `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt/:certificate/renewals/:renewalId/issue",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt/:certificate/renewals/:renewalId/issue');

echo $response->getBody();
setUrl('{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt/:certificate/renewals/:renewalId/issue');
$request->setMethod(HTTP_METH_POST);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt/:certificate/renewals/:renewalId/issue');
$request->setRequestMethod('POST');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt/:certificate/renewals/:renewalId/issue' -Method POST 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt/:certificate/renewals/:renewalId/issue' -Method POST 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("POST", "/baseUrl/:account/domains/:domain/certificates/letsencrypt/:certificate/renewals/:renewalId/issue")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt/:certificate/renewals/:renewalId/issue"

response = requests.post(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt/:certificate/renewals/:renewalId/issue"

response <- VERB("POST", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt/:certificate/renewals/:renewalId/issue")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.post('/baseUrl/:account/domains/:domain/certificates/letsencrypt/:certificate/renewals/:renewalId/issue') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt/:certificate/renewals/:renewalId/issue";

    let client = reqwest::Client::new();
    let response = client.post(url)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request POST \
  --url {{baseUrl}}/:account/domains/:domain/certificates/letsencrypt/:certificate/renewals/:renewalId/issue
http POST {{baseUrl}}/:account/domains/:domain/certificates/letsencrypt/:certificate/renewals/:renewalId/issue
wget --quiet \
  --method POST \
  --output-document \
  - {{baseUrl}}/:account/domains/:domain/certificates/letsencrypt/:certificate/renewals/:renewalId/issue
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt/:certificate/renewals/:renewalId/issue")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"

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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "id": 1,
    "domain_id": 2,
    "name": "www",
    "common_name": "www.weppos.net",
    "years": 1,
    "csr": "-----BEGIN CERTIFICATE REQUEST-----\nMIICljCCAX4CAQAwGTEXMBUGA1UEAwwOd3d3LndlcHBvcy5uZXQwggEiMA0GCSqG\nSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC3MJwx9ahBG3kAwRjQdRvYZqtovUaxY6jp\nhd09975gO+2eYPDbc1yhNftVJ4KBT0zdEqzX0CwIlxE1MsnZ2YOsC7IJO531hMBp\ndBxM4tSG07xPz70AVUi9rY6YCUoJHmxoFbclpHFbtXZocR393WyzUK8047uM2mlz\n03AZKcMdyfeuo2/9TcxpTSCkklGqwqS9wtTogckaDHJDoBunAkMioGfOSMe7Yi6E\nYRtG4yPJYsDaq2yPJWV8+i0PFR1Wi5RCnPt0YdQWstHuZrxABi45+XVkzKtz3TUc\nYxrvPBucVa6uzd953u8CixNFkiOefvb/dajsv1GIwH6/Cvc1ftz1AgMBAAGgODA2\nBgkqhkiG9w0BCQ4xKTAnMCUGA1UdEQQeMByCDnd3dy53ZXBwb3MubmV0ggp3ZXBw\nb3MubmV0MA0GCSqGSIb3DQEBCwUAA4IBAQCDnVBO9RdJX0eFeZzlv5c8yG8duhKP\nl0Vl+V88fJylb/cbNj9qFPkKTK0vTXmS2XUFBChKPtLucp8+Z754UswX+QCsdc7U\nTTSG0CkyilcSubdZUERGej1XfrVQhrokk7Fu0Jh3BdT6REP0SIDTpA8ku/aRQiAp\np+h19M37S7+w/DMGDAq2LSX8jOpJ1yIokRDyLZpmwyLxutC21DXMGoJ3xZeUFrUT\nqRNwzkn2dJzgTrPkzhaXalUBqv+nfXHqHaWljZa/O0NVCFrHCdTdd53/6EE2Yabv\nq5SFTkRCpaxrvM/7a8Tr4ixD1/VKD6rw3+WC00000000000000000000\n-----END CERTIFICATE REQUEST-----\n",
    "state": "issued",
    "authority_identifier": "letsencrypt",
    "created_at": "2016-06-11T18:47:08Z",
    "updated_at": "2016-06-11T18:47:37Z",
    "expires_at": "2016-09-09T18:47:37Z",
    "expires_on": "2016-09-09"
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Not Found"
}
POST Let's Encrypt- Issue a certificate
{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt/:purchaseId/issue
QUERY PARAMS

account
domain
purchaseId
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt/:purchaseId/issue");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt/:purchaseId/issue")
require "http/client"

url = "{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt/:purchaseId/issue"

response = HTTP::Client.post url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Post,
    RequestUri = new Uri("{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt/:purchaseId/issue"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt/:purchaseId/issue");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt/:purchaseId/issue"

	req, _ := http.NewRequest("POST", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
POST /baseUrl/:account/domains/:domain/certificates/letsencrypt/:purchaseId/issue HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt/:purchaseId/issue")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt/:purchaseId/issue"))
    .method("POST", 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}}/:account/domains/:domain/certificates/letsencrypt/:purchaseId/issue")
  .post(null)
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt/:purchaseId/issue")
  .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('POST', '{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt/:purchaseId/issue');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt/:purchaseId/issue'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt/:purchaseId/issue';
const options = {method: 'POST'};

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}}/:account/domains/:domain/certificates/letsencrypt/:purchaseId/issue',
  method: 'POST',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt/:purchaseId/issue")
  .post(null)
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'POST',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/:account/domains/:domain/certificates/letsencrypt/:purchaseId/issue',
  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: 'POST',
  url: '{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt/:purchaseId/issue'
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('POST', '{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt/:purchaseId/issue');

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}}/:account/domains/:domain/certificates/letsencrypt/:purchaseId/issue'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt/:purchaseId/issue';
const options = {method: 'POST'};

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}}/:account/domains/:domain/certificates/letsencrypt/:purchaseId/issue"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];

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}}/:account/domains/:domain/certificates/letsencrypt/:purchaseId/issue" in

Client.call `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt/:purchaseId/issue",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt/:purchaseId/issue');

echo $response->getBody();
setUrl('{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt/:purchaseId/issue');
$request->setMethod(HTTP_METH_POST);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt/:purchaseId/issue');
$request->setRequestMethod('POST');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt/:purchaseId/issue' -Method POST 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt/:purchaseId/issue' -Method POST 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("POST", "/baseUrl/:account/domains/:domain/certificates/letsencrypt/:purchaseId/issue")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt/:purchaseId/issue"

response = requests.post(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt/:purchaseId/issue"

response <- VERB("POST", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt/:purchaseId/issue")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.post('/baseUrl/:account/domains/:domain/certificates/letsencrypt/:purchaseId/issue') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt/:purchaseId/issue";

    let client = reqwest::Client::new();
    let response = client.post(url)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request POST \
  --url {{baseUrl}}/:account/domains/:domain/certificates/letsencrypt/:purchaseId/issue
http POST {{baseUrl}}/:account/domains/:domain/certificates/letsencrypt/:purchaseId/issue
wget --quiet \
  --method POST \
  --output-document \
  - {{baseUrl}}/:account/domains/:domain/certificates/letsencrypt/:purchaseId/issue
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt/:purchaseId/issue")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"

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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "id": 1,
    "domain_id": 2,
    "name": "www",
    "common_name": "www.weppos.net",
    "years": 1,
    "csr": "-----BEGIN CERTIFICATE REQUEST-----\nMIICljCCAX4CAQAwGTEXMBUGA1UEAwwOd3d3LndlcHBvcy5uZXQwggEiMA0GCSqG\nSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC3MJwx9ahBG3kAwRjQdRvYZqtovUaxY6jp\nhd09975gO+2eYPDbc1yhNftVJ4KBT0zdEqzX0CwIlxE1MsnZ2YOsC7IJO531hMBp\ndBxM4tSG07xPz70AVUi9rY6YCUoJHmxoFbclpHFbtXZocR393WyzUK8047uM2mlz\n03AZKcMdyfeuo2/9TcxpTSCkklGqwqS9wtTogckaDHJDoBunAkMioGfOSMe7Yi6E\nYRtG4yPJYsDaq2yPJWV8+i0PFR1Wi5RCnPt0YdQWstHuZrxABi45+XVkzKtz3TUc\nYxrvPBucVa6uzd953u8CixNFkiOefvb/dajsv1GIwH6/Cvc1ftz1AgMBAAGgODA2\nBgkqhkiG9w0BCQ4xKTAnMCUGA1UdEQQeMByCDnd3dy53ZXBwb3MubmV0ggp3ZXBw\nb3MubmV0MA0GCSqGSIb3DQEBCwUAA4IBAQCDnVBO9RdJX0eFeZzlv5c8yG8duhKP\nl0Vl+V88fJylb/cbNj9qFPkKTK0vTXmS2XUFBChKPtLucp8+Z754UswX+QCsdc7U\nTTSG0CkyilcSubdZUERGej1XfrVQhrokk7Fu0Jh3BdT6REP0SIDTpA8ku/aRQiAp\np+h19M37S7+w/DMGDAq2LSX8jOpJ1yIokRDyLZpmwyLxutC21DXMGoJ3xZeUFrUT\nqRNwzkn2dJzgTrPkzhaXalUBqv+nfXHqHaWljZa/O0NVCFrHCdTdd53/6EE2Yabv\nq5SFTkRCpaxrvM/7a8Tr4ixD1/VKD6rw3+WC00000000000000000000\n-----END CERTIFICATE REQUEST-----\n",
    "state": "issued",
    "authority_identifier": "letsencrypt",
    "created_at": "2016-06-11T18:47:08Z",
    "updated_at": "2016-06-11T18:47:37Z",
    "expires_at": "2016-09-09T18:47:37Z",
    "expires_on": "2016-09-09"
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Not Found"
}
POST Let's Encrypt- Order a certificate renewal
{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt/:certificate/renewals
QUERY PARAMS

account
domain
certificate
BODY json

{
  "auto_renew": false,
  "signature_algorithm": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt/:certificate/renewals");

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  \"auto_renew\": false,\n  \"signature_algorithm\": \"\"\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt/:certificate/renewals" {:content-type :json
                                                                                                                    :form-params {:auto_renew false
                                                                                                                                  :signature_algorithm ""}})
require "http/client"

url = "{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt/:certificate/renewals"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"auto_renew\": false,\n  \"signature_algorithm\": \"\"\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}}/:account/domains/:domain/certificates/letsencrypt/:certificate/renewals"),
    Content = new StringContent("{\n  \"auto_renew\": false,\n  \"signature_algorithm\": \"\"\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}}/:account/domains/:domain/certificates/letsencrypt/:certificate/renewals");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"auto_renew\": false,\n  \"signature_algorithm\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt/:certificate/renewals"

	payload := strings.NewReader("{\n  \"auto_renew\": false,\n  \"signature_algorithm\": \"\"\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/:account/domains/:domain/certificates/letsencrypt/:certificate/renewals HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 54

{
  "auto_renew": false,
  "signature_algorithm": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt/:certificate/renewals")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"auto_renew\": false,\n  \"signature_algorithm\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt/:certificate/renewals"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"auto_renew\": false,\n  \"signature_algorithm\": \"\"\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  \"auto_renew\": false,\n  \"signature_algorithm\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt/:certificate/renewals")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt/:certificate/renewals")
  .header("content-type", "application/json")
  .body("{\n  \"auto_renew\": false,\n  \"signature_algorithm\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  auto_renew: false,
  signature_algorithm: ''
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt/:certificate/renewals');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt/:certificate/renewals',
  headers: {'content-type': 'application/json'},
  data: {auto_renew: false, signature_algorithm: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt/:certificate/renewals';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"auto_renew":false,"signature_algorithm":""}'
};

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}}/:account/domains/:domain/certificates/letsencrypt/:certificate/renewals',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "auto_renew": false,\n  "signature_algorithm": ""\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"auto_renew\": false,\n  \"signature_algorithm\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt/:certificate/renewals")
  .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/:account/domains/:domain/certificates/letsencrypt/:certificate/renewals',
  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({auto_renew: false, signature_algorithm: ''}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt/:certificate/renewals',
  headers: {'content-type': 'application/json'},
  body: {auto_renew: false, signature_algorithm: ''},
  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}}/:account/domains/:domain/certificates/letsencrypt/:certificate/renewals');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  auto_renew: false,
  signature_algorithm: ''
});

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}}/:account/domains/:domain/certificates/letsencrypt/:certificate/renewals',
  headers: {'content-type': 'application/json'},
  data: {auto_renew: false, signature_algorithm: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt/:certificate/renewals';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"auto_renew":false,"signature_algorithm":""}'
};

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 = @{ @"auto_renew": @NO,
                              @"signature_algorithm": @"" };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt/:certificate/renewals"]
                                                       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}}/:account/domains/:domain/certificates/letsencrypt/:certificate/renewals" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"auto_renew\": false,\n  \"signature_algorithm\": \"\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt/:certificate/renewals",
  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([
    'auto_renew' => null,
    'signature_algorithm' => ''
  ]),
  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}}/:account/domains/:domain/certificates/letsencrypt/:certificate/renewals', [
  'body' => '{
  "auto_renew": false,
  "signature_algorithm": ""
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt/:certificate/renewals');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'auto_renew' => null,
  'signature_algorithm' => ''
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'auto_renew' => null,
  'signature_algorithm' => ''
]));
$request->setRequestUrl('{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt/:certificate/renewals');
$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}}/:account/domains/:domain/certificates/letsencrypt/:certificate/renewals' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "auto_renew": false,
  "signature_algorithm": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt/:certificate/renewals' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "auto_renew": false,
  "signature_algorithm": ""
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"auto_renew\": false,\n  \"signature_algorithm\": \"\"\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/:account/domains/:domain/certificates/letsencrypt/:certificate/renewals", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt/:certificate/renewals"

payload = {
    "auto_renew": False,
    "signature_algorithm": ""
}
headers = {"content-type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt/:certificate/renewals"

payload <- "{\n  \"auto_renew\": false,\n  \"signature_algorithm\": \"\"\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}}/:account/domains/:domain/certificates/letsencrypt/:certificate/renewals")

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  \"auto_renew\": false,\n  \"signature_algorithm\": \"\"\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/:account/domains/:domain/certificates/letsencrypt/:certificate/renewals') do |req|
  req.body = "{\n  \"auto_renew\": false,\n  \"signature_algorithm\": \"\"\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt/:certificate/renewals";

    let payload = json!({
        "auto_renew": false,
        "signature_algorithm": ""
    });

    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}}/:account/domains/:domain/certificates/letsencrypt/:certificate/renewals \
  --header 'content-type: application/json' \
  --data '{
  "auto_renew": false,
  "signature_algorithm": ""
}'
echo '{
  "auto_renew": false,
  "signature_algorithm": ""
}' |  \
  http POST {{baseUrl}}/:account/domains/:domain/certificates/letsencrypt/:certificate/renewals \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "auto_renew": false,\n  "signature_algorithm": ""\n}' \
  --output-document \
  - {{baseUrl}}/:account/domains/:domain/certificates/letsencrypt/:certificate/renewals
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [
  "auto_renew": false,
  "signature_algorithm": ""
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt/:certificate/renewals")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "id": 999,
    "old_certificate_id": 200,
    "new_certificate_id": 300,
    "state": "new",
    "auto_renewal": true,
    "created_at": "2017-10-19T08:18:53Z",
    "updated_at": "2017-10-19T08:18:53Z"
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Not Found"
}
POST Let's Encrypt- Order a certificate
{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt
QUERY PARAMS

account
domain
BODY json

{
  "auto_renew": false,
  "name": "",
  "alternate_names": [],
  "signature_algorithm": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt");

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  \"auto_renew\": false,\n  \"name\": \"\",\n  \"alternate_names\": [],\n  \"signature_algorithm\": \"\"\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt" {:content-type :json
                                                                                              :form-params {:auto_renew false
                                                                                                            :name ""
                                                                                                            :alternate_names []
                                                                                                            :signature_algorithm ""}})
require "http/client"

url = "{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"auto_renew\": false,\n  \"name\": \"\",\n  \"alternate_names\": [],\n  \"signature_algorithm\": \"\"\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}}/:account/domains/:domain/certificates/letsencrypt"),
    Content = new StringContent("{\n  \"auto_renew\": false,\n  \"name\": \"\",\n  \"alternate_names\": [],\n  \"signature_algorithm\": \"\"\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}}/:account/domains/:domain/certificates/letsencrypt");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"auto_renew\": false,\n  \"name\": \"\",\n  \"alternate_names\": [],\n  \"signature_algorithm\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt"

	payload := strings.NewReader("{\n  \"auto_renew\": false,\n  \"name\": \"\",\n  \"alternate_names\": [],\n  \"signature_algorithm\": \"\"\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/:account/domains/:domain/certificates/letsencrypt HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 93

{
  "auto_renew": false,
  "name": "",
  "alternate_names": [],
  "signature_algorithm": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"auto_renew\": false,\n  \"name\": \"\",\n  \"alternate_names\": [],\n  \"signature_algorithm\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"auto_renew\": false,\n  \"name\": \"\",\n  \"alternate_names\": [],\n  \"signature_algorithm\": \"\"\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  \"auto_renew\": false,\n  \"name\": \"\",\n  \"alternate_names\": [],\n  \"signature_algorithm\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt")
  .header("content-type", "application/json")
  .body("{\n  \"auto_renew\": false,\n  \"name\": \"\",\n  \"alternate_names\": [],\n  \"signature_algorithm\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  auto_renew: false,
  name: '',
  alternate_names: [],
  signature_algorithm: ''
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt',
  headers: {'content-type': 'application/json'},
  data: {auto_renew: false, name: '', alternate_names: [], signature_algorithm: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"auto_renew":false,"name":"","alternate_names":[],"signature_algorithm":""}'
};

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}}/:account/domains/:domain/certificates/letsencrypt',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "auto_renew": false,\n  "name": "",\n  "alternate_names": [],\n  "signature_algorithm": ""\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"auto_renew\": false,\n  \"name\": \"\",\n  \"alternate_names\": [],\n  \"signature_algorithm\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt")
  .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/:account/domains/:domain/certificates/letsencrypt',
  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({auto_renew: false, name: '', alternate_names: [], signature_algorithm: ''}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt',
  headers: {'content-type': 'application/json'},
  body: {auto_renew: false, name: '', alternate_names: [], signature_algorithm: ''},
  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}}/:account/domains/:domain/certificates/letsencrypt');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  auto_renew: false,
  name: '',
  alternate_names: [],
  signature_algorithm: ''
});

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}}/:account/domains/:domain/certificates/letsencrypt',
  headers: {'content-type': 'application/json'},
  data: {auto_renew: false, name: '', alternate_names: [], signature_algorithm: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"auto_renew":false,"name":"","alternate_names":[],"signature_algorithm":""}'
};

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 = @{ @"auto_renew": @NO,
                              @"name": @"",
                              @"alternate_names": @[  ],
                              @"signature_algorithm": @"" };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt"]
                                                       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}}/:account/domains/:domain/certificates/letsencrypt" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"auto_renew\": false,\n  \"name\": \"\",\n  \"alternate_names\": [],\n  \"signature_algorithm\": \"\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt",
  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([
    'auto_renew' => null,
    'name' => '',
    'alternate_names' => [
        
    ],
    'signature_algorithm' => ''
  ]),
  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}}/:account/domains/:domain/certificates/letsencrypt', [
  'body' => '{
  "auto_renew": false,
  "name": "",
  "alternate_names": [],
  "signature_algorithm": ""
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'auto_renew' => null,
  'name' => '',
  'alternate_names' => [
    
  ],
  'signature_algorithm' => ''
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'auto_renew' => null,
  'name' => '',
  'alternate_names' => [
    
  ],
  'signature_algorithm' => ''
]));
$request->setRequestUrl('{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt');
$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}}/:account/domains/:domain/certificates/letsencrypt' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "auto_renew": false,
  "name": "",
  "alternate_names": [],
  "signature_algorithm": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "auto_renew": false,
  "name": "",
  "alternate_names": [],
  "signature_algorithm": ""
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"auto_renew\": false,\n  \"name\": \"\",\n  \"alternate_names\": [],\n  \"signature_algorithm\": \"\"\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/:account/domains/:domain/certificates/letsencrypt", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt"

payload = {
    "auto_renew": False,
    "name": "",
    "alternate_names": [],
    "signature_algorithm": ""
}
headers = {"content-type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt"

payload <- "{\n  \"auto_renew\": false,\n  \"name\": \"\",\n  \"alternate_names\": [],\n  \"signature_algorithm\": \"\"\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}}/:account/domains/:domain/certificates/letsencrypt")

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  \"auto_renew\": false,\n  \"name\": \"\",\n  \"alternate_names\": [],\n  \"signature_algorithm\": \"\"\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/:account/domains/:domain/certificates/letsencrypt') do |req|
  req.body = "{\n  \"auto_renew\": false,\n  \"name\": \"\",\n  \"alternate_names\": [],\n  \"signature_algorithm\": \"\"\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt";

    let payload = json!({
        "auto_renew": false,
        "name": "",
        "alternate_names": (),
        "signature_algorithm": ""
    });

    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}}/:account/domains/:domain/certificates/letsencrypt \
  --header 'content-type: application/json' \
  --data '{
  "auto_renew": false,
  "name": "",
  "alternate_names": [],
  "signature_algorithm": ""
}'
echo '{
  "auto_renew": false,
  "name": "",
  "alternate_names": [],
  "signature_algorithm": ""
}' |  \
  http POST {{baseUrl}}/:account/domains/:domain/certificates/letsencrypt \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "auto_renew": false,\n  "name": "",\n  "alternate_names": [],\n  "signature_algorithm": ""\n}' \
  --output-document \
  - {{baseUrl}}/:account/domains/:domain/certificates/letsencrypt
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [
  "auto_renew": false,
  "name": "",
  "alternate_names": [],
  "signature_algorithm": ""
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/domains/:domain/certificates/letsencrypt")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "id": 1,
    "certificate_id": 1,
    "state": "new",
    "auto_renew": true,
    "created_at": "2016-06-11T18:47:08Z",
    "updated_at": "2016-06-11T18:47:37Z"
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Not Found"
}
GET List certificates
{{baseUrl}}/:account/domains/:domain/certificates
QUERY PARAMS

account
domain
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/domains/:domain/certificates");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/:account/domains/:domain/certificates")
require "http/client"

url = "{{baseUrl}}/:account/domains/:domain/certificates"

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}}/:account/domains/:domain/certificates"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/:account/domains/:domain/certificates");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/domains/:domain/certificates"

	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/:account/domains/:domain/certificates HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/:account/domains/:domain/certificates")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/domains/:domain/certificates"))
    .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}}/:account/domains/:domain/certificates")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/:account/domains/:domain/certificates")
  .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}}/:account/domains/:domain/certificates');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'GET',
  url: '{{baseUrl}}/:account/domains/:domain/certificates'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/domains/:domain/certificates';
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}}/:account/domains/:domain/certificates',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/:account/domains/:domain/certificates")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/:account/domains/:domain/certificates',
  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}}/:account/domains/:domain/certificates'
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/:account/domains/:domain/certificates');

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}}/:account/domains/:domain/certificates'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/domains/:domain/certificates';
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}}/:account/domains/:domain/certificates"]
                                                       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}}/:account/domains/:domain/certificates" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/domains/:domain/certificates",
  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}}/:account/domains/:domain/certificates');

echo $response->getBody();
setUrl('{{baseUrl}}/:account/domains/:domain/certificates');
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/:account/domains/:domain/certificates');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/:account/domains/:domain/certificates' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/domains/:domain/certificates' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/:account/domains/:domain/certificates")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/domains/:domain/certificates"

response = requests.get(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/domains/:domain/certificates"

response <- VERB("GET", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/:account/domains/:domain/certificates")

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/:account/domains/:domain/certificates') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:account/domains/:domain/certificates";

    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}}/:account/domains/:domain/certificates
http GET {{baseUrl}}/:account/domains/:domain/certificates
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/:account/domains/:domain/certificates
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/domains/:domain/certificates")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": [
    {
      "id": 1,
      "domain_id": 2,
      "name": "www",
      "common_name": "www.weppos.net",
      "years": 1,
      "csr": "-----BEGIN CERTIFICATE REQUEST-----\nMIICljCCAX4CAQAwGTEXMBUGA1UEAwwOd3d3LndlcHBvcy5uZXQwggEiMA0GCSqG\nSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC3MJwx9ahBG3kAwRjQdRvYZqtovUaxY6jp\nhd09975gO+2eYPDbc1yhNftVJ4KBT0zdEqzX0CwIlxE1MsnZ2YOsC7IJO531hMBp\ndBxM4tSG07xPz70AVUi9rY6YCUoJHmxoFbclpHFbtXZocR393WyzUK8047uM2mlz\n03AZKcMdyfeuo2/9TcxpTSCkklGqwqS9wtTogckaDHJDoBunAkMioGfOSMe7Yi6E\nYRtG4yPJYsDaq2yPJWV8+i0PFR1Wi5RCnPt0YdQWstHuZrxABi45+XVkzKtz3TUc\nYxrvPBucVa6uzd953u8CixNFkiOefvb/dajsv1GIwH6/Cvc1ftz1AgMBAAGgODA2\nBgkqhkiG9w0BCQ4xKTAnMCUGA1UdEQQeMByCDnd3dy53ZXBwb3MubmV0ggp3ZXBw\nb3MubmV0MA0GCSqGSIb3DQEBCwUAA4IBAQCDnVBO9RdJX0eFeZzlv5c8yG8duhKP\nl0Vl+V88fJylb/cbNj9qFPkKTK0vTXmS2XUFBChKPtLucp8+Z754UswX+QCsdc7U\nTTSG0CkyilcSubdZUERGej1XfrVQhrokk7Fu0Jh3BdT6REP0SIDTpA8ku/aRQiAp\np+h19M37S7+w/DMGDAq2LSX8jOpJ1yIokRDyLZpmwyLxutC21DXMGoJ3xZeUFrUT\nqRNwzkn2dJzgTrPkzhaXalUBqv+nfXHqHaWljZa/O0NVCFrHCdTdd53/6EE2Yabv\nq5SFTkRCpaxrvM/7a8Tr4ixD1/VKD6rw3+WC00000000000000000000\n-----END CERTIFICATE REQUEST-----\n",
      "state": "issued",
      "authority_identifier": "letsencrypt",
      "created_at": "2016-06-11T18:47:08Z",
      "updated_at": "2016-06-11T18:47:37Z",
      "expires_at": "2016-09-09T18:47:37Z",
      "expires_on": "2016-09-09"
    }
  ],
  "pagination": {
    "current_page": 1,
    "per_page": 30,
    "total_entries": 2,
    "total_pages": 1
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Not Found"
}
GET Retrieve a certificate private key
{{baseUrl}}/:account/domains/:domain/certificates/:certificate/private_key
QUERY PARAMS

account
domain
certificate
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/domains/:domain/certificates/:certificate/private_key");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/:account/domains/:domain/certificates/:certificate/private_key")
require "http/client"

url = "{{baseUrl}}/:account/domains/:domain/certificates/:certificate/private_key"

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}}/:account/domains/:domain/certificates/:certificate/private_key"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/:account/domains/:domain/certificates/:certificate/private_key");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/domains/:domain/certificates/:certificate/private_key"

	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/:account/domains/:domain/certificates/:certificate/private_key HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/:account/domains/:domain/certificates/:certificate/private_key")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/domains/:domain/certificates/:certificate/private_key"))
    .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}}/:account/domains/:domain/certificates/:certificate/private_key")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/:account/domains/:domain/certificates/:certificate/private_key")
  .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}}/:account/domains/:domain/certificates/:certificate/private_key');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'GET',
  url: '{{baseUrl}}/:account/domains/:domain/certificates/:certificate/private_key'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/domains/:domain/certificates/:certificate/private_key';
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}}/:account/domains/:domain/certificates/:certificate/private_key',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/:account/domains/:domain/certificates/:certificate/private_key")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/:account/domains/:domain/certificates/:certificate/private_key',
  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}}/:account/domains/:domain/certificates/:certificate/private_key'
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/:account/domains/:domain/certificates/:certificate/private_key');

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}}/:account/domains/:domain/certificates/:certificate/private_key'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/domains/:domain/certificates/:certificate/private_key';
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}}/:account/domains/:domain/certificates/:certificate/private_key"]
                                                       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}}/:account/domains/:domain/certificates/:certificate/private_key" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/domains/:domain/certificates/:certificate/private_key",
  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}}/:account/domains/:domain/certificates/:certificate/private_key');

echo $response->getBody();
setUrl('{{baseUrl}}/:account/domains/:domain/certificates/:certificate/private_key');
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/:account/domains/:domain/certificates/:certificate/private_key');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/:account/domains/:domain/certificates/:certificate/private_key' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/domains/:domain/certificates/:certificate/private_key' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/:account/domains/:domain/certificates/:certificate/private_key")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/domains/:domain/certificates/:certificate/private_key"

response = requests.get(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/domains/:domain/certificates/:certificate/private_key"

response <- VERB("GET", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/:account/domains/:domain/certificates/:certificate/private_key")

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/:account/domains/:domain/certificates/:certificate/private_key') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:account/domains/:domain/certificates/:certificate/private_key";

    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}}/:account/domains/:domain/certificates/:certificate/private_key
http GET {{baseUrl}}/:account/domains/:domain/certificates/:certificate/private_key
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/:account/domains/:domain/certificates/:certificate/private_key
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/domains/:domain/certificates/:certificate/private_key")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "private_key": "-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAtzCcMfWoQRt5AMEY0HUb2GaraL1GsWOo6YXdPfe+YDvtnmDw\n23NcoTX7VSeCgU9M3RKs19AsCJcRNTLJ2dmDrAuyCTud9YTAaXQcTOLUhtO8T8+9\nAFVIva2OmAlKCR5saBW3JaRxW7V2aHEd/d1ss1CvNOO7jNppc9NwGSnDHcn3rqNv\n/U3MaU0gpJJRqsKkvcLU6IHJGgxyQ6AbpwJDIqBnzkjHu2IuhGEbRuMjyWLA2qts\njyVlfPotDxUdVouUQpz7dGHUFrLR7ma8QAYuOfl1ZMyrc901HGMa7zwbnFWurs3f\ned7vAosTRZIjnn72/3Wo7L9RiMB+vwr3NX7c9QIDAQABAoIBAEQx32OlzK34GTKT\nr7Yicmw7xEGofIGa1Q2h3Lut13whsxKLif5X0rrcyqRnoeibacS+qXXrJolIG4rP\nTl8/3wmUDQHs5J+6fJqFM+fXZUCP4AFiFzzhgsPBsVyd0KbWYYrZ0qU7s0ttoRe+\nTGjuHgIe3ip1QKNtx2Xr50YmytDydknmro79J5Gfrub1l2iA8SDm1eBrQ4SFaNQ2\nU709pHeSwX8pTihUX2Zy0ifpr0O1wYQjGLneMoG4rrNQJG/z6iUdhYczwwt1kDRQ\n4WkM2sovFOyxbBfoCQ3Gy/eem7OXfjNKUe47DAVLnPkKbqL/3Lo9FD7kcB8K87Ap\nr/vYrl0CgYEA413RAk7571w5dM+VftrdbFZ+Yi1OPhUshlPSehavro8kMGDEG5Ts\n74wEz2X3cfMxauMpMrBk/XnUCZ20AnWQClK73RB5fzPw5XNv473Tt/AFmt7eLOzl\nOcYrhpEHegtsD/ZaljlGtPqsjQAL9Ijhao03m1cGB1+uxI7FgacdckcCgYEAzkKP\n6xu9+WqOol73cnlYPS3sSZssyUF+eqWSzq2YJGRmfr1fbdtHqAS1ZbyC5fZVNZYV\nml1vfXi2LDcU0qS04JazurVyQr2rJZMTlCWVET1vhik7Y87wgCkLwKpbwamPDmlI\n9GY+fLNEa4yfAOOpvpTJpenUScxyKWH2cdYFOOMCgYBhrJnvffINC/d64Pp+BpP8\nyKN+lav5K6t3AWd4H2rVeJS5W7ijiLTIq8QdPNayUyE1o+S8695WrhGTF/aO3+ZD\nKQufikZHiQ7B43d7xL7BVBF0WK3lateGnEVyh7dIjMOdj92Wj4B6mv2pjQ2VvX/p\nAEWVLCtg24/+zL64VgxmXQKBgGosyXj1Zu2ldJcQ28AJxup3YVLilkNje4AXC2No\n6RCSvlAvm5gpcNGE2vvr9lX6YBKdl7FGt8WXBe/sysNEFfgmm45ZKOBCUn+dHk78\nqaeeQHKHdxMBy7utZWdgSqt+ZS299NgaacA3Z9kVIiSLDS4V2VeW7riujXXP/9TJ\nnxaRAoGBAMWXOfNVzfTyrKff6gvDWH+hqNICLyzvkEn2utNY9Q6WwqGuY9fvP/4Z\nXzc48AOBzUr8OeA4sHKJ79sJirOiWHNfD1swtvyVzsFZb6moiNwD3Ce/FzYCa3lQ\nU8blTH/uqpR2pSC6whzJ/lnSdqHUqhyp00000000000000000000\n-----END RSA PRIVATE KEY-----\n"
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Not Found"
}
GET Retrieve a certificate
{{baseUrl}}/:account/domains/:domain/certificates/:certificate
QUERY PARAMS

account
domain
certificate
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/domains/:domain/certificates/:certificate");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/:account/domains/:domain/certificates/:certificate")
require "http/client"

url = "{{baseUrl}}/:account/domains/:domain/certificates/:certificate"

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}}/:account/domains/:domain/certificates/:certificate"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/:account/domains/:domain/certificates/:certificate");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/domains/:domain/certificates/:certificate"

	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/:account/domains/:domain/certificates/:certificate HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/:account/domains/:domain/certificates/:certificate")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/domains/:domain/certificates/:certificate"))
    .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}}/:account/domains/:domain/certificates/:certificate")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/:account/domains/:domain/certificates/:certificate")
  .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}}/:account/domains/:domain/certificates/:certificate');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'GET',
  url: '{{baseUrl}}/:account/domains/:domain/certificates/:certificate'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/domains/:domain/certificates/:certificate';
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}}/:account/domains/:domain/certificates/:certificate',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/:account/domains/:domain/certificates/:certificate")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/:account/domains/:domain/certificates/:certificate',
  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}}/:account/domains/:domain/certificates/:certificate'
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/:account/domains/:domain/certificates/:certificate');

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}}/:account/domains/:domain/certificates/:certificate'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/domains/:domain/certificates/:certificate';
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}}/:account/domains/:domain/certificates/:certificate"]
                                                       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}}/:account/domains/:domain/certificates/:certificate" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/domains/:domain/certificates/:certificate",
  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}}/:account/domains/:domain/certificates/:certificate');

echo $response->getBody();
setUrl('{{baseUrl}}/:account/domains/:domain/certificates/:certificate');
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/:account/domains/:domain/certificates/:certificate');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/:account/domains/:domain/certificates/:certificate' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/domains/:domain/certificates/:certificate' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/:account/domains/:domain/certificates/:certificate")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/domains/:domain/certificates/:certificate"

response = requests.get(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/domains/:domain/certificates/:certificate"

response <- VERB("GET", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/:account/domains/:domain/certificates/:certificate")

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/:account/domains/:domain/certificates/:certificate') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:account/domains/:domain/certificates/:certificate";

    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}}/:account/domains/:domain/certificates/:certificate
http GET {{baseUrl}}/:account/domains/:domain/certificates/:certificate
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/:account/domains/:domain/certificates/:certificate
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/domains/:domain/certificates/:certificate")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "id": 1,
    "domain_id": 2,
    "name": "www",
    "common_name": "www.weppos.net",
    "years": 1,
    "csr": "-----BEGIN CERTIFICATE REQUEST-----\nMIICljCCAX4CAQAwGTEXMBUGA1UEAwwOd3d3LndlcHBvcy5uZXQwggEiMA0GCSqG\nSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC3MJwx9ahBG3kAwRjQdRvYZqtovUaxY6jp\nhd09975gO+2eYPDbc1yhNftVJ4KBT0zdEqzX0CwIlxE1MsnZ2YOsC7IJO531hMBp\ndBxM4tSG07xPz70AVUi9rY6YCUoJHmxoFbclpHFbtXZocR393WyzUK8047uM2mlz\n03AZKcMdyfeuo2/9TcxpTSCkklGqwqS9wtTogckaDHJDoBunAkMioGfOSMe7Yi6E\nYRtG4yPJYsDaq2yPJWV8+i0PFR1Wi5RCnPt0YdQWstHuZrxABi45+XVkzKtz3TUc\nYxrvPBucVa6uzd953u8CixNFkiOefvb/dajsv1GIwH6/Cvc1ftz1AgMBAAGgODA2\nBgkqhkiG9w0BCQ4xKTAnMCUGA1UdEQQeMByCDnd3dy53ZXBwb3MubmV0ggp3ZXBw\nb3MubmV0MA0GCSqGSIb3DQEBCwUAA4IBAQCDnVBO9RdJX0eFeZzlv5c8yG8duhKP\nl0Vl+V88fJylb/cbNj9qFPkKTK0vTXmS2XUFBChKPtLucp8+Z754UswX+QCsdc7U\nTTSG0CkyilcSubdZUERGej1XfrVQhrokk7Fu0Jh3BdT6REP0SIDTpA8ku/aRQiAp\np+h19M37S7+w/DMGDAq2LSX8jOpJ1yIokRDyLZpmwyLxutC21DXMGoJ3xZeUFrUT\nqRNwzkn2dJzgTrPkzhaXalUBqv+nfXHqHaWljZa/O0NVCFrHCdTdd53/6EE2Yabv\nq5SFTkRCpaxrvM/7a8Tr4ixD1/VKD6rw3+WC00000000000000000000\n-----END CERTIFICATE REQUEST-----\n",
    "state": "issued",
    "authority_identifier": "letsencrypt",
    "created_at": "2016-06-11T18:47:08Z",
    "updated_at": "2016-06-11T18:47:37Z",
    "expires_at": "2016-09-09T18:47:37Z",
    "expires_on": "2016-09-09"
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Not Found"
}
POST Create a delegation signer record
{{baseUrl}}/:account/domains/:domain/ds_records
QUERY PARAMS

account
domain
BODY json

{
  "algorithm": "",
  "digest": "",
  "digest_type": "",
  "keytag": "",
  "public_key": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/domains/:domain/ds_records");

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  \"algorithm\": \"\",\n  \"digest\": \"\",\n  \"digest_type\": \"\",\n  \"keytag\": \"\",\n  \"public_key\": \"\"\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/:account/domains/:domain/ds_records" {:content-type :json
                                                                                :form-params {:algorithm ""
                                                                                              :digest ""
                                                                                              :digest_type ""
                                                                                              :keytag ""
                                                                                              :public_key ""}})
require "http/client"

url = "{{baseUrl}}/:account/domains/:domain/ds_records"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"algorithm\": \"\",\n  \"digest\": \"\",\n  \"digest_type\": \"\",\n  \"keytag\": \"\",\n  \"public_key\": \"\"\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}}/:account/domains/:domain/ds_records"),
    Content = new StringContent("{\n  \"algorithm\": \"\",\n  \"digest\": \"\",\n  \"digest_type\": \"\",\n  \"keytag\": \"\",\n  \"public_key\": \"\"\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}}/:account/domains/:domain/ds_records");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"algorithm\": \"\",\n  \"digest\": \"\",\n  \"digest_type\": \"\",\n  \"keytag\": \"\",\n  \"public_key\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/domains/:domain/ds_records"

	payload := strings.NewReader("{\n  \"algorithm\": \"\",\n  \"digest\": \"\",\n  \"digest_type\": \"\",\n  \"keytag\": \"\",\n  \"public_key\": \"\"\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/:account/domains/:domain/ds_records HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 94

{
  "algorithm": "",
  "digest": "",
  "digest_type": "",
  "keytag": "",
  "public_key": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/:account/domains/:domain/ds_records")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"algorithm\": \"\",\n  \"digest\": \"\",\n  \"digest_type\": \"\",\n  \"keytag\": \"\",\n  \"public_key\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/domains/:domain/ds_records"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"algorithm\": \"\",\n  \"digest\": \"\",\n  \"digest_type\": \"\",\n  \"keytag\": \"\",\n  \"public_key\": \"\"\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  \"algorithm\": \"\",\n  \"digest\": \"\",\n  \"digest_type\": \"\",\n  \"keytag\": \"\",\n  \"public_key\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/:account/domains/:domain/ds_records")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/:account/domains/:domain/ds_records")
  .header("content-type", "application/json")
  .body("{\n  \"algorithm\": \"\",\n  \"digest\": \"\",\n  \"digest_type\": \"\",\n  \"keytag\": \"\",\n  \"public_key\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  algorithm: '',
  digest: '',
  digest_type: '',
  keytag: '',
  public_key: ''
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/:account/domains/:domain/ds_records');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/:account/domains/:domain/ds_records',
  headers: {'content-type': 'application/json'},
  data: {algorithm: '', digest: '', digest_type: '', keytag: '', public_key: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/domains/:domain/ds_records';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"algorithm":"","digest":"","digest_type":"","keytag":"","public_key":""}'
};

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}}/:account/domains/:domain/ds_records',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "algorithm": "",\n  "digest": "",\n  "digest_type": "",\n  "keytag": "",\n  "public_key": ""\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"algorithm\": \"\",\n  \"digest\": \"\",\n  \"digest_type\": \"\",\n  \"keytag\": \"\",\n  \"public_key\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/:account/domains/:domain/ds_records")
  .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/:account/domains/:domain/ds_records',
  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({algorithm: '', digest: '', digest_type: '', keytag: '', public_key: ''}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/:account/domains/:domain/ds_records',
  headers: {'content-type': 'application/json'},
  body: {algorithm: '', digest: '', digest_type: '', keytag: '', public_key: ''},
  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}}/:account/domains/:domain/ds_records');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  algorithm: '',
  digest: '',
  digest_type: '',
  keytag: '',
  public_key: ''
});

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}}/:account/domains/:domain/ds_records',
  headers: {'content-type': 'application/json'},
  data: {algorithm: '', digest: '', digest_type: '', keytag: '', public_key: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/domains/:domain/ds_records';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"algorithm":"","digest":"","digest_type":"","keytag":"","public_key":""}'
};

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 = @{ @"algorithm": @"",
                              @"digest": @"",
                              @"digest_type": @"",
                              @"keytag": @"",
                              @"public_key": @"" };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/:account/domains/:domain/ds_records"]
                                                       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}}/:account/domains/:domain/ds_records" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"algorithm\": \"\",\n  \"digest\": \"\",\n  \"digest_type\": \"\",\n  \"keytag\": \"\",\n  \"public_key\": \"\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/domains/:domain/ds_records",
  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([
    'algorithm' => '',
    'digest' => '',
    'digest_type' => '',
    'keytag' => '',
    'public_key' => ''
  ]),
  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}}/:account/domains/:domain/ds_records', [
  'body' => '{
  "algorithm": "",
  "digest": "",
  "digest_type": "",
  "keytag": "",
  "public_key": ""
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/:account/domains/:domain/ds_records');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'algorithm' => '',
  'digest' => '',
  'digest_type' => '',
  'keytag' => '',
  'public_key' => ''
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'algorithm' => '',
  'digest' => '',
  'digest_type' => '',
  'keytag' => '',
  'public_key' => ''
]));
$request->setRequestUrl('{{baseUrl}}/:account/domains/:domain/ds_records');
$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}}/:account/domains/:domain/ds_records' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "algorithm": "",
  "digest": "",
  "digest_type": "",
  "keytag": "",
  "public_key": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/domains/:domain/ds_records' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "algorithm": "",
  "digest": "",
  "digest_type": "",
  "keytag": "",
  "public_key": ""
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"algorithm\": \"\",\n  \"digest\": \"\",\n  \"digest_type\": \"\",\n  \"keytag\": \"\",\n  \"public_key\": \"\"\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/:account/domains/:domain/ds_records", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/domains/:domain/ds_records"

payload = {
    "algorithm": "",
    "digest": "",
    "digest_type": "",
    "keytag": "",
    "public_key": ""
}
headers = {"content-type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/domains/:domain/ds_records"

payload <- "{\n  \"algorithm\": \"\",\n  \"digest\": \"\",\n  \"digest_type\": \"\",\n  \"keytag\": \"\",\n  \"public_key\": \"\"\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}}/:account/domains/:domain/ds_records")

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  \"algorithm\": \"\",\n  \"digest\": \"\",\n  \"digest_type\": \"\",\n  \"keytag\": \"\",\n  \"public_key\": \"\"\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/:account/domains/:domain/ds_records') do |req|
  req.body = "{\n  \"algorithm\": \"\",\n  \"digest\": \"\",\n  \"digest_type\": \"\",\n  \"keytag\": \"\",\n  \"public_key\": \"\"\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:account/domains/:domain/ds_records";

    let payload = json!({
        "algorithm": "",
        "digest": "",
        "digest_type": "",
        "keytag": "",
        "public_key": ""
    });

    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}}/:account/domains/:domain/ds_records \
  --header 'content-type: application/json' \
  --data '{
  "algorithm": "",
  "digest": "",
  "digest_type": "",
  "keytag": "",
  "public_key": ""
}'
echo '{
  "algorithm": "",
  "digest": "",
  "digest_type": "",
  "keytag": "",
  "public_key": ""
}' |  \
  http POST {{baseUrl}}/:account/domains/:domain/ds_records \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "algorithm": "",\n  "digest": "",\n  "digest_type": "",\n  "keytag": "",\n  "public_key": ""\n}' \
  --output-document \
  - {{baseUrl}}/:account/domains/:domain/ds_records
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [
  "algorithm": "",
  "digest": "",
  "digest_type": "",
  "keytag": "",
  "public_key": ""
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/domains/:domain/ds_records")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "id": 24,
    "domain_id": 1010,
    "algorithm": "8",
    "digest": "C1F6E04A5A61FBF65BF9DC8294C363CF11C89E802D926BDAB79C55D27BEFA94F",
    "digest_type": "2",
    "keytag": "44620",
    "public_key": null,
    "created_at": "2017-03-03T13:49:58.000Z",
    "updated_at": "2017-03-03T13:49:58.000Z"
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "string",
  "errors": {
    "property1": {
      "field": "string",
      "errors": [
        "string"
      ]
    },
    "property2": {
      "field": "string",
      "errors": [
        "string"
      ]
    }
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Validation failed",
  "errors": {
    "address1": [
      "can't be blank"
    ],
    "city": [
      "can't be blank"
    ],
    "country": [
      "can't be blank"
    ],
    "email": [
      "can't be blank",
      "is an invalid email address"
    ],
    "first_name": [
      "can't be blank"
    ],
    "last_name": [
      "can't be blank"
    ],
    "phone": [
      "can't be blank",
      "is probably not a phone number"
    ],
    "postal_code": [
      "can't be blank"
    ],
    "state_province": [
      "can't be blank"
    ]
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Not Found"
}
GET DNSSEC status
{{baseUrl}}/:account/domains/:domain/dnssec
QUERY PARAMS

account
domain
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/domains/:domain/dnssec");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/:account/domains/:domain/dnssec")
require "http/client"

url = "{{baseUrl}}/:account/domains/:domain/dnssec"

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}}/:account/domains/:domain/dnssec"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/:account/domains/:domain/dnssec");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/domains/:domain/dnssec"

	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/:account/domains/:domain/dnssec HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/:account/domains/:domain/dnssec")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/domains/:domain/dnssec"))
    .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}}/:account/domains/:domain/dnssec")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/:account/domains/:domain/dnssec")
  .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}}/:account/domains/:domain/dnssec');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'GET',
  url: '{{baseUrl}}/:account/domains/:domain/dnssec'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/domains/:domain/dnssec';
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}}/:account/domains/:domain/dnssec',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/:account/domains/:domain/dnssec")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/:account/domains/:domain/dnssec',
  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}}/:account/domains/:domain/dnssec'
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/:account/domains/:domain/dnssec');

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}}/:account/domains/:domain/dnssec'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/domains/:domain/dnssec';
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}}/:account/domains/:domain/dnssec"]
                                                       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}}/:account/domains/:domain/dnssec" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/domains/:domain/dnssec",
  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}}/:account/domains/:domain/dnssec');

echo $response->getBody();
setUrl('{{baseUrl}}/:account/domains/:domain/dnssec');
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/:account/domains/:domain/dnssec');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/:account/domains/:domain/dnssec' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/domains/:domain/dnssec' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/:account/domains/:domain/dnssec")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/domains/:domain/dnssec"

response = requests.get(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/domains/:domain/dnssec"

response <- VERB("GET", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/:account/domains/:domain/dnssec")

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/:account/domains/:domain/dnssec') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:account/domains/:domain/dnssec";

    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}}/:account/domains/:domain/dnssec
http GET {{baseUrl}}/:account/domains/:domain/dnssec
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/:account/domains/:domain/dnssec
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/domains/:domain/dnssec")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "enabled": true,
    "created_at": "2017-02-03T17:43:22.000Z",
    "updated_at": "2017-02-03T17:43:22.000Z"
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "string",
  "errors": {
    "property1": {
      "field": "string",
      "errors": [
        "string"
      ]
    },
    "property2": {
      "field": "string",
      "errors": [
        "string"
      ]
    }
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Validation failed",
  "errors": {
    "address1": [
      "can't be blank"
    ],
    "city": [
      "can't be blank"
    ],
    "country": [
      "can't be blank"
    ],
    "email": [
      "can't be blank",
      "is an invalid email address"
    ],
    "first_name": [
      "can't be blank"
    ],
    "last_name": [
      "can't be blank"
    ],
    "phone": [
      "can't be blank",
      "is probably not a phone number"
    ],
    "postal_code": [
      "can't be blank"
    ],
    "state_province": [
      "can't be blank"
    ]
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Not Found"
}
DELETE Delete a delegation signer record
{{baseUrl}}/:account/domains/:domain/ds_records/:ds
QUERY PARAMS

account
domain
ds
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/domains/:domain/ds_records/:ds");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/delete "{{baseUrl}}/:account/domains/:domain/ds_records/:ds")
require "http/client"

url = "{{baseUrl}}/:account/domains/:domain/ds_records/:ds"

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}}/:account/domains/:domain/ds_records/:ds"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/:account/domains/:domain/ds_records/:ds");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/domains/:domain/ds_records/:ds"

	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/:account/domains/:domain/ds_records/:ds HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/:account/domains/:domain/ds_records/:ds")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/domains/:domain/ds_records/:ds"))
    .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}}/:account/domains/:domain/ds_records/:ds")
  .delete(null)
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/:account/domains/:domain/ds_records/:ds")
  .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}}/:account/domains/:domain/ds_records/:ds');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'DELETE',
  url: '{{baseUrl}}/:account/domains/:domain/ds_records/:ds'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/domains/:domain/ds_records/:ds';
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}}/:account/domains/:domain/ds_records/:ds',
  method: 'DELETE',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/:account/domains/:domain/ds_records/:ds")
  .delete(null)
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'DELETE',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/:account/domains/:domain/ds_records/:ds',
  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}}/:account/domains/:domain/ds_records/:ds'
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('DELETE', '{{baseUrl}}/:account/domains/:domain/ds_records/:ds');

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}}/:account/domains/:domain/ds_records/:ds'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/domains/:domain/ds_records/:ds';
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}}/:account/domains/:domain/ds_records/:ds"]
                                                       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}}/:account/domains/:domain/ds_records/:ds" in

Client.call `DELETE uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/domains/:domain/ds_records/:ds",
  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}}/:account/domains/:domain/ds_records/:ds');

echo $response->getBody();
setUrl('{{baseUrl}}/:account/domains/:domain/ds_records/:ds');
$request->setMethod(HTTP_METH_DELETE);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/:account/domains/:domain/ds_records/:ds');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/:account/domains/:domain/ds_records/:ds' -Method DELETE 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/domains/:domain/ds_records/:ds' -Method DELETE 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("DELETE", "/baseUrl/:account/domains/:domain/ds_records/:ds")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/domains/:domain/ds_records/:ds"

response = requests.delete(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/domains/:domain/ds_records/:ds"

response <- VERB("DELETE", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/:account/domains/:domain/ds_records/:ds")

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/:account/domains/:domain/ds_records/:ds') do |req|
end

puts response.status
puts response.body
use std::str::FromStr;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:account/domains/:domain/ds_records/:ds";

    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}}/:account/domains/:domain/ds_records/:ds
http DELETE {{baseUrl}}/:account/domains/:domain/ds_records/:ds
wget --quiet \
  --method DELETE \
  --output-document \
  - {{baseUrl}}/:account/domains/:domain/ds_records/:ds
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/domains/:domain/ds_records/:ds")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "string",
  "errors": {
    "property1": {
      "field": "string",
      "errors": [
        "string"
      ]
    },
    "property2": {
      "field": "string",
      "errors": [
        "string"
      ]
    }
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Validation failed",
  "errors": {
    "address1": [
      "can't be blank"
    ],
    "city": [
      "can't be blank"
    ],
    "country": [
      "can't be blank"
    ],
    "email": [
      "can't be blank",
      "is an invalid email address"
    ],
    "first_name": [
      "can't be blank"
    ],
    "last_name": [
      "can't be blank"
    ],
    "phone": [
      "can't be blank",
      "is probably not a phone number"
    ],
    "postal_code": [
      "can't be blank"
    ],
    "state_province": [
      "can't be blank"
    ]
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Not Found"
}
DELETE Disable DNSSEC
{{baseUrl}}/:account/domains/:domain/dnssec
QUERY PARAMS

account
domain
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/domains/:domain/dnssec");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/delete "{{baseUrl}}/:account/domains/:domain/dnssec")
require "http/client"

url = "{{baseUrl}}/:account/domains/:domain/dnssec"

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}}/:account/domains/:domain/dnssec"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/:account/domains/:domain/dnssec");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/domains/:domain/dnssec"

	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/:account/domains/:domain/dnssec HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/:account/domains/:domain/dnssec")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/domains/:domain/dnssec"))
    .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}}/:account/domains/:domain/dnssec")
  .delete(null)
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/:account/domains/:domain/dnssec")
  .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}}/:account/domains/:domain/dnssec');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'DELETE',
  url: '{{baseUrl}}/:account/domains/:domain/dnssec'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/domains/:domain/dnssec';
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}}/:account/domains/:domain/dnssec',
  method: 'DELETE',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/:account/domains/:domain/dnssec")
  .delete(null)
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'DELETE',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/:account/domains/:domain/dnssec',
  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}}/:account/domains/:domain/dnssec'
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('DELETE', '{{baseUrl}}/:account/domains/:domain/dnssec');

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}}/:account/domains/:domain/dnssec'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/domains/:domain/dnssec';
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}}/:account/domains/:domain/dnssec"]
                                                       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}}/:account/domains/:domain/dnssec" in

Client.call `DELETE uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/domains/:domain/dnssec",
  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}}/:account/domains/:domain/dnssec');

echo $response->getBody();
setUrl('{{baseUrl}}/:account/domains/:domain/dnssec');
$request->setMethod(HTTP_METH_DELETE);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/:account/domains/:domain/dnssec');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/:account/domains/:domain/dnssec' -Method DELETE 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/domains/:domain/dnssec' -Method DELETE 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("DELETE", "/baseUrl/:account/domains/:domain/dnssec")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/domains/:domain/dnssec"

response = requests.delete(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/domains/:domain/dnssec"

response <- VERB("DELETE", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/:account/domains/:domain/dnssec")

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/:account/domains/:domain/dnssec') do |req|
end

puts response.status
puts response.body
use std::str::FromStr;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:account/domains/:domain/dnssec";

    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}}/:account/domains/:domain/dnssec
http DELETE {{baseUrl}}/:account/domains/:domain/dnssec
wget --quiet \
  --method DELETE \
  --output-document \
  - {{baseUrl}}/:account/domains/:domain/dnssec
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/domains/:domain/dnssec")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "string",
  "errors": {
    "property1": {
      "field": "string",
      "errors": [
        "string"
      ]
    },
    "property2": {
      "field": "string",
      "errors": [
        "string"
      ]
    }
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Validation failed",
  "errors": {
    "address1": [
      "can't be blank"
    ],
    "city": [
      "can't be blank"
    ],
    "country": [
      "can't be blank"
    ],
    "email": [
      "can't be blank",
      "is an invalid email address"
    ],
    "first_name": [
      "can't be blank"
    ],
    "last_name": [
      "can't be blank"
    ],
    "phone": [
      "can't be blank",
      "is probably not a phone number"
    ],
    "postal_code": [
      "can't be blank"
    ],
    "state_province": [
      "can't be blank"
    ]
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Not Found"
}
POST Enable DNSSEC
{{baseUrl}}/:account/domains/:domain/dnssec
QUERY PARAMS

account
domain
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/domains/:domain/dnssec");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/:account/domains/:domain/dnssec")
require "http/client"

url = "{{baseUrl}}/:account/domains/:domain/dnssec"

response = HTTP::Client.post url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Post,
    RequestUri = new Uri("{{baseUrl}}/:account/domains/:domain/dnssec"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/:account/domains/:domain/dnssec");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/domains/:domain/dnssec"

	req, _ := http.NewRequest("POST", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
POST /baseUrl/:account/domains/:domain/dnssec HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/:account/domains/:domain/dnssec")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/domains/:domain/dnssec"))
    .method("POST", 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}}/:account/domains/:domain/dnssec")
  .post(null)
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/:account/domains/:domain/dnssec")
  .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('POST', '{{baseUrl}}/:account/domains/:domain/dnssec');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/:account/domains/:domain/dnssec'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/domains/:domain/dnssec';
const options = {method: 'POST'};

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}}/:account/domains/:domain/dnssec',
  method: 'POST',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/:account/domains/:domain/dnssec")
  .post(null)
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'POST',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/:account/domains/:domain/dnssec',
  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: 'POST',
  url: '{{baseUrl}}/:account/domains/:domain/dnssec'
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('POST', '{{baseUrl}}/:account/domains/:domain/dnssec');

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}}/:account/domains/:domain/dnssec'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/domains/:domain/dnssec';
const options = {method: 'POST'};

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}}/:account/domains/:domain/dnssec"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];

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}}/:account/domains/:domain/dnssec" in

Client.call `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/domains/:domain/dnssec",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/:account/domains/:domain/dnssec');

echo $response->getBody();
setUrl('{{baseUrl}}/:account/domains/:domain/dnssec');
$request->setMethod(HTTP_METH_POST);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/:account/domains/:domain/dnssec');
$request->setRequestMethod('POST');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/:account/domains/:domain/dnssec' -Method POST 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/domains/:domain/dnssec' -Method POST 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("POST", "/baseUrl/:account/domains/:domain/dnssec")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/domains/:domain/dnssec"

response = requests.post(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/domains/:domain/dnssec"

response <- VERB("POST", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/:account/domains/:domain/dnssec")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.post('/baseUrl/:account/domains/:domain/dnssec') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:account/domains/:domain/dnssec";

    let client = reqwest::Client::new();
    let response = client.post(url)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request POST \
  --url {{baseUrl}}/:account/domains/:domain/dnssec
http POST {{baseUrl}}/:account/domains/:domain/dnssec
wget --quiet \
  --method POST \
  --output-document \
  - {{baseUrl}}/:account/domains/:domain/dnssec
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/domains/:domain/dnssec")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"

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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "enabled": true,
    "created_at": "2017-02-03T17:43:22.000Z",
    "updated_at": "2017-02-03T17:43:22.000Z"
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "string",
  "errors": {
    "property1": {
      "field": "string",
      "errors": [
        "string"
      ]
    },
    "property2": {
      "field": "string",
      "errors": [
        "string"
      ]
    }
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Validation failed",
  "errors": {
    "address1": [
      "can't be blank"
    ],
    "city": [
      "can't be blank"
    ],
    "country": [
      "can't be blank"
    ],
    "email": [
      "can't be blank",
      "is an invalid email address"
    ],
    "first_name": [
      "can't be blank"
    ],
    "last_name": [
      "can't be blank"
    ],
    "phone": [
      "can't be blank",
      "is probably not a phone number"
    ],
    "postal_code": [
      "can't be blank"
    ],
    "state_province": [
      "can't be blank"
    ]
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Not Found"
}
GET List delegation signer records
{{baseUrl}}/:account/domains/:domain/ds_records
QUERY PARAMS

account
domain
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/domains/:domain/ds_records");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/:account/domains/:domain/ds_records")
require "http/client"

url = "{{baseUrl}}/:account/domains/:domain/ds_records"

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}}/:account/domains/:domain/ds_records"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/:account/domains/:domain/ds_records");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/domains/:domain/ds_records"

	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/:account/domains/:domain/ds_records HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/:account/domains/:domain/ds_records")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/domains/:domain/ds_records"))
    .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}}/:account/domains/:domain/ds_records")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/:account/domains/:domain/ds_records")
  .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}}/:account/domains/:domain/ds_records');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'GET',
  url: '{{baseUrl}}/:account/domains/:domain/ds_records'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/domains/:domain/ds_records';
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}}/:account/domains/:domain/ds_records',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/:account/domains/:domain/ds_records")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/:account/domains/:domain/ds_records',
  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}}/:account/domains/:domain/ds_records'
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/:account/domains/:domain/ds_records');

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}}/:account/domains/:domain/ds_records'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/domains/:domain/ds_records';
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}}/:account/domains/:domain/ds_records"]
                                                       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}}/:account/domains/:domain/ds_records" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/domains/:domain/ds_records",
  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}}/:account/domains/:domain/ds_records');

echo $response->getBody();
setUrl('{{baseUrl}}/:account/domains/:domain/ds_records');
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/:account/domains/:domain/ds_records');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/:account/domains/:domain/ds_records' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/domains/:domain/ds_records' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/:account/domains/:domain/ds_records")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/domains/:domain/ds_records"

response = requests.get(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/domains/:domain/ds_records"

response <- VERB("GET", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/:account/domains/:domain/ds_records")

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/:account/domains/:domain/ds_records') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:account/domains/:domain/ds_records";

    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}}/:account/domains/:domain/ds_records
http GET {{baseUrl}}/:account/domains/:domain/ds_records
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/:account/domains/:domain/ds_records
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/domains/:domain/ds_records")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": [
    {
      "id": 24,
      "domain_id": 1010,
      "algorithm": "8",
      "digest": "C1F6E04A5A61FBF65BF9DC8294C363CF11C89E802D926BDAB79C55D27BEFA94F",
      "digest_type": "2",
      "keytag": "44620",
      "public_key": null,
      "created_at": "2017-03-03T13:49:58.000Z",
      "updated_at": "2017-03-03T13:49:58.000Z"
    }
  ],
  "pagination": {
    "current_page": 1,
    "per_page": 30,
    "total_entries": 2,
    "total_pages": 1
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "string",
  "errors": {
    "property1": {
      "field": "string",
      "errors": [
        "string"
      ]
    },
    "property2": {
      "field": "string",
      "errors": [
        "string"
      ]
    }
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Validation failed",
  "errors": {
    "address1": [
      "can't be blank"
    ],
    "city": [
      "can't be blank"
    ],
    "country": [
      "can't be blank"
    ],
    "email": [
      "can't be blank",
      "is an invalid email address"
    ],
    "first_name": [
      "can't be blank"
    ],
    "last_name": [
      "can't be blank"
    ],
    "phone": [
      "can't be blank",
      "is probably not a phone number"
    ],
    "postal_code": [
      "can't be blank"
    ],
    "state_province": [
      "can't be blank"
    ]
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Not Found"
}
GET Retrieve a delegation signer record
{{baseUrl}}/:account/domains/:domain/ds_records/:ds
QUERY PARAMS

account
domain
ds
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/domains/:domain/ds_records/:ds");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/:account/domains/:domain/ds_records/:ds")
require "http/client"

url = "{{baseUrl}}/:account/domains/:domain/ds_records/:ds"

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}}/:account/domains/:domain/ds_records/:ds"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/:account/domains/:domain/ds_records/:ds");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/domains/:domain/ds_records/:ds"

	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/:account/domains/:domain/ds_records/:ds HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/:account/domains/:domain/ds_records/:ds")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/domains/:domain/ds_records/:ds"))
    .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}}/:account/domains/:domain/ds_records/:ds")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/:account/domains/:domain/ds_records/:ds")
  .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}}/:account/domains/:domain/ds_records/:ds');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'GET',
  url: '{{baseUrl}}/:account/domains/:domain/ds_records/:ds'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/domains/:domain/ds_records/:ds';
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}}/:account/domains/:domain/ds_records/:ds',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/:account/domains/:domain/ds_records/:ds")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/:account/domains/:domain/ds_records/:ds',
  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}}/:account/domains/:domain/ds_records/:ds'
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/:account/domains/:domain/ds_records/:ds');

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}}/:account/domains/:domain/ds_records/:ds'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/domains/:domain/ds_records/:ds';
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}}/:account/domains/:domain/ds_records/:ds"]
                                                       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}}/:account/domains/:domain/ds_records/:ds" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/domains/:domain/ds_records/:ds",
  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}}/:account/domains/:domain/ds_records/:ds');

echo $response->getBody();
setUrl('{{baseUrl}}/:account/domains/:domain/ds_records/:ds');
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/:account/domains/:domain/ds_records/:ds');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/:account/domains/:domain/ds_records/:ds' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/domains/:domain/ds_records/:ds' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/:account/domains/:domain/ds_records/:ds")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/domains/:domain/ds_records/:ds"

response = requests.get(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/domains/:domain/ds_records/:ds"

response <- VERB("GET", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/:account/domains/:domain/ds_records/:ds")

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/:account/domains/:domain/ds_records/:ds') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:account/domains/:domain/ds_records/:ds";

    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}}/:account/domains/:domain/ds_records/:ds
http GET {{baseUrl}}/:account/domains/:domain/ds_records/:ds
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/:account/domains/:domain/ds_records/:ds
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/domains/:domain/ds_records/:ds")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "id": 24,
    "domain_id": 1010,
    "algorithm": "8",
    "digest": "C1F6E04A5A61FBF65BF9DC8294C363CF11C89E802D926BDAB79C55D27BEFA94F",
    "digest_type": "2",
    "keytag": "44620",
    "public_key": null,
    "created_at": "2017-03-03T13:49:58.000Z",
    "updated_at": "2017-03-03T13:49:58.000Z"
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "string",
  "errors": {
    "property1": {
      "field": "string",
      "errors": [
        "string"
      ]
    },
    "property2": {
      "field": "string",
      "errors": [
        "string"
      ]
    }
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Validation failed",
  "errors": {
    "address1": [
      "can't be blank"
    ],
    "city": [
      "can't be blank"
    ],
    "country": [
      "can't be blank"
    ],
    "email": [
      "can't be blank",
      "is an invalid email address"
    ],
    "first_name": [
      "can't be blank"
    ],
    "last_name": [
      "can't be blank"
    ],
    "phone": [
      "can't be blank",
      "is probably not a phone number"
    ],
    "postal_code": [
      "can't be blank"
    ],
    "state_province": [
      "can't be blank"
    ]
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Not Found"
}
POST Create an email forward
{{baseUrl}}/:account/domains/:domain/email_forwards
QUERY PARAMS

account
domain
BODY json

{
  "alias_name": "",
  "destination_email": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/domains/:domain/email_forwards");

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  \"alias_name\": \"\",\n  \"destination_email\": \"\"\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/:account/domains/:domain/email_forwards" {:content-type :json
                                                                                    :form-params {:alias_name ""
                                                                                                  :destination_email ""}})
require "http/client"

url = "{{baseUrl}}/:account/domains/:domain/email_forwards"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"alias_name\": \"\",\n  \"destination_email\": \"\"\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}}/:account/domains/:domain/email_forwards"),
    Content = new StringContent("{\n  \"alias_name\": \"\",\n  \"destination_email\": \"\"\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}}/:account/domains/:domain/email_forwards");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"alias_name\": \"\",\n  \"destination_email\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/domains/:domain/email_forwards"

	payload := strings.NewReader("{\n  \"alias_name\": \"\",\n  \"destination_email\": \"\"\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/:account/domains/:domain/email_forwards HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 49

{
  "alias_name": "",
  "destination_email": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/:account/domains/:domain/email_forwards")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"alias_name\": \"\",\n  \"destination_email\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/domains/:domain/email_forwards"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"alias_name\": \"\",\n  \"destination_email\": \"\"\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  \"alias_name\": \"\",\n  \"destination_email\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/:account/domains/:domain/email_forwards")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/:account/domains/:domain/email_forwards")
  .header("content-type", "application/json")
  .body("{\n  \"alias_name\": \"\",\n  \"destination_email\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  alias_name: '',
  destination_email: ''
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/:account/domains/:domain/email_forwards');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/:account/domains/:domain/email_forwards',
  headers: {'content-type': 'application/json'},
  data: {alias_name: '', destination_email: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/domains/:domain/email_forwards';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"alias_name":"","destination_email":""}'
};

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}}/:account/domains/:domain/email_forwards',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "alias_name": "",\n  "destination_email": ""\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"alias_name\": \"\",\n  \"destination_email\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/:account/domains/:domain/email_forwards")
  .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/:account/domains/:domain/email_forwards',
  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({alias_name: '', destination_email: ''}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/:account/domains/:domain/email_forwards',
  headers: {'content-type': 'application/json'},
  body: {alias_name: '', destination_email: ''},
  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}}/:account/domains/:domain/email_forwards');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  alias_name: '',
  destination_email: ''
});

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}}/:account/domains/:domain/email_forwards',
  headers: {'content-type': 'application/json'},
  data: {alias_name: '', destination_email: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/domains/:domain/email_forwards';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"alias_name":"","destination_email":""}'
};

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 = @{ @"alias_name": @"",
                              @"destination_email": @"" };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/:account/domains/:domain/email_forwards"]
                                                       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}}/:account/domains/:domain/email_forwards" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"alias_name\": \"\",\n  \"destination_email\": \"\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/domains/:domain/email_forwards",
  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([
    'alias_name' => '',
    'destination_email' => ''
  ]),
  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}}/:account/domains/:domain/email_forwards', [
  'body' => '{
  "alias_name": "",
  "destination_email": ""
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/:account/domains/:domain/email_forwards');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'alias_name' => '',
  'destination_email' => ''
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'alias_name' => '',
  'destination_email' => ''
]));
$request->setRequestUrl('{{baseUrl}}/:account/domains/:domain/email_forwards');
$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}}/:account/domains/:domain/email_forwards' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "alias_name": "",
  "destination_email": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/domains/:domain/email_forwards' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "alias_name": "",
  "destination_email": ""
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"alias_name\": \"\",\n  \"destination_email\": \"\"\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/:account/domains/:domain/email_forwards", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/domains/:domain/email_forwards"

payload = {
    "alias_name": "",
    "destination_email": ""
}
headers = {"content-type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/domains/:domain/email_forwards"

payload <- "{\n  \"alias_name\": \"\",\n  \"destination_email\": \"\"\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}}/:account/domains/:domain/email_forwards")

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  \"alias_name\": \"\",\n  \"destination_email\": \"\"\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/:account/domains/:domain/email_forwards') do |req|
  req.body = "{\n  \"alias_name\": \"\",\n  \"destination_email\": \"\"\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:account/domains/:domain/email_forwards";

    let payload = json!({
        "alias_name": "",
        "destination_email": ""
    });

    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}}/:account/domains/:domain/email_forwards \
  --header 'content-type: application/json' \
  --data '{
  "alias_name": "",
  "destination_email": ""
}'
echo '{
  "alias_name": "",
  "destination_email": ""
}' |  \
  http POST {{baseUrl}}/:account/domains/:domain/email_forwards \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "alias_name": "",\n  "destination_email": ""\n}' \
  --output-document \
  - {{baseUrl}}/:account/domains/:domain/email_forwards
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [
  "alias_name": "",
  "destination_email": ""
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/domains/:domain/email_forwards")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "id": 1,
    "domain_id": 2,
    "alias_email": "john.doe@a-domain.com",
    "destination_email": "john@example.com",
    "created_at": "2016-02-04T14:26:50Z",
    "updated_at": "2016-02-04T14:26:50Z",
    "active": true
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "string",
  "errors": {
    "property1": {
      "field": "string",
      "errors": [
        "string"
      ]
    },
    "property2": {
      "field": "string",
      "errors": [
        "string"
      ]
    }
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Validation failed",
  "errors": {
    "address1": [
      "can't be blank"
    ],
    "city": [
      "can't be blank"
    ],
    "country": [
      "can't be blank"
    ],
    "email": [
      "can't be blank",
      "is an invalid email address"
    ],
    "first_name": [
      "can't be blank"
    ],
    "last_name": [
      "can't be blank"
    ],
    "phone": [
      "can't be blank",
      "is probably not a phone number"
    ],
    "postal_code": [
      "can't be blank"
    ],
    "state_province": [
      "can't be blank"
    ]
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Not Found"
}
DELETE Delete an email forward
{{baseUrl}}/:account/domains/:domain/email_forwards/:emailforward
QUERY PARAMS

account
domain
emailforward
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/domains/:domain/email_forwards/:emailforward");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/delete "{{baseUrl}}/:account/domains/:domain/email_forwards/:emailforward")
require "http/client"

url = "{{baseUrl}}/:account/domains/:domain/email_forwards/:emailforward"

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}}/:account/domains/:domain/email_forwards/:emailforward"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/:account/domains/:domain/email_forwards/:emailforward");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/domains/:domain/email_forwards/:emailforward"

	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/:account/domains/:domain/email_forwards/:emailforward HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/:account/domains/:domain/email_forwards/:emailforward")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/domains/:domain/email_forwards/:emailforward"))
    .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}}/:account/domains/:domain/email_forwards/:emailforward")
  .delete(null)
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/:account/domains/:domain/email_forwards/:emailforward")
  .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}}/:account/domains/:domain/email_forwards/:emailforward');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'DELETE',
  url: '{{baseUrl}}/:account/domains/:domain/email_forwards/:emailforward'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/domains/:domain/email_forwards/:emailforward';
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}}/:account/domains/:domain/email_forwards/:emailforward',
  method: 'DELETE',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/:account/domains/:domain/email_forwards/:emailforward")
  .delete(null)
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'DELETE',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/:account/domains/:domain/email_forwards/:emailforward',
  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}}/:account/domains/:domain/email_forwards/:emailforward'
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('DELETE', '{{baseUrl}}/:account/domains/:domain/email_forwards/:emailforward');

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}}/:account/domains/:domain/email_forwards/:emailforward'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/domains/:domain/email_forwards/:emailforward';
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}}/:account/domains/:domain/email_forwards/:emailforward"]
                                                       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}}/:account/domains/:domain/email_forwards/:emailforward" in

Client.call `DELETE uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/domains/:domain/email_forwards/:emailforward",
  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}}/:account/domains/:domain/email_forwards/:emailforward');

echo $response->getBody();
setUrl('{{baseUrl}}/:account/domains/:domain/email_forwards/:emailforward');
$request->setMethod(HTTP_METH_DELETE);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/:account/domains/:domain/email_forwards/:emailforward');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/:account/domains/:domain/email_forwards/:emailforward' -Method DELETE 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/domains/:domain/email_forwards/:emailforward' -Method DELETE 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("DELETE", "/baseUrl/:account/domains/:domain/email_forwards/:emailforward")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/domains/:domain/email_forwards/:emailforward"

response = requests.delete(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/domains/:domain/email_forwards/:emailforward"

response <- VERB("DELETE", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/:account/domains/:domain/email_forwards/:emailforward")

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/:account/domains/:domain/email_forwards/:emailforward') do |req|
end

puts response.status
puts response.body
use std::str::FromStr;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:account/domains/:domain/email_forwards/:emailforward";

    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}}/:account/domains/:domain/email_forwards/:emailforward
http DELETE {{baseUrl}}/:account/domains/:domain/email_forwards/:emailforward
wget --quiet \
  --method DELETE \
  --output-document \
  - {{baseUrl}}/:account/domains/:domain/email_forwards/:emailforward
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/domains/:domain/email_forwards/:emailforward")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Not Found"
}
GET List email forwards
{{baseUrl}}/:account/domains/:domain/email_forwards
QUERY PARAMS

account
domain
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/domains/:domain/email_forwards");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/:account/domains/:domain/email_forwards")
require "http/client"

url = "{{baseUrl}}/:account/domains/:domain/email_forwards"

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}}/:account/domains/:domain/email_forwards"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/:account/domains/:domain/email_forwards");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/domains/:domain/email_forwards"

	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/:account/domains/:domain/email_forwards HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/:account/domains/:domain/email_forwards")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/domains/:domain/email_forwards"))
    .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}}/:account/domains/:domain/email_forwards")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/:account/domains/:domain/email_forwards")
  .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}}/:account/domains/:domain/email_forwards');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'GET',
  url: '{{baseUrl}}/:account/domains/:domain/email_forwards'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/domains/:domain/email_forwards';
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}}/:account/domains/:domain/email_forwards',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/:account/domains/:domain/email_forwards")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/:account/domains/:domain/email_forwards',
  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}}/:account/domains/:domain/email_forwards'
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/:account/domains/:domain/email_forwards');

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}}/:account/domains/:domain/email_forwards'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/domains/:domain/email_forwards';
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}}/:account/domains/:domain/email_forwards"]
                                                       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}}/:account/domains/:domain/email_forwards" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/domains/:domain/email_forwards",
  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}}/:account/domains/:domain/email_forwards');

echo $response->getBody();
setUrl('{{baseUrl}}/:account/domains/:domain/email_forwards');
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/:account/domains/:domain/email_forwards');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/:account/domains/:domain/email_forwards' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/domains/:domain/email_forwards' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/:account/domains/:domain/email_forwards")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/domains/:domain/email_forwards"

response = requests.get(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/domains/:domain/email_forwards"

response <- VERB("GET", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/:account/domains/:domain/email_forwards")

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/:account/domains/:domain/email_forwards') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:account/domains/:domain/email_forwards";

    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}}/:account/domains/:domain/email_forwards
http GET {{baseUrl}}/:account/domains/:domain/email_forwards
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/:account/domains/:domain/email_forwards
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/domains/:domain/email_forwards")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": [
    {
      "id": 1,
      "domain_id": 2,
      "alias_email": "john.doe@a-domain.com",
      "destination_email": "john@example.com",
      "created_at": "2016-02-04T14:26:50Z",
      "updated_at": "2016-02-04T14:26:50Z",
      "active": true
    }
  ],
  "pagination": {
    "current_page": 1,
    "per_page": 30,
    "total_entries": 2,
    "total_pages": 1
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "string",
  "errors": {
    "property1": {
      "field": "string",
      "errors": [
        "string"
      ]
    },
    "property2": {
      "field": "string",
      "errors": [
        "string"
      ]
    }
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Validation failed",
  "errors": {
    "address1": [
      "can't be blank"
    ],
    "city": [
      "can't be blank"
    ],
    "country": [
      "can't be blank"
    ],
    "email": [
      "can't be blank",
      "is an invalid email address"
    ],
    "first_name": [
      "can't be blank"
    ],
    "last_name": [
      "can't be blank"
    ],
    "phone": [
      "can't be blank",
      "is probably not a phone number"
    ],
    "postal_code": [
      "can't be blank"
    ],
    "state_province": [
      "can't be blank"
    ]
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Not Found"
}
GET Retrieve an email forward
{{baseUrl}}/:account/domains/:domain/email_forwards/:emailforward
QUERY PARAMS

account
domain
emailforward
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/domains/:domain/email_forwards/:emailforward");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/:account/domains/:domain/email_forwards/:emailforward")
require "http/client"

url = "{{baseUrl}}/:account/domains/:domain/email_forwards/:emailforward"

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}}/:account/domains/:domain/email_forwards/:emailforward"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/:account/domains/:domain/email_forwards/:emailforward");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/domains/:domain/email_forwards/:emailforward"

	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/:account/domains/:domain/email_forwards/:emailforward HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/:account/domains/:domain/email_forwards/:emailforward")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/domains/:domain/email_forwards/:emailforward"))
    .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}}/:account/domains/:domain/email_forwards/:emailforward")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/:account/domains/:domain/email_forwards/:emailforward")
  .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}}/:account/domains/:domain/email_forwards/:emailforward');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'GET',
  url: '{{baseUrl}}/:account/domains/:domain/email_forwards/:emailforward'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/domains/:domain/email_forwards/:emailforward';
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}}/:account/domains/:domain/email_forwards/:emailforward',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/:account/domains/:domain/email_forwards/:emailforward")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/:account/domains/:domain/email_forwards/:emailforward',
  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}}/:account/domains/:domain/email_forwards/:emailforward'
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/:account/domains/:domain/email_forwards/:emailforward');

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}}/:account/domains/:domain/email_forwards/:emailforward'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/domains/:domain/email_forwards/:emailforward';
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}}/:account/domains/:domain/email_forwards/:emailforward"]
                                                       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}}/:account/domains/:domain/email_forwards/:emailforward" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/domains/:domain/email_forwards/:emailforward",
  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}}/:account/domains/:domain/email_forwards/:emailforward');

echo $response->getBody();
setUrl('{{baseUrl}}/:account/domains/:domain/email_forwards/:emailforward');
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/:account/domains/:domain/email_forwards/:emailforward');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/:account/domains/:domain/email_forwards/:emailforward' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/domains/:domain/email_forwards/:emailforward' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/:account/domains/:domain/email_forwards/:emailforward")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/domains/:domain/email_forwards/:emailforward"

response = requests.get(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/domains/:domain/email_forwards/:emailforward"

response <- VERB("GET", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/:account/domains/:domain/email_forwards/:emailforward")

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/:account/domains/:domain/email_forwards/:emailforward') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:account/domains/:domain/email_forwards/:emailforward";

    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}}/:account/domains/:domain/email_forwards/:emailforward
http GET {{baseUrl}}/:account/domains/:domain/email_forwards/:emailforward
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/:account/domains/:domain/email_forwards/:emailforward
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/domains/:domain/email_forwards/:emailforward")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "id": 1,
    "domain_id": 2,
    "alias_email": "john.doe@a-domain.com",
    "destination_email": "john@example.com",
    "created_at": "2016-02-04T14:26:50Z",
    "updated_at": "2016-02-04T14:26:50Z",
    "active": true
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "string",
  "errors": {
    "property1": {
      "field": "string",
      "errors": [
        "string"
      ]
    },
    "property2": {
      "field": "string",
      "errors": [
        "string"
      ]
    }
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Validation failed",
  "errors": {
    "address1": [
      "can't be blank"
    ],
    "city": [
      "can't be blank"
    ],
    "country": [
      "can't be blank"
    ],
    "email": [
      "can't be blank",
      "is an invalid email address"
    ],
    "first_name": [
      "can't be blank"
    ],
    "last_name": [
      "can't be blank"
    ],
    "phone": [
      "can't be blank",
      "is probably not a phone number"
    ],
    "postal_code": [
      "can't be blank"
    ],
    "state_province": [
      "can't be blank"
    ]
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Not Found"
}
POST Accept a push
{{baseUrl}}/:account/pushes/:push
QUERY PARAMS

account
push
BODY json

{
  "contact_id": 0
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/pushes/:push");

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  \"contact_id\": 0\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/:account/pushes/:push" {:content-type :json
                                                                  :form-params {:contact_id 0}})
require "http/client"

url = "{{baseUrl}}/:account/pushes/:push"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"contact_id\": 0\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}}/:account/pushes/:push"),
    Content = new StringContent("{\n  \"contact_id\": 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}}/:account/pushes/:push");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"contact_id\": 0\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/pushes/:push"

	payload := strings.NewReader("{\n  \"contact_id\": 0\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/:account/pushes/:push HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 21

{
  "contact_id": 0
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/:account/pushes/:push")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"contact_id\": 0\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/pushes/:push"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"contact_id\": 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  \"contact_id\": 0\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/:account/pushes/:push")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/:account/pushes/:push")
  .header("content-type", "application/json")
  .body("{\n  \"contact_id\": 0\n}")
  .asString();
const data = JSON.stringify({
  contact_id: 0
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/:account/pushes/:push');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/:account/pushes/:push',
  headers: {'content-type': 'application/json'},
  data: {contact_id: 0}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/pushes/:push';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"contact_id":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}}/:account/pushes/:push',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "contact_id": 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  \"contact_id\": 0\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/:account/pushes/:push")
  .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/:account/pushes/:push',
  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({contact_id: 0}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/:account/pushes/:push',
  headers: {'content-type': 'application/json'},
  body: {contact_id: 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('POST', '{{baseUrl}}/:account/pushes/:push');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  contact_id: 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: 'POST',
  url: '{{baseUrl}}/:account/pushes/:push',
  headers: {'content-type': 'application/json'},
  data: {contact_id: 0}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/pushes/:push';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"contact_id":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 = @{ @"contact_id": @0 };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/:account/pushes/:push"]
                                                       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}}/:account/pushes/:push" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"contact_id\": 0\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/pushes/:push",
  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([
    'contact_id' => 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('POST', '{{baseUrl}}/:account/pushes/:push', [
  'body' => '{
  "contact_id": 0
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/:account/pushes/:push');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'contact_id' => 0
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'contact_id' => 0
]));
$request->setRequestUrl('{{baseUrl}}/:account/pushes/:push');
$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}}/:account/pushes/:push' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "contact_id": 0
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/pushes/:push' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "contact_id": 0
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"contact_id\": 0\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/:account/pushes/:push", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/pushes/:push"

payload = { "contact_id": 0 }
headers = {"content-type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/pushes/:push"

payload <- "{\n  \"contact_id\": 0\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}}/:account/pushes/:push")

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  \"contact_id\": 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.post('/baseUrl/:account/pushes/:push') do |req|
  req.body = "{\n  \"contact_id\": 0\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:account/pushes/:push";

    let payload = json!({"contact_id": 0});

    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}}/:account/pushes/:push \
  --header 'content-type: application/json' \
  --data '{
  "contact_id": 0
}'
echo '{
  "contact_id": 0
}' |  \
  http POST {{baseUrl}}/:account/pushes/:push \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "contact_id": 0\n}' \
  --output-document \
  - {{baseUrl}}/:account/pushes/:push
import Foundation

let headers = ["content-type": "application/json"]
let parameters = ["contact_id": 0] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/pushes/:push")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "string",
  "errors": {
    "property1": {
      "field": "string",
      "errors": [
        "string"
      ]
    },
    "property2": {
      "field": "string",
      "errors": [
        "string"
      ]
    }
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Validation failed",
  "errors": {
    "address1": [
      "can't be blank"
    ],
    "city": [
      "can't be blank"
    ],
    "country": [
      "can't be blank"
    ],
    "email": [
      "can't be blank",
      "is an invalid email address"
    ],
    "first_name": [
      "can't be blank"
    ],
    "last_name": [
      "can't be blank"
    ],
    "phone": [
      "can't be blank",
      "is probably not a phone number"
    ],
    "postal_code": [
      "can't be blank"
    ],
    "state_province": [
      "can't be blank"
    ]
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Not Found"
}
POST Initiate a push
{{baseUrl}}/:account/domains/:domain/pushes
QUERY PARAMS

account
domain
BODY json

{
  "new_account_email": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/domains/:domain/pushes");

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  \"new_account_email\": \"\"\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/:account/domains/:domain/pushes" {:content-type :json
                                                                            :form-params {:new_account_email ""}})
require "http/client"

url = "{{baseUrl}}/:account/domains/:domain/pushes"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"new_account_email\": \"\"\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}}/:account/domains/:domain/pushes"),
    Content = new StringContent("{\n  \"new_account_email\": \"\"\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}}/:account/domains/:domain/pushes");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"new_account_email\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/domains/:domain/pushes"

	payload := strings.NewReader("{\n  \"new_account_email\": \"\"\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/:account/domains/:domain/pushes HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 29

{
  "new_account_email": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/:account/domains/:domain/pushes")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"new_account_email\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/domains/:domain/pushes"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"new_account_email\": \"\"\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  \"new_account_email\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/:account/domains/:domain/pushes")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/:account/domains/:domain/pushes")
  .header("content-type", "application/json")
  .body("{\n  \"new_account_email\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  new_account_email: ''
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/:account/domains/:domain/pushes');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/:account/domains/:domain/pushes',
  headers: {'content-type': 'application/json'},
  data: {new_account_email: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/domains/:domain/pushes';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"new_account_email":""}'
};

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}}/:account/domains/:domain/pushes',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "new_account_email": ""\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"new_account_email\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/:account/domains/:domain/pushes")
  .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/:account/domains/:domain/pushes',
  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({new_account_email: ''}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/:account/domains/:domain/pushes',
  headers: {'content-type': 'application/json'},
  body: {new_account_email: ''},
  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}}/:account/domains/:domain/pushes');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  new_account_email: ''
});

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}}/:account/domains/:domain/pushes',
  headers: {'content-type': 'application/json'},
  data: {new_account_email: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/domains/:domain/pushes';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"new_account_email":""}'
};

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 = @{ @"new_account_email": @"" };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/:account/domains/:domain/pushes"]
                                                       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}}/:account/domains/:domain/pushes" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"new_account_email\": \"\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/domains/:domain/pushes",
  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([
    'new_account_email' => ''
  ]),
  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}}/:account/domains/:domain/pushes', [
  'body' => '{
  "new_account_email": ""
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/:account/domains/:domain/pushes');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'new_account_email' => ''
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'new_account_email' => ''
]));
$request->setRequestUrl('{{baseUrl}}/:account/domains/:domain/pushes');
$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}}/:account/domains/:domain/pushes' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "new_account_email": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/domains/:domain/pushes' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "new_account_email": ""
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"new_account_email\": \"\"\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/:account/domains/:domain/pushes", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/domains/:domain/pushes"

payload = { "new_account_email": "" }
headers = {"content-type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/domains/:domain/pushes"

payload <- "{\n  \"new_account_email\": \"\"\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}}/:account/domains/:domain/pushes")

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  \"new_account_email\": \"\"\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/:account/domains/:domain/pushes') do |req|
  req.body = "{\n  \"new_account_email\": \"\"\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:account/domains/:domain/pushes";

    let payload = json!({"new_account_email": ""});

    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}}/:account/domains/:domain/pushes \
  --header 'content-type: application/json' \
  --data '{
  "new_account_email": ""
}'
echo '{
  "new_account_email": ""
}' |  \
  http POST {{baseUrl}}/:account/domains/:domain/pushes \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "new_account_email": ""\n}' \
  --output-document \
  - {{baseUrl}}/:account/domains/:domain/pushes
import Foundation

let headers = ["content-type": "application/json"]
let parameters = ["new_account_email": ""] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/domains/:domain/pushes")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "id": 1,
    "domain_id": 100,
    "contact_id": 2,
    "account_id": 2020,
    "created_at": "2016-08-11T10:16:03Z",
    "updated_at": "2016-08-11T10:16:03Z",
    "accepted_at": null
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "string",
  "errors": {
    "property1": {
      "field": "string",
      "errors": [
        "string"
      ]
    },
    "property2": {
      "field": "string",
      "errors": [
        "string"
      ]
    }
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Validation failed",
  "errors": {
    "address1": [
      "can't be blank"
    ],
    "city": [
      "can't be blank"
    ],
    "country": [
      "can't be blank"
    ],
    "email": [
      "can't be blank",
      "is an invalid email address"
    ],
    "first_name": [
      "can't be blank"
    ],
    "last_name": [
      "can't be blank"
    ],
    "phone": [
      "can't be blank",
      "is probably not a phone number"
    ],
    "postal_code": [
      "can't be blank"
    ],
    "state_province": [
      "can't be blank"
    ]
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Not Found"
}
GET List pushes
{{baseUrl}}/:account/pushes
QUERY PARAMS

account
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/pushes");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/:account/pushes")
require "http/client"

url = "{{baseUrl}}/:account/pushes"

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}}/:account/pushes"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/:account/pushes");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/pushes"

	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/:account/pushes HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/:account/pushes")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/pushes"))
    .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}}/:account/pushes")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/:account/pushes")
  .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}}/:account/pushes');

xhr.send(data);
import axios from 'axios';

const options = {method: 'GET', url: '{{baseUrl}}/:account/pushes'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/pushes';
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}}/:account/pushes',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/:account/pushes")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/:account/pushes',
  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}}/:account/pushes'};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/:account/pushes');

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}}/:account/pushes'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/pushes';
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}}/:account/pushes"]
                                                       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}}/:account/pushes" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/pushes",
  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}}/:account/pushes');

echo $response->getBody();
setUrl('{{baseUrl}}/:account/pushes');
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/:account/pushes');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/:account/pushes' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/pushes' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/:account/pushes")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/pushes"

response = requests.get(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/pushes"

response <- VERB("GET", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/:account/pushes")

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/:account/pushes') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:account/pushes";

    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}}/:account/pushes
http GET {{baseUrl}}/:account/pushes
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/:account/pushes
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/pushes")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": [
    {
      "id": 1,
      "domain_id": 100,
      "contact_id": 2,
      "account_id": 2020,
      "created_at": "2016-08-11T10:16:03Z",
      "updated_at": "2016-08-11T10:16:03Z",
      "accepted_at": null
    }
  ],
  "pagination": {
    "current_page": 1,
    "per_page": 30,
    "total_entries": 2,
    "total_pages": 1
  }
}
DELETE Reject a push
{{baseUrl}}/:account/pushes/:push
QUERY PARAMS

account
push
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/pushes/:push");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/delete "{{baseUrl}}/:account/pushes/:push")
require "http/client"

url = "{{baseUrl}}/:account/pushes/:push"

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}}/:account/pushes/:push"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/:account/pushes/:push");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/pushes/:push"

	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/:account/pushes/:push HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/:account/pushes/:push")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/pushes/:push"))
    .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}}/:account/pushes/:push")
  .delete(null)
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/:account/pushes/:push")
  .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}}/:account/pushes/:push');

xhr.send(data);
import axios from 'axios';

const options = {method: 'DELETE', url: '{{baseUrl}}/:account/pushes/:push'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/pushes/:push';
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}}/:account/pushes/:push',
  method: 'DELETE',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/:account/pushes/:push")
  .delete(null)
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'DELETE',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/:account/pushes/:push',
  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}}/:account/pushes/:push'};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('DELETE', '{{baseUrl}}/:account/pushes/:push');

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}}/:account/pushes/:push'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/pushes/:push';
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}}/:account/pushes/:push"]
                                                       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}}/:account/pushes/:push" in

Client.call `DELETE uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/pushes/:push",
  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}}/:account/pushes/:push');

echo $response->getBody();
setUrl('{{baseUrl}}/:account/pushes/:push');
$request->setMethod(HTTP_METH_DELETE);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/:account/pushes/:push');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/:account/pushes/:push' -Method DELETE 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/pushes/:push' -Method DELETE 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("DELETE", "/baseUrl/:account/pushes/:push")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/pushes/:push"

response = requests.delete(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/pushes/:push"

response <- VERB("DELETE", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/:account/pushes/:push")

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/:account/pushes/:push') do |req|
end

puts response.status
puts response.body
use std::str::FromStr;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:account/pushes/:push";

    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}}/:account/pushes/:push
http DELETE {{baseUrl}}/:account/pushes/:push
wget --quiet \
  --method DELETE \
  --output-document \
  - {{baseUrl}}/:account/pushes/:push
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/pushes/:push")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "string",
  "errors": {
    "property1": {
      "field": "string",
      "errors": [
        "string"
      ]
    },
    "property2": {
      "field": "string",
      "errors": [
        "string"
      ]
    }
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Validation failed",
  "errors": {
    "address1": [
      "can't be blank"
    ],
    "city": [
      "can't be blank"
    ],
    "country": [
      "can't be blank"
    ],
    "email": [
      "can't be blank",
      "is an invalid email address"
    ],
    "first_name": [
      "can't be blank"
    ],
    "last_name": [
      "can't be blank"
    ],
    "phone": [
      "can't be blank",
      "is probably not a phone number"
    ],
    "postal_code": [
      "can't be blank"
    ],
    "state_province": [
      "can't be blank"
    ]
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Not Found"
}
POST Apply a service
{{baseUrl}}/:account/domains/:domain/services/:service
QUERY PARAMS

account
domain
service
BODY json

{}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/domains/:domain/services/:service");

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, "{}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/:account/domains/:domain/services/:service" {:content-type :json})
require "http/client"

url = "{{baseUrl}}/:account/domains/:domain/services/:service"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{}"

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}}/:account/domains/:domain/services/:service"),
    Content = new StringContent("{}")
    {
        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}}/:account/domains/:domain/services/:service");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/domains/:domain/services/:service"

	payload := strings.NewReader("{}")

	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/:account/domains/:domain/services/:service HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 2

{}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/:account/domains/:domain/services/:service")
  .setHeader("content-type", "application/json")
  .setBody("{}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/domains/:domain/services/:service"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{}"))
    .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, "{}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/:account/domains/:domain/services/:service")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/:account/domains/:domain/services/:service")
  .header("content-type", "application/json")
  .body("{}")
  .asString();
const data = JSON.stringify({});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/:account/domains/:domain/services/:service');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/:account/domains/:domain/services/:service',
  headers: {'content-type': 'application/json'},
  data: {}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/domains/:domain/services/:service';
const options = {method: 'POST', headers: {'content-type': 'application/json'}, body: '{}'};

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}}/:account/domains/:domain/services/:service',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{}")
val request = Request.Builder()
  .url("{{baseUrl}}/:account/domains/:domain/services/:service")
  .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/:account/domains/:domain/services/:service',
  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({}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/:account/domains/:domain/services/:service',
  headers: {'content-type': 'application/json'},
  body: {},
  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}}/:account/domains/:domain/services/:service');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({});

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}}/:account/domains/:domain/services/:service',
  headers: {'content-type': 'application/json'},
  data: {}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/domains/:domain/services/:service';
const options = {method: 'POST', headers: {'content-type': 'application/json'}, body: '{}'};

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 = @{  };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/:account/domains/:domain/services/:service"]
                                                       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}}/:account/domains/:domain/services/:service" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/domains/:domain/services/:service",
  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([
    
  ]),
  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}}/:account/domains/:domain/services/:service', [
  'body' => '{}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/:account/domains/:domain/services/:service');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  
]));
$request->setRequestUrl('{{baseUrl}}/:account/domains/:domain/services/:service');
$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}}/:account/domains/:domain/services/:service' -Method POST -Headers $headers -ContentType 'application/json' -Body '{}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/domains/:domain/services/:service' -Method POST -Headers $headers -ContentType 'application/json' -Body '{}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/:account/domains/:domain/services/:service", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/domains/:domain/services/:service"

payload = {}
headers = {"content-type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/domains/:domain/services/:service"

payload <- "{}"

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}}/:account/domains/:domain/services/:service")

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 = "{}"

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/:account/domains/:domain/services/:service') do |req|
  req.body = "{}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:account/domains/:domain/services/:service";

    let payload = json!({});

    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}}/:account/domains/:domain/services/:service \
  --header 'content-type: application/json' \
  --data '{}'
echo '{}' |  \
  http POST {{baseUrl}}/:account/domains/:domain/services/:service \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{}' \
  --output-document \
  - {{baseUrl}}/:account/domains/:domain/services/:service
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/domains/:domain/services/:service")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "string",
  "errors": {
    "property1": {
      "field": "string",
      "errors": [
        "string"
      ]
    },
    "property2": {
      "field": "string",
      "errors": [
        "string"
      ]
    }
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Validation failed",
  "errors": {
    "address1": [
      "can't be blank"
    ],
    "city": [
      "can't be blank"
    ],
    "country": [
      "can't be blank"
    ],
    "email": [
      "can't be blank",
      "is an invalid email address"
    ],
    "first_name": [
      "can't be blank"
    ],
    "last_name": [
      "can't be blank"
    ],
    "phone": [
      "can't be blank",
      "is probably not a phone number"
    ],
    "postal_code": [
      "can't be blank"
    ],
    "state_province": [
      "can't be blank"
    ]
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Not Found"
}
GET List applied services
{{baseUrl}}/:account/domains/:domain/services
QUERY PARAMS

account
domain
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/domains/:domain/services");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/:account/domains/:domain/services")
require "http/client"

url = "{{baseUrl}}/:account/domains/:domain/services"

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}}/:account/domains/:domain/services"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/:account/domains/:domain/services");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/domains/:domain/services"

	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/:account/domains/:domain/services HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/:account/domains/:domain/services")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/domains/:domain/services"))
    .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}}/:account/domains/:domain/services")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/:account/domains/:domain/services")
  .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}}/:account/domains/:domain/services');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'GET',
  url: '{{baseUrl}}/:account/domains/:domain/services'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/domains/:domain/services';
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}}/:account/domains/:domain/services',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/:account/domains/:domain/services")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/:account/domains/:domain/services',
  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}}/:account/domains/:domain/services'
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/:account/domains/:domain/services');

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}}/:account/domains/:domain/services'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/domains/:domain/services';
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}}/:account/domains/:domain/services"]
                                                       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}}/:account/domains/:domain/services" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/domains/:domain/services",
  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}}/:account/domains/:domain/services');

echo $response->getBody();
setUrl('{{baseUrl}}/:account/domains/:domain/services');
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/:account/domains/:domain/services');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/:account/domains/:domain/services' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/domains/:domain/services' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/:account/domains/:domain/services")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/domains/:domain/services"

response = requests.get(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/domains/:domain/services"

response <- VERB("GET", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/:account/domains/:domain/services")

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/:account/domains/:domain/services') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:account/domains/:domain/services";

    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}}/:account/domains/:domain/services
http GET {{baseUrl}}/:account/domains/:domain/services
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/:account/domains/:domain/services
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/domains/:domain/services")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": [
    {
      "id": 2,
      "name": "Service 2",
      "sid": "service2",
      "description": "Second service example.",
      "setup_description": null,
      "requires_setup": true,
      "default_subdomain": null,
      "created_at": "2014-02-14T19:15:19Z",
      "updated_at": "2016-03-04T09:23:27Z",
      "settings": [
        {
          "name": "username",
          "label": "Service 2 Account Username",
          "append": ".service2.com",
          "description": "Your Service2 username is used to connect services to your account.",
          "example": "username",
          "password": false
        }
      ]
    }
  ],
  "pagination": {
    "current_page": 1,
    "per_page": 30,
    "total_entries": 2,
    "total_pages": 1
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Not Found"
}
GET List services
{{baseUrl}}/services
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/services");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/services")
require "http/client"

url = "{{baseUrl}}/services"

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}}/services"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/services");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/services"

	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/services HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/services")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/services"))
    .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}}/services")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/services")
  .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}}/services');

xhr.send(data);
import axios from 'axios';

const options = {method: 'GET', url: '{{baseUrl}}/services'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/services';
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}}/services',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/services")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/services',
  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}}/services'};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/services');

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}}/services'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/services';
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}}/services"]
                                                       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}}/services" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/services",
  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}}/services');

echo $response->getBody();
setUrl('{{baseUrl}}/services');
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/services');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/services' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/services' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/services")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/services"

response = requests.get(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/services"

response <- VERB("GET", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/services")

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/services') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/services";

    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}}/services
http GET {{baseUrl}}/services
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/services
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/services")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": [
    {
      "id": 2,
      "name": "Service 2",
      "sid": "service2",
      "description": "Second service example.",
      "setup_description": null,
      "requires_setup": true,
      "default_subdomain": null,
      "created_at": "2014-02-14T19:15:19Z",
      "updated_at": "2016-03-04T09:23:27Z",
      "settings": [
        {
          "name": "username",
          "label": "Service 2 Account Username",
          "append": ".service2.com",
          "description": "Your Service2 username is used to connect services to your account.",
          "example": "username",
          "password": false
        }
      ]
    }
  ],
  "pagination": {
    "current_page": 1,
    "per_page": 30,
    "total_entries": 2,
    "total_pages": 1
  }
}
GET Retrieve a service
{{baseUrl}}/services/:service
QUERY PARAMS

service
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/services/:service");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/services/:service")
require "http/client"

url = "{{baseUrl}}/services/:service"

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}}/services/:service"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/services/:service");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/services/:service"

	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/services/:service HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/services/:service")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/services/:service"))
    .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}}/services/:service")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/services/:service")
  .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}}/services/:service');

xhr.send(data);
import axios from 'axios';

const options = {method: 'GET', url: '{{baseUrl}}/services/:service'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/services/:service';
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}}/services/:service',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/services/:service")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/services/:service',
  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}}/services/:service'};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/services/:service');

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}}/services/:service'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/services/:service';
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}}/services/:service"]
                                                       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}}/services/:service" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/services/:service",
  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}}/services/:service');

echo $response->getBody();
setUrl('{{baseUrl}}/services/:service');
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/services/:service');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/services/:service' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/services/:service' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/services/:service")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/services/:service"

response = requests.get(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/services/:service"

response <- VERB("GET", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/services/:service")

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/services/:service') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/services/:service";

    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}}/services/:service
http GET {{baseUrl}}/services/:service
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/services/:service
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/services/:service")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "id": 2,
    "name": "Service 2",
    "sid": "service2",
    "description": "Second service example.",
    "setup_description": null,
    "requires_setup": true,
    "default_subdomain": null,
    "created_at": "2014-02-14T19:15:19Z",
    "updated_at": "2016-03-04T09:23:27Z",
    "settings": [
      {
        "name": "username",
        "label": "Service 2 Account Username",
        "append": ".service2.com",
        "description": "Your Service2 username is used to connect services to your account.",
        "example": "username",
        "password": false
      }
    ]
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Not Found"
}
DELETE Unapply a service
{{baseUrl}}/:account/domains/:domain/services/:service
QUERY PARAMS

account
domain
service
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/domains/:domain/services/:service");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/delete "{{baseUrl}}/:account/domains/:domain/services/:service")
require "http/client"

url = "{{baseUrl}}/:account/domains/:domain/services/:service"

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}}/:account/domains/:domain/services/:service"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/:account/domains/:domain/services/:service");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/domains/:domain/services/:service"

	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/:account/domains/:domain/services/:service HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/:account/domains/:domain/services/:service")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/domains/:domain/services/:service"))
    .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}}/:account/domains/:domain/services/:service")
  .delete(null)
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/:account/domains/:domain/services/:service")
  .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}}/:account/domains/:domain/services/:service');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'DELETE',
  url: '{{baseUrl}}/:account/domains/:domain/services/:service'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/domains/:domain/services/:service';
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}}/:account/domains/:domain/services/:service',
  method: 'DELETE',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/:account/domains/:domain/services/:service")
  .delete(null)
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'DELETE',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/:account/domains/:domain/services/:service',
  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}}/:account/domains/:domain/services/:service'
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('DELETE', '{{baseUrl}}/:account/domains/:domain/services/:service');

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}}/:account/domains/:domain/services/:service'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/domains/:domain/services/:service';
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}}/:account/domains/:domain/services/:service"]
                                                       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}}/:account/domains/:domain/services/:service" in

Client.call `DELETE uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/domains/:domain/services/:service",
  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}}/:account/domains/:domain/services/:service');

echo $response->getBody();
setUrl('{{baseUrl}}/:account/domains/:domain/services/:service');
$request->setMethod(HTTP_METH_DELETE);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/:account/domains/:domain/services/:service');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/:account/domains/:domain/services/:service' -Method DELETE 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/domains/:domain/services/:service' -Method DELETE 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("DELETE", "/baseUrl/:account/domains/:domain/services/:service")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/domains/:domain/services/:service"

response = requests.delete(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/domains/:domain/services/:service"

response <- VERB("DELETE", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/:account/domains/:domain/services/:service")

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/:account/domains/:domain/services/:service') do |req|
end

puts response.status
puts response.body
use std::str::FromStr;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:account/domains/:domain/services/:service";

    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}}/:account/domains/:domain/services/:service
http DELETE {{baseUrl}}/:account/domains/:domain/services/:service
wget --quiet \
  --method DELETE \
  --output-document \
  - {{baseUrl}}/:account/domains/:domain/services/:service
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/domains/:domain/services/:service")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "string",
  "errors": {
    "property1": {
      "field": "string",
      "errors": [
        "string"
      ]
    },
    "property2": {
      "field": "string",
      "errors": [
        "string"
      ]
    }
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Validation failed",
  "errors": {
    "address1": [
      "can't be blank"
    ],
    "city": [
      "can't be blank"
    ],
    "country": [
      "can't be blank"
    ],
    "email": [
      "can't be blank",
      "is an invalid email address"
    ],
    "first_name": [
      "can't be blank"
    ],
    "last_name": [
      "can't be blank"
    ],
    "phone": [
      "can't be blank",
      "is probably not a phone number"
    ],
    "postal_code": [
      "can't be blank"
    ],
    "state_province": [
      "can't be blank"
    ]
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Not Found"
}
POST Create a domain
{{baseUrl}}/:account/domains
QUERY PARAMS

account
BODY json

{
  "name": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/domains");

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  \"name\": \"\"\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/:account/domains" {:content-type :json
                                                             :form-params {:name ""}})
require "http/client"

url = "{{baseUrl}}/:account/domains"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"name\": \"\"\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}}/:account/domains"),
    Content = new StringContent("{\n  \"name\": \"\"\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}}/:account/domains");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"name\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/domains"

	payload := strings.NewReader("{\n  \"name\": \"\"\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/:account/domains HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 16

{
  "name": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/:account/domains")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"name\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/domains"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"name\": \"\"\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  \"name\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/:account/domains")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/:account/domains")
  .header("content-type", "application/json")
  .body("{\n  \"name\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  name: ''
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/:account/domains');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/:account/domains',
  headers: {'content-type': 'application/json'},
  data: {name: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/domains';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"name":""}'
};

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}}/:account/domains',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "name": ""\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"name\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/:account/domains")
  .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/:account/domains',
  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({name: ''}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/:account/domains',
  headers: {'content-type': 'application/json'},
  body: {name: ''},
  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}}/:account/domains');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  name: ''
});

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}}/:account/domains',
  headers: {'content-type': 'application/json'},
  data: {name: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/domains';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"name":""}'
};

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 = @{ @"name": @"" };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/:account/domains"]
                                                       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}}/:account/domains" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"name\": \"\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/domains",
  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([
    'name' => ''
  ]),
  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}}/:account/domains', [
  'body' => '{
  "name": ""
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/:account/domains');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'name' => ''
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'name' => ''
]));
$request->setRequestUrl('{{baseUrl}}/:account/domains');
$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}}/:account/domains' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "name": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/domains' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "name": ""
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"name\": \"\"\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/:account/domains", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/domains"

payload = { "name": "" }
headers = {"content-type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/domains"

payload <- "{\n  \"name\": \"\"\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}}/:account/domains")

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  \"name\": \"\"\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/:account/domains') do |req|
  req.body = "{\n  \"name\": \"\"\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:account/domains";

    let payload = json!({"name": ""});

    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}}/:account/domains \
  --header 'content-type: application/json' \
  --data '{
  "name": ""
}'
echo '{
  "name": ""
}' |  \
  http POST {{baseUrl}}/:account/domains \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "name": ""\n}' \
  --output-document \
  - {{baseUrl}}/:account/domains
import Foundation

let headers = ["content-type": "application/json"]
let parameters = ["name": ""] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/domains")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "id": 1,
    "account_id": 1010,
    "registrant_id": null,
    "name": "example-alpha.com",
    "unicode_name": "example-alpha.com",
    "state": "hosted",
    "auto_renew": false,
    "private_whois": false,
    "expires_at": null,
    "created_at": "2014-12-06T15:56:55Z",
    "updated_at": "2015-12-09T00:20:56Z"
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "string",
  "errors": {
    "property1": {
      "field": "string",
      "errors": [
        "string"
      ]
    },
    "property2": {
      "field": "string",
      "errors": [
        "string"
      ]
    }
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Validation failed",
  "errors": {
    "address1": [
      "can't be blank"
    ],
    "city": [
      "can't be blank"
    ],
    "country": [
      "can't be blank"
    ],
    "email": [
      "can't be blank",
      "is an invalid email address"
    ],
    "first_name": [
      "can't be blank"
    ],
    "last_name": [
      "can't be blank"
    ],
    "phone": [
      "can't be blank",
      "is probably not a phone number"
    ],
    "postal_code": [
      "can't be blank"
    ],
    "state_province": [
      "can't be blank"
    ]
  }
}
DELETE Delete a domain
{{baseUrl}}/:account/domains/:domain
QUERY PARAMS

account
domain
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/domains/:domain");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/delete "{{baseUrl}}/:account/domains/:domain")
require "http/client"

url = "{{baseUrl}}/:account/domains/:domain"

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}}/:account/domains/:domain"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/:account/domains/:domain");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/domains/:domain"

	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/:account/domains/:domain HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/:account/domains/:domain")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/domains/:domain"))
    .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}}/:account/domains/:domain")
  .delete(null)
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/:account/domains/:domain")
  .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}}/:account/domains/:domain');

xhr.send(data);
import axios from 'axios';

const options = {method: 'DELETE', url: '{{baseUrl}}/:account/domains/:domain'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/domains/:domain';
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}}/:account/domains/:domain',
  method: 'DELETE',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/:account/domains/:domain")
  .delete(null)
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'DELETE',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/:account/domains/:domain',
  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}}/:account/domains/:domain'};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('DELETE', '{{baseUrl}}/:account/domains/:domain');

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}}/:account/domains/:domain'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/domains/:domain';
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}}/:account/domains/:domain"]
                                                       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}}/:account/domains/:domain" in

Client.call `DELETE uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/domains/:domain",
  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}}/:account/domains/:domain');

echo $response->getBody();
setUrl('{{baseUrl}}/:account/domains/:domain');
$request->setMethod(HTTP_METH_DELETE);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/:account/domains/:domain');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/:account/domains/:domain' -Method DELETE 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/domains/:domain' -Method DELETE 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("DELETE", "/baseUrl/:account/domains/:domain")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/domains/:domain"

response = requests.delete(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/domains/:domain"

response <- VERB("DELETE", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/:account/domains/:domain")

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/:account/domains/:domain') do |req|
end

puts response.status
puts response.body
use std::str::FromStr;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:account/domains/:domain";

    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}}/:account/domains/:domain
http DELETE {{baseUrl}}/:account/domains/:domain
wget --quiet \
  --method DELETE \
  --output-document \
  - {{baseUrl}}/:account/domains/:domain
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/domains/:domain")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "string",
  "errors": {
    "property1": {
      "field": "string",
      "errors": [
        "string"
      ]
    },
    "property2": {
      "field": "string",
      "errors": [
        "string"
      ]
    }
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Validation failed",
  "errors": {
    "address1": [
      "can't be blank"
    ],
    "city": [
      "can't be blank"
    ],
    "country": [
      "can't be blank"
    ],
    "email": [
      "can't be blank",
      "is an invalid email address"
    ],
    "first_name": [
      "can't be blank"
    ],
    "last_name": [
      "can't be blank"
    ],
    "phone": [
      "can't be blank",
      "is probably not a phone number"
    ],
    "postal_code": [
      "can't be blank"
    ],
    "state_province": [
      "can't be blank"
    ]
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Not Found"
}
GET List domains
{{baseUrl}}/:account/domains
QUERY PARAMS

account
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/domains");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/:account/domains")
require "http/client"

url = "{{baseUrl}}/:account/domains"

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}}/:account/domains"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/:account/domains");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/domains"

	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/:account/domains HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/:account/domains")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/domains"))
    .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}}/:account/domains")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/:account/domains")
  .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}}/:account/domains');

xhr.send(data);
import axios from 'axios';

const options = {method: 'GET', url: '{{baseUrl}}/:account/domains'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/domains';
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}}/:account/domains',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/:account/domains")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/:account/domains',
  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}}/:account/domains'};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/:account/domains');

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}}/:account/domains'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/domains';
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}}/:account/domains"]
                                                       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}}/:account/domains" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/domains",
  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}}/:account/domains');

echo $response->getBody();
setUrl('{{baseUrl}}/:account/domains');
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/:account/domains');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/:account/domains' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/domains' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/:account/domains")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/domains"

response = requests.get(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/domains"

response <- VERB("GET", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/:account/domains")

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/:account/domains') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:account/domains";

    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}}/:account/domains
http GET {{baseUrl}}/:account/domains
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/:account/domains
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/domains")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": [
    {
      "id": 1,
      "account_id": 1010,
      "registrant_id": null,
      "name": "example-alpha.com",
      "unicode_name": "example-alpha.com",
      "state": "hosted",
      "auto_renew": false,
      "private_whois": false,
      "expires_at": null,
      "created_at": "2014-12-06T15:56:55Z",
      "updated_at": "2015-12-09T00:20:56Z"
    }
  ],
  "pagination": {
    "current_page": 1,
    "per_page": 30,
    "total_entries": 2,
    "total_pages": 1
  }
}
GET Retrieve a domain
{{baseUrl}}/:account/domains/:domain
QUERY PARAMS

account
domain
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/domains/:domain");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/:account/domains/:domain")
require "http/client"

url = "{{baseUrl}}/:account/domains/:domain"

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}}/:account/domains/:domain"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/:account/domains/:domain");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/domains/:domain"

	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/:account/domains/:domain HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/:account/domains/:domain")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/domains/:domain"))
    .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}}/:account/domains/:domain")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/:account/domains/:domain")
  .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}}/:account/domains/:domain');

xhr.send(data);
import axios from 'axios';

const options = {method: 'GET', url: '{{baseUrl}}/:account/domains/:domain'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/domains/:domain';
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}}/:account/domains/:domain',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/:account/domains/:domain")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/:account/domains/:domain',
  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}}/:account/domains/:domain'};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/:account/domains/:domain');

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}}/:account/domains/:domain'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/domains/:domain';
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}}/:account/domains/:domain"]
                                                       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}}/:account/domains/:domain" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/domains/:domain",
  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}}/:account/domains/:domain');

echo $response->getBody();
setUrl('{{baseUrl}}/:account/domains/:domain');
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/:account/domains/:domain');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/:account/domains/:domain' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/domains/:domain' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/:account/domains/:domain")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/domains/:domain"

response = requests.get(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/domains/:domain"

response <- VERB("GET", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/:account/domains/:domain")

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/:account/domains/:domain') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:account/domains/:domain";

    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}}/:account/domains/:domain
http GET {{baseUrl}}/:account/domains/:domain
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/:account/domains/:domain
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/domains/:domain")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "id": 1,
    "account_id": 1010,
    "registrant_id": null,
    "name": "example-alpha.com",
    "unicode_name": "example-alpha.com",
    "state": "hosted",
    "auto_renew": false,
    "private_whois": false,
    "expires_at": null,
    "created_at": "2014-12-06T15:56:55Z",
    "updated_at": "2015-12-09T00:20:56Z"
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "string",
  "errors": {
    "property1": {
      "field": "string",
      "errors": [
        "string"
      ]
    },
    "property2": {
      "field": "string",
      "errors": [
        "string"
      ]
    }
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Validation failed",
  "errors": {
    "address1": [
      "can't be blank"
    ],
    "city": [
      "can't be blank"
    ],
    "country": [
      "can't be blank"
    ],
    "email": [
      "can't be blank",
      "is an invalid email address"
    ],
    "first_name": [
      "can't be blank"
    ],
    "last_name": [
      "can't be blank"
    ],
    "phone": [
      "can't be blank",
      "is probably not a phone number"
    ],
    "postal_code": [
      "can't be blank"
    ],
    "state_province": [
      "can't be blank"
    ]
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Not Found"
}
GET Whoami
{{baseUrl}}/whoami
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/whoami");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/whoami")
require "http/client"

url = "{{baseUrl}}/whoami"

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}}/whoami"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/whoami");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/whoami"

	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/whoami HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/whoami")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/whoami"))
    .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}}/whoami")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/whoami")
  .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}}/whoami');

xhr.send(data);
import axios from 'axios';

const options = {method: 'GET', url: '{{baseUrl}}/whoami'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/whoami';
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}}/whoami',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/whoami")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/whoami',
  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}}/whoami'};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/whoami');

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}}/whoami'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/whoami';
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}}/whoami"]
                                                       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}}/whoami" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/whoami",
  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}}/whoami');

echo $response->getBody();
setUrl('{{baseUrl}}/whoami');
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/whoami');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/whoami' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/whoami' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/whoami")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/whoami"

response = requests.get(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/whoami"

response <- VERB("GET", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/whoami")

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/whoami') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/whoami";

    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}}/whoami
http GET {{baseUrl}}/whoami
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/whoami
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/whoami")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Authentication failed"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "quota exceeded"
}
DELETE Cancel a registrant change
{{baseUrl}}/:account/registrar/registrant_changes/:registrantchange
QUERY PARAMS

account
registrantchange
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/registrar/registrant_changes/:registrantchange");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/delete "{{baseUrl}}/:account/registrar/registrant_changes/:registrantchange")
require "http/client"

url = "{{baseUrl}}/:account/registrar/registrant_changes/:registrantchange"

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}}/:account/registrar/registrant_changes/:registrantchange"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/:account/registrar/registrant_changes/:registrantchange");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/registrar/registrant_changes/:registrantchange"

	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/:account/registrar/registrant_changes/:registrantchange HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/:account/registrar/registrant_changes/:registrantchange")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/registrar/registrant_changes/:registrantchange"))
    .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}}/:account/registrar/registrant_changes/:registrantchange")
  .delete(null)
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/:account/registrar/registrant_changes/:registrantchange")
  .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}}/:account/registrar/registrant_changes/:registrantchange');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'DELETE',
  url: '{{baseUrl}}/:account/registrar/registrant_changes/:registrantchange'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/registrar/registrant_changes/:registrantchange';
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}}/:account/registrar/registrant_changes/:registrantchange',
  method: 'DELETE',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/:account/registrar/registrant_changes/:registrantchange")
  .delete(null)
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'DELETE',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/:account/registrar/registrant_changes/:registrantchange',
  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}}/:account/registrar/registrant_changes/:registrantchange'
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('DELETE', '{{baseUrl}}/:account/registrar/registrant_changes/:registrantchange');

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}}/:account/registrar/registrant_changes/:registrantchange'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/registrar/registrant_changes/:registrantchange';
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}}/:account/registrar/registrant_changes/:registrantchange"]
                                                       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}}/:account/registrar/registrant_changes/:registrantchange" in

Client.call `DELETE uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/registrar/registrant_changes/:registrantchange",
  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}}/:account/registrar/registrant_changes/:registrantchange');

echo $response->getBody();
setUrl('{{baseUrl}}/:account/registrar/registrant_changes/:registrantchange');
$request->setMethod(HTTP_METH_DELETE);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/:account/registrar/registrant_changes/:registrantchange');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/:account/registrar/registrant_changes/:registrantchange' -Method DELETE 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/registrar/registrant_changes/:registrantchange' -Method DELETE 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("DELETE", "/baseUrl/:account/registrar/registrant_changes/:registrantchange")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/registrar/registrant_changes/:registrantchange"

response = requests.delete(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/registrar/registrant_changes/:registrantchange"

response <- VERB("DELETE", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/:account/registrar/registrant_changes/:registrantchange")

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/:account/registrar/registrant_changes/:registrantchange') do |req|
end

puts response.status
puts response.body
use std::str::FromStr;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:account/registrar/registrant_changes/:registrantchange";

    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}}/:account/registrar/registrant_changes/:registrantchange
http DELETE {{baseUrl}}/:account/registrar/registrant_changes/:registrantchange
wget --quiet \
  --method DELETE \
  --output-document \
  - {{baseUrl}}/:account/registrar/registrant_changes/:registrantchange
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/registrar/registrant_changes/:registrantchange")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "id": 1,
    "account_id": 1010,
    "contact_id": 2,
    "domain_id": 2,
    "state": "completed",
    "extended_attributes": {
      "x-fi-registrant-idnumber": "1234"
    },
    "registry_owner_change": false,
    "irt_lock_lifted_by": "2013-12-08",
    "created_at": "2013-11-08T17:23:15Z",
    "updated_at": "2015-01-08T21:30:50Z"
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "string",
  "errors": {
    "property1": {
      "field": "string",
      "errors": [
        "string"
      ]
    },
    "property2": {
      "field": "string",
      "errors": [
        "string"
      ]
    }
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Validation failed",
  "errors": {
    "address1": [
      "can't be blank"
    ],
    "city": [
      "can't be blank"
    ],
    "country": [
      "can't be blank"
    ],
    "email": [
      "can't be blank",
      "is an invalid email address"
    ],
    "first_name": [
      "can't be blank"
    ],
    "last_name": [
      "can't be blank"
    ],
    "phone": [
      "can't be blank",
      "is probably not a phone number"
    ],
    "postal_code": [
      "can't be blank"
    ],
    "state_province": [
      "can't be blank"
    ]
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Not Found"
}
POST Check registrant change requirements
{{baseUrl}}/:account/registrar/registrant_changes/check
QUERY PARAMS

account
BODY json

{
  "domain_id": "",
  "contact_id": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/registrar/registrant_changes/check");

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  \"domain_id\": \"\",\n  \"contact_id\": \"\"\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/:account/registrar/registrant_changes/check" {:content-type :json
                                                                                        :form-params {:domain_id ""
                                                                                                      :contact_id ""}})
require "http/client"

url = "{{baseUrl}}/:account/registrar/registrant_changes/check"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"domain_id\": \"\",\n  \"contact_id\": \"\"\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}}/:account/registrar/registrant_changes/check"),
    Content = new StringContent("{\n  \"domain_id\": \"\",\n  \"contact_id\": \"\"\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}}/:account/registrar/registrant_changes/check");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"domain_id\": \"\",\n  \"contact_id\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/registrar/registrant_changes/check"

	payload := strings.NewReader("{\n  \"domain_id\": \"\",\n  \"contact_id\": \"\"\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/:account/registrar/registrant_changes/check HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 41

{
  "domain_id": "",
  "contact_id": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/:account/registrar/registrant_changes/check")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"domain_id\": \"\",\n  \"contact_id\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/registrar/registrant_changes/check"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"domain_id\": \"\",\n  \"contact_id\": \"\"\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  \"domain_id\": \"\",\n  \"contact_id\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/:account/registrar/registrant_changes/check")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/:account/registrar/registrant_changes/check")
  .header("content-type", "application/json")
  .body("{\n  \"domain_id\": \"\",\n  \"contact_id\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  domain_id: '',
  contact_id: ''
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/:account/registrar/registrant_changes/check');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/:account/registrar/registrant_changes/check',
  headers: {'content-type': 'application/json'},
  data: {domain_id: '', contact_id: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/registrar/registrant_changes/check';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"domain_id":"","contact_id":""}'
};

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}}/:account/registrar/registrant_changes/check',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "domain_id": "",\n  "contact_id": ""\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"domain_id\": \"\",\n  \"contact_id\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/:account/registrar/registrant_changes/check")
  .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/:account/registrar/registrant_changes/check',
  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({domain_id: '', contact_id: ''}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/:account/registrar/registrant_changes/check',
  headers: {'content-type': 'application/json'},
  body: {domain_id: '', contact_id: ''},
  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}}/:account/registrar/registrant_changes/check');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  domain_id: '',
  contact_id: ''
});

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}}/:account/registrar/registrant_changes/check',
  headers: {'content-type': 'application/json'},
  data: {domain_id: '', contact_id: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/registrar/registrant_changes/check';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"domain_id":"","contact_id":""}'
};

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 = @{ @"domain_id": @"",
                              @"contact_id": @"" };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/:account/registrar/registrant_changes/check"]
                                                       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}}/:account/registrar/registrant_changes/check" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"domain_id\": \"\",\n  \"contact_id\": \"\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/registrar/registrant_changes/check",
  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([
    'domain_id' => '',
    'contact_id' => ''
  ]),
  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}}/:account/registrar/registrant_changes/check', [
  'body' => '{
  "domain_id": "",
  "contact_id": ""
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/:account/registrar/registrant_changes/check');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'domain_id' => '',
  'contact_id' => ''
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'domain_id' => '',
  'contact_id' => ''
]));
$request->setRequestUrl('{{baseUrl}}/:account/registrar/registrant_changes/check');
$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}}/:account/registrar/registrant_changes/check' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "domain_id": "",
  "contact_id": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/registrar/registrant_changes/check' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "domain_id": "",
  "contact_id": ""
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"domain_id\": \"\",\n  \"contact_id\": \"\"\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/:account/registrar/registrant_changes/check", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/registrar/registrant_changes/check"

payload = {
    "domain_id": "",
    "contact_id": ""
}
headers = {"content-type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/registrar/registrant_changes/check"

payload <- "{\n  \"domain_id\": \"\",\n  \"contact_id\": \"\"\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}}/:account/registrar/registrant_changes/check")

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  \"domain_id\": \"\",\n  \"contact_id\": \"\"\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/:account/registrar/registrant_changes/check') do |req|
  req.body = "{\n  \"domain_id\": \"\",\n  \"contact_id\": \"\"\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:account/registrar/registrant_changes/check";

    let payload = json!({
        "domain_id": "",
        "contact_id": ""
    });

    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}}/:account/registrar/registrant_changes/check \
  --header 'content-type: application/json' \
  --data '{
  "domain_id": "",
  "contact_id": ""
}'
echo '{
  "domain_id": "",
  "contact_id": ""
}' |  \
  http POST {{baseUrl}}/:account/registrar/registrant_changes/check \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "domain_id": "",\n  "contact_id": ""\n}' \
  --output-document \
  - {{baseUrl}}/:account/registrar/registrant_changes/check
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [
  "domain_id": "",
  "contact_id": ""
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/registrar/registrant_changes/check")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "contact_id": 2,
    "domain_id": 2,
    "extended_attributes": [
      {
        "name": "x-fi-registrant-birth-date",
        "title": "The registrant's birth date",
        "description": "Format is: YYYY-MM-DD.",
        "required": false,
        "options": []
      }
    ],
    "registry_owner_change": false
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "string",
  "errors": {
    "property1": {
      "field": "string",
      "errors": [
        "string"
      ]
    },
    "property2": {
      "field": "string",
      "errors": [
        "string"
      ]
    }
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Validation failed",
  "errors": {
    "address1": [
      "can't be blank"
    ],
    "city": [
      "can't be blank"
    ],
    "country": [
      "can't be blank"
    ],
    "email": [
      "can't be blank",
      "is an invalid email address"
    ],
    "first_name": [
      "can't be blank"
    ],
    "last_name": [
      "can't be blank"
    ],
    "phone": [
      "can't be blank",
      "is probably not a phone number"
    ],
    "postal_code": [
      "can't be blank"
    ],
    "state_province": [
      "can't be blank"
    ]
  }
}
GET List registrant changes
{{baseUrl}}/:account/registrar/registrant_changes
QUERY PARAMS

account
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/registrar/registrant_changes");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/:account/registrar/registrant_changes")
require "http/client"

url = "{{baseUrl}}/:account/registrar/registrant_changes"

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}}/:account/registrar/registrant_changes"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/:account/registrar/registrant_changes");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/registrar/registrant_changes"

	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/:account/registrar/registrant_changes HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/:account/registrar/registrant_changes")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/registrar/registrant_changes"))
    .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}}/:account/registrar/registrant_changes")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/:account/registrar/registrant_changes")
  .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}}/:account/registrar/registrant_changes');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'GET',
  url: '{{baseUrl}}/:account/registrar/registrant_changes'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/registrar/registrant_changes';
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}}/:account/registrar/registrant_changes',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/:account/registrar/registrant_changes")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/:account/registrar/registrant_changes',
  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}}/:account/registrar/registrant_changes'
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/:account/registrar/registrant_changes');

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}}/:account/registrar/registrant_changes'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/registrar/registrant_changes';
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}}/:account/registrar/registrant_changes"]
                                                       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}}/:account/registrar/registrant_changes" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/registrar/registrant_changes",
  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}}/:account/registrar/registrant_changes');

echo $response->getBody();
setUrl('{{baseUrl}}/:account/registrar/registrant_changes');
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/:account/registrar/registrant_changes');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/:account/registrar/registrant_changes' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/registrar/registrant_changes' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/:account/registrar/registrant_changes")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/registrar/registrant_changes"

response = requests.get(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/registrar/registrant_changes"

response <- VERB("GET", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/:account/registrar/registrant_changes")

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/:account/registrar/registrant_changes') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:account/registrar/registrant_changes";

    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}}/:account/registrar/registrant_changes
http GET {{baseUrl}}/:account/registrar/registrant_changes
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/:account/registrar/registrant_changes
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/registrar/registrant_changes")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": [
    {
      "id": 1,
      "account_id": 1010,
      "contact_id": 2,
      "domain_id": 2,
      "state": "completed",
      "extended_attributes": {
        "x-fi-registrant-idnumber": "1234"
      },
      "registry_owner_change": false,
      "irt_lock_lifted_by": "2013-12-08",
      "created_at": "2013-11-08T17:23:15Z",
      "updated_at": "2015-01-08T21:30:50Z"
    }
  ],
  "pagination": {
    "current_page": 1,
    "per_page": 30,
    "total_entries": 2,
    "total_pages": 1
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "string",
  "errors": {
    "property1": {
      "field": "string",
      "errors": [
        "string"
      ]
    },
    "property2": {
      "field": "string",
      "errors": [
        "string"
      ]
    }
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Validation failed",
  "errors": {
    "address1": [
      "can't be blank"
    ],
    "city": [
      "can't be blank"
    ],
    "country": [
      "can't be blank"
    ],
    "email": [
      "can't be blank",
      "is an invalid email address"
    ],
    "first_name": [
      "can't be blank"
    ],
    "last_name": [
      "can't be blank"
    ],
    "phone": [
      "can't be blank",
      "is probably not a phone number"
    ],
    "postal_code": [
      "can't be blank"
    ],
    "state_province": [
      "can't be blank"
    ]
  }
}
GET Retrieve a registrant change
{{baseUrl}}/:account/registrar/registrant_changes/:registrantchange
QUERY PARAMS

account
registrantchange
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/registrar/registrant_changes/:registrantchange");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/:account/registrar/registrant_changes/:registrantchange")
require "http/client"

url = "{{baseUrl}}/:account/registrar/registrant_changes/:registrantchange"

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}}/:account/registrar/registrant_changes/:registrantchange"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/:account/registrar/registrant_changes/:registrantchange");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/registrar/registrant_changes/:registrantchange"

	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/:account/registrar/registrant_changes/:registrantchange HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/:account/registrar/registrant_changes/:registrantchange")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/registrar/registrant_changes/:registrantchange"))
    .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}}/:account/registrar/registrant_changes/:registrantchange")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/:account/registrar/registrant_changes/:registrantchange")
  .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}}/:account/registrar/registrant_changes/:registrantchange');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'GET',
  url: '{{baseUrl}}/:account/registrar/registrant_changes/:registrantchange'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/registrar/registrant_changes/:registrantchange';
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}}/:account/registrar/registrant_changes/:registrantchange',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/:account/registrar/registrant_changes/:registrantchange")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/:account/registrar/registrant_changes/:registrantchange',
  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}}/:account/registrar/registrant_changes/:registrantchange'
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/:account/registrar/registrant_changes/:registrantchange');

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}}/:account/registrar/registrant_changes/:registrantchange'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/registrar/registrant_changes/:registrantchange';
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}}/:account/registrar/registrant_changes/:registrantchange"]
                                                       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}}/:account/registrar/registrant_changes/:registrantchange" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/registrar/registrant_changes/:registrantchange",
  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}}/:account/registrar/registrant_changes/:registrantchange');

echo $response->getBody();
setUrl('{{baseUrl}}/:account/registrar/registrant_changes/:registrantchange');
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/:account/registrar/registrant_changes/:registrantchange');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/:account/registrar/registrant_changes/:registrantchange' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/registrar/registrant_changes/:registrantchange' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/:account/registrar/registrant_changes/:registrantchange")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/registrar/registrant_changes/:registrantchange"

response = requests.get(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/registrar/registrant_changes/:registrantchange"

response <- VERB("GET", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/:account/registrar/registrant_changes/:registrantchange")

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/:account/registrar/registrant_changes/:registrantchange') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:account/registrar/registrant_changes/:registrantchange";

    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}}/:account/registrar/registrant_changes/:registrantchange
http GET {{baseUrl}}/:account/registrar/registrant_changes/:registrantchange
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/:account/registrar/registrant_changes/:registrantchange
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/registrar/registrant_changes/:registrantchange")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "id": 1,
    "account_id": 1010,
    "contact_id": 2,
    "domain_id": 2,
    "state": "completed",
    "extended_attributes": {
      "x-fi-registrant-idnumber": "1234"
    },
    "registry_owner_change": false,
    "irt_lock_lifted_by": "2013-12-08",
    "created_at": "2013-11-08T17:23:15Z",
    "updated_at": "2015-01-08T21:30:50Z"
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Not Found"
}
POST Start registrant change
{{baseUrl}}/:account/registrar/registrant_changes
QUERY PARAMS

account
BODY json

{
  "domain_id": "",
  "contact_id": "",
  "extended_attributes": {}
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/registrar/registrant_changes");

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  \"domain_id\": \"\",\n  \"contact_id\": \"\",\n  \"extended_attributes\": {}\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/:account/registrar/registrant_changes" {:content-type :json
                                                                                  :form-params {:domain_id ""
                                                                                                :contact_id ""
                                                                                                :extended_attributes {}}})
require "http/client"

url = "{{baseUrl}}/:account/registrar/registrant_changes"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"domain_id\": \"\",\n  \"contact_id\": \"\",\n  \"extended_attributes\": {}\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}}/:account/registrar/registrant_changes"),
    Content = new StringContent("{\n  \"domain_id\": \"\",\n  \"contact_id\": \"\",\n  \"extended_attributes\": {}\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}}/:account/registrar/registrant_changes");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"domain_id\": \"\",\n  \"contact_id\": \"\",\n  \"extended_attributes\": {}\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/registrar/registrant_changes"

	payload := strings.NewReader("{\n  \"domain_id\": \"\",\n  \"contact_id\": \"\",\n  \"extended_attributes\": {}\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/:account/registrar/registrant_changes HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 70

{
  "domain_id": "",
  "contact_id": "",
  "extended_attributes": {}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/:account/registrar/registrant_changes")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"domain_id\": \"\",\n  \"contact_id\": \"\",\n  \"extended_attributes\": {}\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/registrar/registrant_changes"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"domain_id\": \"\",\n  \"contact_id\": \"\",\n  \"extended_attributes\": {}\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  \"domain_id\": \"\",\n  \"contact_id\": \"\",\n  \"extended_attributes\": {}\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/:account/registrar/registrant_changes")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/:account/registrar/registrant_changes")
  .header("content-type", "application/json")
  .body("{\n  \"domain_id\": \"\",\n  \"contact_id\": \"\",\n  \"extended_attributes\": {}\n}")
  .asString();
const data = JSON.stringify({
  domain_id: '',
  contact_id: '',
  extended_attributes: {}
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/:account/registrar/registrant_changes');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/:account/registrar/registrant_changes',
  headers: {'content-type': 'application/json'},
  data: {domain_id: '', contact_id: '', extended_attributes: {}}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/registrar/registrant_changes';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"domain_id":"","contact_id":"","extended_attributes":{}}'
};

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}}/:account/registrar/registrant_changes',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "domain_id": "",\n  "contact_id": "",\n  "extended_attributes": {}\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"domain_id\": \"\",\n  \"contact_id\": \"\",\n  \"extended_attributes\": {}\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/:account/registrar/registrant_changes")
  .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/:account/registrar/registrant_changes',
  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({domain_id: '', contact_id: '', extended_attributes: {}}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/:account/registrar/registrant_changes',
  headers: {'content-type': 'application/json'},
  body: {domain_id: '', contact_id: '', extended_attributes: {}},
  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}}/:account/registrar/registrant_changes');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  domain_id: '',
  contact_id: '',
  extended_attributes: {}
});

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}}/:account/registrar/registrant_changes',
  headers: {'content-type': 'application/json'},
  data: {domain_id: '', contact_id: '', extended_attributes: {}}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/registrar/registrant_changes';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"domain_id":"","contact_id":"","extended_attributes":{}}'
};

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 = @{ @"domain_id": @"",
                              @"contact_id": @"",
                              @"extended_attributes": @{  } };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/:account/registrar/registrant_changes"]
                                                       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}}/:account/registrar/registrant_changes" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"domain_id\": \"\",\n  \"contact_id\": \"\",\n  \"extended_attributes\": {}\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/registrar/registrant_changes",
  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([
    'domain_id' => '',
    'contact_id' => '',
    'extended_attributes' => [
        
    ]
  ]),
  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}}/:account/registrar/registrant_changes', [
  'body' => '{
  "domain_id": "",
  "contact_id": "",
  "extended_attributes": {}
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/:account/registrar/registrant_changes');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'domain_id' => '',
  'contact_id' => '',
  'extended_attributes' => [
    
  ]
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'domain_id' => '',
  'contact_id' => '',
  'extended_attributes' => [
    
  ]
]));
$request->setRequestUrl('{{baseUrl}}/:account/registrar/registrant_changes');
$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}}/:account/registrar/registrant_changes' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "domain_id": "",
  "contact_id": "",
  "extended_attributes": {}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/registrar/registrant_changes' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "domain_id": "",
  "contact_id": "",
  "extended_attributes": {}
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"domain_id\": \"\",\n  \"contact_id\": \"\",\n  \"extended_attributes\": {}\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/:account/registrar/registrant_changes", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/registrar/registrant_changes"

payload = {
    "domain_id": "",
    "contact_id": "",
    "extended_attributes": {}
}
headers = {"content-type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/registrar/registrant_changes"

payload <- "{\n  \"domain_id\": \"\",\n  \"contact_id\": \"\",\n  \"extended_attributes\": {}\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}}/:account/registrar/registrant_changes")

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  \"domain_id\": \"\",\n  \"contact_id\": \"\",\n  \"extended_attributes\": {}\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/:account/registrar/registrant_changes') do |req|
  req.body = "{\n  \"domain_id\": \"\",\n  \"contact_id\": \"\",\n  \"extended_attributes\": {}\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:account/registrar/registrant_changes";

    let payload = json!({
        "domain_id": "",
        "contact_id": "",
        "extended_attributes": json!({})
    });

    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}}/:account/registrar/registrant_changes \
  --header 'content-type: application/json' \
  --data '{
  "domain_id": "",
  "contact_id": "",
  "extended_attributes": {}
}'
echo '{
  "domain_id": "",
  "contact_id": "",
  "extended_attributes": {}
}' |  \
  http POST {{baseUrl}}/:account/registrar/registrant_changes \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "domain_id": "",\n  "contact_id": "",\n  "extended_attributes": {}\n}' \
  --output-document \
  - {{baseUrl}}/:account/registrar/registrant_changes
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [
  "domain_id": "",
  "contact_id": "",
  "extended_attributes": []
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/registrar/registrant_changes")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "id": 1,
    "account_id": 1010,
    "contact_id": 2,
    "domain_id": 2,
    "state": "completed",
    "extended_attributes": {
      "x-fi-registrant-idnumber": "1234"
    },
    "registry_owner_change": false,
    "irt_lock_lifted_by": "2013-12-08",
    "created_at": "2013-11-08T17:23:15Z",
    "updated_at": "2015-01-08T21:30:50Z"
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "id": 1,
    "account_id": 1010,
    "contact_id": 2,
    "domain_id": 2,
    "state": "completed",
    "extended_attributes": {
      "x-fi-registrant-idnumber": "1234"
    },
    "registry_owner_change": false,
    "irt_lock_lifted_by": "2013-12-08",
    "created_at": "2013-11-08T17:23:15Z",
    "updated_at": "2015-01-08T21:30:50Z"
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "string",
  "errors": {
    "property1": {
      "field": "string",
      "errors": [
        "string"
      ]
    },
    "property2": {
      "field": "string",
      "errors": [
        "string"
      ]
    }
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Validation failed",
  "errors": {
    "address1": [
      "can't be blank"
    ],
    "city": [
      "can't be blank"
    ],
    "country": [
      "can't be blank"
    ],
    "email": [
      "can't be blank",
      "is an invalid email address"
    ],
    "first_name": [
      "can't be blank"
    ],
    "last_name": [
      "can't be blank"
    ],
    "phone": [
      "can't be blank",
      "is probably not a phone number"
    ],
    "postal_code": [
      "can't be blank"
    ],
    "state_province": [
      "can't be blank"
    ]
  }
}
POST Authorize a domain transfer out
{{baseUrl}}/:account/registrar/domains/:domain/authorize_transfer_out
QUERY PARAMS

account
domain
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/registrar/domains/:domain/authorize_transfer_out");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/:account/registrar/domains/:domain/authorize_transfer_out")
require "http/client"

url = "{{baseUrl}}/:account/registrar/domains/:domain/authorize_transfer_out"

response = HTTP::Client.post url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Post,
    RequestUri = new Uri("{{baseUrl}}/:account/registrar/domains/:domain/authorize_transfer_out"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/:account/registrar/domains/:domain/authorize_transfer_out");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/registrar/domains/:domain/authorize_transfer_out"

	req, _ := http.NewRequest("POST", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
POST /baseUrl/:account/registrar/domains/:domain/authorize_transfer_out HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/:account/registrar/domains/:domain/authorize_transfer_out")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/registrar/domains/:domain/authorize_transfer_out"))
    .method("POST", 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}}/:account/registrar/domains/:domain/authorize_transfer_out")
  .post(null)
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/:account/registrar/domains/:domain/authorize_transfer_out")
  .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('POST', '{{baseUrl}}/:account/registrar/domains/:domain/authorize_transfer_out');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/:account/registrar/domains/:domain/authorize_transfer_out'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/registrar/domains/:domain/authorize_transfer_out';
const options = {method: 'POST'};

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}}/:account/registrar/domains/:domain/authorize_transfer_out',
  method: 'POST',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/:account/registrar/domains/:domain/authorize_transfer_out")
  .post(null)
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'POST',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/:account/registrar/domains/:domain/authorize_transfer_out',
  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: 'POST',
  url: '{{baseUrl}}/:account/registrar/domains/:domain/authorize_transfer_out'
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('POST', '{{baseUrl}}/:account/registrar/domains/:domain/authorize_transfer_out');

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}}/:account/registrar/domains/:domain/authorize_transfer_out'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/registrar/domains/:domain/authorize_transfer_out';
const options = {method: 'POST'};

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}}/:account/registrar/domains/:domain/authorize_transfer_out"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];

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}}/:account/registrar/domains/:domain/authorize_transfer_out" in

Client.call `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/registrar/domains/:domain/authorize_transfer_out",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/:account/registrar/domains/:domain/authorize_transfer_out');

echo $response->getBody();
setUrl('{{baseUrl}}/:account/registrar/domains/:domain/authorize_transfer_out');
$request->setMethod(HTTP_METH_POST);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/:account/registrar/domains/:domain/authorize_transfer_out');
$request->setRequestMethod('POST');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/:account/registrar/domains/:domain/authorize_transfer_out' -Method POST 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/registrar/domains/:domain/authorize_transfer_out' -Method POST 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("POST", "/baseUrl/:account/registrar/domains/:domain/authorize_transfer_out")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/registrar/domains/:domain/authorize_transfer_out"

response = requests.post(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/registrar/domains/:domain/authorize_transfer_out"

response <- VERB("POST", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/:account/registrar/domains/:domain/authorize_transfer_out")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.post('/baseUrl/:account/registrar/domains/:domain/authorize_transfer_out') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:account/registrar/domains/:domain/authorize_transfer_out";

    let client = reqwest::Client::new();
    let response = client.post(url)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request POST \
  --url {{baseUrl}}/:account/registrar/domains/:domain/authorize_transfer_out
http POST {{baseUrl}}/:account/registrar/domains/:domain/authorize_transfer_out
wget --quiet \
  --method POST \
  --output-document \
  - {{baseUrl}}/:account/registrar/domains/:domain/authorize_transfer_out
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/registrar/domains/:domain/authorize_transfer_out")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"

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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "string",
  "errors": {
    "property1": {
      "field": "string",
      "errors": [
        "string"
      ]
    },
    "property2": {
      "field": "string",
      "errors": [
        "string"
      ]
    }
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Validation failed",
  "errors": {
    "address1": [
      "can't be blank"
    ],
    "city": [
      "can't be blank"
    ],
    "country": [
      "can't be blank"
    ],
    "email": [
      "can't be blank",
      "is an invalid email address"
    ],
    "first_name": [
      "can't be blank"
    ],
    "last_name": [
      "can't be blank"
    ],
    "phone": [
      "can't be blank",
      "is probably not a phone number"
    ],
    "postal_code": [
      "can't be blank"
    ],
    "state_province": [
      "can't be blank"
    ]
  }
}
GET Check domain
{{baseUrl}}/:account/registrar/domains/:domain/check
QUERY PARAMS

account
domain
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/registrar/domains/:domain/check");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/:account/registrar/domains/:domain/check")
require "http/client"

url = "{{baseUrl}}/:account/registrar/domains/:domain/check"

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}}/:account/registrar/domains/:domain/check"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/:account/registrar/domains/:domain/check");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/registrar/domains/:domain/check"

	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/:account/registrar/domains/:domain/check HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/:account/registrar/domains/:domain/check")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/registrar/domains/:domain/check"))
    .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}}/:account/registrar/domains/:domain/check")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/:account/registrar/domains/:domain/check")
  .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}}/:account/registrar/domains/:domain/check');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'GET',
  url: '{{baseUrl}}/:account/registrar/domains/:domain/check'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/registrar/domains/:domain/check';
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}}/:account/registrar/domains/:domain/check',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/:account/registrar/domains/:domain/check")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/:account/registrar/domains/:domain/check',
  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}}/:account/registrar/domains/:domain/check'
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/:account/registrar/domains/:domain/check');

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}}/:account/registrar/domains/:domain/check'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/registrar/domains/:domain/check';
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}}/:account/registrar/domains/:domain/check"]
                                                       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}}/:account/registrar/domains/:domain/check" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/registrar/domains/:domain/check",
  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}}/:account/registrar/domains/:domain/check');

echo $response->getBody();
setUrl('{{baseUrl}}/:account/registrar/domains/:domain/check');
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/:account/registrar/domains/:domain/check');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/:account/registrar/domains/:domain/check' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/registrar/domains/:domain/check' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/:account/registrar/domains/:domain/check")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/registrar/domains/:domain/check"

response = requests.get(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/registrar/domains/:domain/check"

response <- VERB("GET", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/:account/registrar/domains/:domain/check")

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/:account/registrar/domains/:domain/check') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:account/registrar/domains/:domain/check";

    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}}/:account/registrar/domains/:domain/check
http GET {{baseUrl}}/:account/registrar/domains/:domain/check
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/:account/registrar/domains/:domain/check
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/registrar/domains/:domain/check")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "domain": "ruby.codes",
    "available": true,
    "premium": true
  }
}
GET Get domain premium price
{{baseUrl}}/:account/registrar/domains/:domain/premium_price
QUERY PARAMS

account
domain
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/registrar/domains/:domain/premium_price");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/:account/registrar/domains/:domain/premium_price")
require "http/client"

url = "{{baseUrl}}/:account/registrar/domains/:domain/premium_price"

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}}/:account/registrar/domains/:domain/premium_price"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/:account/registrar/domains/:domain/premium_price");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/registrar/domains/:domain/premium_price"

	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/:account/registrar/domains/:domain/premium_price HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/:account/registrar/domains/:domain/premium_price")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/registrar/domains/:domain/premium_price"))
    .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}}/:account/registrar/domains/:domain/premium_price")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/:account/registrar/domains/:domain/premium_price")
  .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}}/:account/registrar/domains/:domain/premium_price');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'GET',
  url: '{{baseUrl}}/:account/registrar/domains/:domain/premium_price'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/registrar/domains/:domain/premium_price';
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}}/:account/registrar/domains/:domain/premium_price',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/:account/registrar/domains/:domain/premium_price")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/:account/registrar/domains/:domain/premium_price',
  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}}/:account/registrar/domains/:domain/premium_price'
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/:account/registrar/domains/:domain/premium_price');

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}}/:account/registrar/domains/:domain/premium_price'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/registrar/domains/:domain/premium_price';
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}}/:account/registrar/domains/:domain/premium_price"]
                                                       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}}/:account/registrar/domains/:domain/premium_price" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/registrar/domains/:domain/premium_price",
  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}}/:account/registrar/domains/:domain/premium_price');

echo $response->getBody();
setUrl('{{baseUrl}}/:account/registrar/domains/:domain/premium_price');
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/:account/registrar/domains/:domain/premium_price');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/:account/registrar/domains/:domain/premium_price' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/registrar/domains/:domain/premium_price' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/:account/registrar/domains/:domain/premium_price")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/registrar/domains/:domain/premium_price"

response = requests.get(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/registrar/domains/:domain/premium_price"

response <- VERB("GET", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/:account/registrar/domains/:domain/premium_price")

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/:account/registrar/domains/:domain/premium_price') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:account/registrar/domains/:domain/premium_price";

    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}}/:account/registrar/domains/:domain/premium_price
http GET {{baseUrl}}/:account/registrar/domains/:domain/premium_price
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/:account/registrar/domains/:domain/premium_price
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/registrar/domains/:domain/premium_price")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "premium_price": "109.00",
    "action": "registration"
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "string",
  "errors": {
    "property1": {
      "field": "string",
      "errors": [
        "string"
      ]
    },
    "property2": {
      "field": "string",
      "errors": [
        "string"
      ]
    }
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Validation failed",
  "errors": {
    "address1": [
      "can't be blank"
    ],
    "city": [
      "can't be blank"
    ],
    "country": [
      "can't be blank"
    ],
    "email": [
      "can't be blank",
      "is an invalid email address"
    ],
    "first_name": [
      "can't be blank"
    ],
    "last_name": [
      "can't be blank"
    ],
    "phone": [
      "can't be blank",
      "is probably not a phone number"
    ],
    "postal_code": [
      "can't be blank"
    ],
    "state_province": [
      "can't be blank"
    ]
  }
}
GET Get prices for a domain
{{baseUrl}}/:account/registrar/domains/:domain/prices
QUERY PARAMS

account
domain
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/registrar/domains/:domain/prices");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/:account/registrar/domains/:domain/prices")
require "http/client"

url = "{{baseUrl}}/:account/registrar/domains/:domain/prices"

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}}/:account/registrar/domains/:domain/prices"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/:account/registrar/domains/:domain/prices");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/registrar/domains/:domain/prices"

	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/:account/registrar/domains/:domain/prices HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/:account/registrar/domains/:domain/prices")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/registrar/domains/:domain/prices"))
    .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}}/:account/registrar/domains/:domain/prices")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/:account/registrar/domains/:domain/prices")
  .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}}/:account/registrar/domains/:domain/prices');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'GET',
  url: '{{baseUrl}}/:account/registrar/domains/:domain/prices'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/registrar/domains/:domain/prices';
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}}/:account/registrar/domains/:domain/prices',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/:account/registrar/domains/:domain/prices")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/:account/registrar/domains/:domain/prices',
  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}}/:account/registrar/domains/:domain/prices'
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/:account/registrar/domains/:domain/prices');

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}}/:account/registrar/domains/:domain/prices'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/registrar/domains/:domain/prices';
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}}/:account/registrar/domains/:domain/prices"]
                                                       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}}/:account/registrar/domains/:domain/prices" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/registrar/domains/:domain/prices",
  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}}/:account/registrar/domains/:domain/prices');

echo $response->getBody();
setUrl('{{baseUrl}}/:account/registrar/domains/:domain/prices');
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/:account/registrar/domains/:domain/prices');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/:account/registrar/domains/:domain/prices' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/registrar/domains/:domain/prices' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/:account/registrar/domains/:domain/prices")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/registrar/domains/:domain/prices"

response = requests.get(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/registrar/domains/:domain/prices"

response <- VERB("GET", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/:account/registrar/domains/:domain/prices")

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/:account/registrar/domains/:domain/prices') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:account/registrar/domains/:domain/prices";

    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}}/:account/registrar/domains/:domain/prices
http GET {{baseUrl}}/:account/registrar/domains/:domain/prices
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/:account/registrar/domains/:domain/prices
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/registrar/domains/:domain/prices")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "domain": "ruby.codes",
    "premium": false,
    "registration_price": 12,
    "renewal_price": 15,
    "restore_price": 25
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "string",
  "errors": {
    "property1": {
      "field": "string",
      "errors": [
        "string"
      ]
    },
    "property2": {
      "field": "string",
      "errors": [
        "string"
      ]
    }
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Validation failed",
  "errors": {
    "address1": [
      "can't be blank"
    ],
    "city": [
      "can't be blank"
    ],
    "country": [
      "can't be blank"
    ],
    "email": [
      "can't be blank",
      "is an invalid email address"
    ],
    "first_name": [
      "can't be blank"
    ],
    "last_name": [
      "can't be blank"
    ],
    "phone": [
      "can't be blank",
      "is probably not a phone number"
    ],
    "postal_code": [
      "can't be blank"
    ],
    "state_province": [
      "can't be blank"
    ]
  }
}
POST Register a domain
{{baseUrl}}/:account/registrar/domains/:domain/registrations
QUERY PARAMS

account
domain
BODY json

{
  "registrant_id": 0,
  "whois_privacy": false,
  "auto_renew": false,
  "extended_attributes": {},
  "premium_price": "",
  "linked_provider": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/registrar/domains/:domain/registrations");

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  \"registrant_id\": 0,\n  \"whois_privacy\": false,\n  \"auto_renew\": false,\n  \"extended_attributes\": {},\n  \"premium_price\": \"\",\n  \"linked_provider\": \"\"\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/:account/registrar/domains/:domain/registrations" {:content-type :json
                                                                                             :form-params {:registrant_id 0
                                                                                                           :whois_privacy false
                                                                                                           :auto_renew false
                                                                                                           :extended_attributes {}
                                                                                                           :premium_price ""
                                                                                                           :linked_provider ""}})
require "http/client"

url = "{{baseUrl}}/:account/registrar/domains/:domain/registrations"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"registrant_id\": 0,\n  \"whois_privacy\": false,\n  \"auto_renew\": false,\n  \"extended_attributes\": {},\n  \"premium_price\": \"\",\n  \"linked_provider\": \"\"\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}}/:account/registrar/domains/:domain/registrations"),
    Content = new StringContent("{\n  \"registrant_id\": 0,\n  \"whois_privacy\": false,\n  \"auto_renew\": false,\n  \"extended_attributes\": {},\n  \"premium_price\": \"\",\n  \"linked_provider\": \"\"\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}}/:account/registrar/domains/:domain/registrations");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"registrant_id\": 0,\n  \"whois_privacy\": false,\n  \"auto_renew\": false,\n  \"extended_attributes\": {},\n  \"premium_price\": \"\",\n  \"linked_provider\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/registrar/domains/:domain/registrations"

	payload := strings.NewReader("{\n  \"registrant_id\": 0,\n  \"whois_privacy\": false,\n  \"auto_renew\": false,\n  \"extended_attributes\": {},\n  \"premium_price\": \"\",\n  \"linked_provider\": \"\"\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/:account/registrar/domains/:domain/registrations HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 150

{
  "registrant_id": 0,
  "whois_privacy": false,
  "auto_renew": false,
  "extended_attributes": {},
  "premium_price": "",
  "linked_provider": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/:account/registrar/domains/:domain/registrations")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"registrant_id\": 0,\n  \"whois_privacy\": false,\n  \"auto_renew\": false,\n  \"extended_attributes\": {},\n  \"premium_price\": \"\",\n  \"linked_provider\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/registrar/domains/:domain/registrations"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"registrant_id\": 0,\n  \"whois_privacy\": false,\n  \"auto_renew\": false,\n  \"extended_attributes\": {},\n  \"premium_price\": \"\",\n  \"linked_provider\": \"\"\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  \"registrant_id\": 0,\n  \"whois_privacy\": false,\n  \"auto_renew\": false,\n  \"extended_attributes\": {},\n  \"premium_price\": \"\",\n  \"linked_provider\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/:account/registrar/domains/:domain/registrations")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/:account/registrar/domains/:domain/registrations")
  .header("content-type", "application/json")
  .body("{\n  \"registrant_id\": 0,\n  \"whois_privacy\": false,\n  \"auto_renew\": false,\n  \"extended_attributes\": {},\n  \"premium_price\": \"\",\n  \"linked_provider\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  registrant_id: 0,
  whois_privacy: false,
  auto_renew: false,
  extended_attributes: {},
  premium_price: '',
  linked_provider: ''
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/:account/registrar/domains/:domain/registrations');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/:account/registrar/domains/:domain/registrations',
  headers: {'content-type': 'application/json'},
  data: {
    registrant_id: 0,
    whois_privacy: false,
    auto_renew: false,
    extended_attributes: {},
    premium_price: '',
    linked_provider: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/registrar/domains/:domain/registrations';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"registrant_id":0,"whois_privacy":false,"auto_renew":false,"extended_attributes":{},"premium_price":"","linked_provider":""}'
};

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}}/:account/registrar/domains/:domain/registrations',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "registrant_id": 0,\n  "whois_privacy": false,\n  "auto_renew": false,\n  "extended_attributes": {},\n  "premium_price": "",\n  "linked_provider": ""\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"registrant_id\": 0,\n  \"whois_privacy\": false,\n  \"auto_renew\": false,\n  \"extended_attributes\": {},\n  \"premium_price\": \"\",\n  \"linked_provider\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/:account/registrar/domains/:domain/registrations")
  .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/:account/registrar/domains/:domain/registrations',
  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({
  registrant_id: 0,
  whois_privacy: false,
  auto_renew: false,
  extended_attributes: {},
  premium_price: '',
  linked_provider: ''
}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/:account/registrar/domains/:domain/registrations',
  headers: {'content-type': 'application/json'},
  body: {
    registrant_id: 0,
    whois_privacy: false,
    auto_renew: false,
    extended_attributes: {},
    premium_price: '',
    linked_provider: ''
  },
  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}}/:account/registrar/domains/:domain/registrations');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  registrant_id: 0,
  whois_privacy: false,
  auto_renew: false,
  extended_attributes: {},
  premium_price: '',
  linked_provider: ''
});

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}}/:account/registrar/domains/:domain/registrations',
  headers: {'content-type': 'application/json'},
  data: {
    registrant_id: 0,
    whois_privacy: false,
    auto_renew: false,
    extended_attributes: {},
    premium_price: '',
    linked_provider: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/registrar/domains/:domain/registrations';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"registrant_id":0,"whois_privacy":false,"auto_renew":false,"extended_attributes":{},"premium_price":"","linked_provider":""}'
};

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 = @{ @"registrant_id": @0,
                              @"whois_privacy": @NO,
                              @"auto_renew": @NO,
                              @"extended_attributes": @{  },
                              @"premium_price": @"",
                              @"linked_provider": @"" };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/:account/registrar/domains/:domain/registrations"]
                                                       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}}/:account/registrar/domains/:domain/registrations" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"registrant_id\": 0,\n  \"whois_privacy\": false,\n  \"auto_renew\": false,\n  \"extended_attributes\": {},\n  \"premium_price\": \"\",\n  \"linked_provider\": \"\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/registrar/domains/:domain/registrations",
  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([
    'registrant_id' => 0,
    'whois_privacy' => null,
    'auto_renew' => null,
    'extended_attributes' => [
        
    ],
    'premium_price' => '',
    'linked_provider' => ''
  ]),
  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}}/:account/registrar/domains/:domain/registrations', [
  'body' => '{
  "registrant_id": 0,
  "whois_privacy": false,
  "auto_renew": false,
  "extended_attributes": {},
  "premium_price": "",
  "linked_provider": ""
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/:account/registrar/domains/:domain/registrations');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'registrant_id' => 0,
  'whois_privacy' => null,
  'auto_renew' => null,
  'extended_attributes' => [
    
  ],
  'premium_price' => '',
  'linked_provider' => ''
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'registrant_id' => 0,
  'whois_privacy' => null,
  'auto_renew' => null,
  'extended_attributes' => [
    
  ],
  'premium_price' => '',
  'linked_provider' => ''
]));
$request->setRequestUrl('{{baseUrl}}/:account/registrar/domains/:domain/registrations');
$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}}/:account/registrar/domains/:domain/registrations' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "registrant_id": 0,
  "whois_privacy": false,
  "auto_renew": false,
  "extended_attributes": {},
  "premium_price": "",
  "linked_provider": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/registrar/domains/:domain/registrations' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "registrant_id": 0,
  "whois_privacy": false,
  "auto_renew": false,
  "extended_attributes": {},
  "premium_price": "",
  "linked_provider": ""
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"registrant_id\": 0,\n  \"whois_privacy\": false,\n  \"auto_renew\": false,\n  \"extended_attributes\": {},\n  \"premium_price\": \"\",\n  \"linked_provider\": \"\"\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/:account/registrar/domains/:domain/registrations", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/registrar/domains/:domain/registrations"

payload = {
    "registrant_id": 0,
    "whois_privacy": False,
    "auto_renew": False,
    "extended_attributes": {},
    "premium_price": "",
    "linked_provider": ""
}
headers = {"content-type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/registrar/domains/:domain/registrations"

payload <- "{\n  \"registrant_id\": 0,\n  \"whois_privacy\": false,\n  \"auto_renew\": false,\n  \"extended_attributes\": {},\n  \"premium_price\": \"\",\n  \"linked_provider\": \"\"\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}}/:account/registrar/domains/:domain/registrations")

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  \"registrant_id\": 0,\n  \"whois_privacy\": false,\n  \"auto_renew\": false,\n  \"extended_attributes\": {},\n  \"premium_price\": \"\",\n  \"linked_provider\": \"\"\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/:account/registrar/domains/:domain/registrations') do |req|
  req.body = "{\n  \"registrant_id\": 0,\n  \"whois_privacy\": false,\n  \"auto_renew\": false,\n  \"extended_attributes\": {},\n  \"premium_price\": \"\",\n  \"linked_provider\": \"\"\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:account/registrar/domains/:domain/registrations";

    let payload = json!({
        "registrant_id": 0,
        "whois_privacy": false,
        "auto_renew": false,
        "extended_attributes": json!({}),
        "premium_price": "",
        "linked_provider": ""
    });

    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}}/:account/registrar/domains/:domain/registrations \
  --header 'content-type: application/json' \
  --data '{
  "registrant_id": 0,
  "whois_privacy": false,
  "auto_renew": false,
  "extended_attributes": {},
  "premium_price": "",
  "linked_provider": ""
}'
echo '{
  "registrant_id": 0,
  "whois_privacy": false,
  "auto_renew": false,
  "extended_attributes": {},
  "premium_price": "",
  "linked_provider": ""
}' |  \
  http POST {{baseUrl}}/:account/registrar/domains/:domain/registrations \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "registrant_id": 0,\n  "whois_privacy": false,\n  "auto_renew": false,\n  "extended_attributes": {},\n  "premium_price": "",\n  "linked_provider": ""\n}' \
  --output-document \
  - {{baseUrl}}/:account/registrar/domains/:domain/registrations
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [
  "registrant_id": 0,
  "whois_privacy": false,
  "auto_renew": false,
  "extended_attributes": [],
  "premium_price": "",
  "linked_provider": ""
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/registrar/domains/:domain/registrations")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "id": 1,
    "domain_id": 999,
    "registrant_id": 2,
    "period": 1,
    "state": "new",
    "auto_renew": false,
    "whois_privacy": false,
    "created_at": "2016-12-09T19:35:31Z",
    "updated_at": "2016-12-09T19:35:31Z"
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "string",
  "errors": {
    "property1": {
      "field": "string",
      "errors": [
        "string"
      ]
    },
    "property2": {
      "field": "string",
      "errors": [
        "string"
      ]
    }
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Validation failed",
  "errors": {
    "address1": [
      "can't be blank"
    ],
    "city": [
      "can't be blank"
    ],
    "country": [
      "can't be blank"
    ],
    "email": [
      "can't be blank",
      "is an invalid email address"
    ],
    "first_name": [
      "can't be blank"
    ],
    "last_name": [
      "can't be blank"
    ],
    "phone": [
      "can't be blank",
      "is probably not a phone number"
    ],
    "postal_code": [
      "can't be blank"
    ],
    "state_province": [
      "can't be blank"
    ]
  }
}
POST Transfer a domain
{{baseUrl}}/:account/registrar/domains/:domain/transfers
QUERY PARAMS

account
domain
BODY json

{
  "registrant_id": 0,
  "auth_code": "",
  "whois_privacy": false,
  "auto_renew": false,
  "extended_attributes": {},
  "premium_price": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/registrar/domains/:domain/transfers");

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  \"registrant_id\": 0,\n  \"auth_code\": \"\",\n  \"whois_privacy\": false,\n  \"auto_renew\": false,\n  \"extended_attributes\": {},\n  \"premium_price\": \"\"\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/:account/registrar/domains/:domain/transfers" {:content-type :json
                                                                                         :form-params {:registrant_id 0
                                                                                                       :auth_code ""
                                                                                                       :whois_privacy false
                                                                                                       :auto_renew false
                                                                                                       :extended_attributes {}
                                                                                                       :premium_price ""}})
require "http/client"

url = "{{baseUrl}}/:account/registrar/domains/:domain/transfers"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"registrant_id\": 0,\n  \"auth_code\": \"\",\n  \"whois_privacy\": false,\n  \"auto_renew\": false,\n  \"extended_attributes\": {},\n  \"premium_price\": \"\"\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}}/:account/registrar/domains/:domain/transfers"),
    Content = new StringContent("{\n  \"registrant_id\": 0,\n  \"auth_code\": \"\",\n  \"whois_privacy\": false,\n  \"auto_renew\": false,\n  \"extended_attributes\": {},\n  \"premium_price\": \"\"\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}}/:account/registrar/domains/:domain/transfers");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"registrant_id\": 0,\n  \"auth_code\": \"\",\n  \"whois_privacy\": false,\n  \"auto_renew\": false,\n  \"extended_attributes\": {},\n  \"premium_price\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/registrar/domains/:domain/transfers"

	payload := strings.NewReader("{\n  \"registrant_id\": 0,\n  \"auth_code\": \"\",\n  \"whois_privacy\": false,\n  \"auto_renew\": false,\n  \"extended_attributes\": {},\n  \"premium_price\": \"\"\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/:account/registrar/domains/:domain/transfers HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 144

{
  "registrant_id": 0,
  "auth_code": "",
  "whois_privacy": false,
  "auto_renew": false,
  "extended_attributes": {},
  "premium_price": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/:account/registrar/domains/:domain/transfers")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"registrant_id\": 0,\n  \"auth_code\": \"\",\n  \"whois_privacy\": false,\n  \"auto_renew\": false,\n  \"extended_attributes\": {},\n  \"premium_price\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/registrar/domains/:domain/transfers"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"registrant_id\": 0,\n  \"auth_code\": \"\",\n  \"whois_privacy\": false,\n  \"auto_renew\": false,\n  \"extended_attributes\": {},\n  \"premium_price\": \"\"\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  \"registrant_id\": 0,\n  \"auth_code\": \"\",\n  \"whois_privacy\": false,\n  \"auto_renew\": false,\n  \"extended_attributes\": {},\n  \"premium_price\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/:account/registrar/domains/:domain/transfers")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/:account/registrar/domains/:domain/transfers")
  .header("content-type", "application/json")
  .body("{\n  \"registrant_id\": 0,\n  \"auth_code\": \"\",\n  \"whois_privacy\": false,\n  \"auto_renew\": false,\n  \"extended_attributes\": {},\n  \"premium_price\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  registrant_id: 0,
  auth_code: '',
  whois_privacy: false,
  auto_renew: false,
  extended_attributes: {},
  premium_price: ''
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/:account/registrar/domains/:domain/transfers');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/:account/registrar/domains/:domain/transfers',
  headers: {'content-type': 'application/json'},
  data: {
    registrant_id: 0,
    auth_code: '',
    whois_privacy: false,
    auto_renew: false,
    extended_attributes: {},
    premium_price: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/registrar/domains/:domain/transfers';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"registrant_id":0,"auth_code":"","whois_privacy":false,"auto_renew":false,"extended_attributes":{},"premium_price":""}'
};

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}}/:account/registrar/domains/:domain/transfers',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "registrant_id": 0,\n  "auth_code": "",\n  "whois_privacy": false,\n  "auto_renew": false,\n  "extended_attributes": {},\n  "premium_price": ""\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"registrant_id\": 0,\n  \"auth_code\": \"\",\n  \"whois_privacy\": false,\n  \"auto_renew\": false,\n  \"extended_attributes\": {},\n  \"premium_price\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/:account/registrar/domains/:domain/transfers")
  .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/:account/registrar/domains/:domain/transfers',
  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({
  registrant_id: 0,
  auth_code: '',
  whois_privacy: false,
  auto_renew: false,
  extended_attributes: {},
  premium_price: ''
}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/:account/registrar/domains/:domain/transfers',
  headers: {'content-type': 'application/json'},
  body: {
    registrant_id: 0,
    auth_code: '',
    whois_privacy: false,
    auto_renew: false,
    extended_attributes: {},
    premium_price: ''
  },
  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}}/:account/registrar/domains/:domain/transfers');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  registrant_id: 0,
  auth_code: '',
  whois_privacy: false,
  auto_renew: false,
  extended_attributes: {},
  premium_price: ''
});

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}}/:account/registrar/domains/:domain/transfers',
  headers: {'content-type': 'application/json'},
  data: {
    registrant_id: 0,
    auth_code: '',
    whois_privacy: false,
    auto_renew: false,
    extended_attributes: {},
    premium_price: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/registrar/domains/:domain/transfers';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"registrant_id":0,"auth_code":"","whois_privacy":false,"auto_renew":false,"extended_attributes":{},"premium_price":""}'
};

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 = @{ @"registrant_id": @0,
                              @"auth_code": @"",
                              @"whois_privacy": @NO,
                              @"auto_renew": @NO,
                              @"extended_attributes": @{  },
                              @"premium_price": @"" };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/:account/registrar/domains/:domain/transfers"]
                                                       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}}/:account/registrar/domains/:domain/transfers" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"registrant_id\": 0,\n  \"auth_code\": \"\",\n  \"whois_privacy\": false,\n  \"auto_renew\": false,\n  \"extended_attributes\": {},\n  \"premium_price\": \"\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/registrar/domains/:domain/transfers",
  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([
    'registrant_id' => 0,
    'auth_code' => '',
    'whois_privacy' => null,
    'auto_renew' => null,
    'extended_attributes' => [
        
    ],
    'premium_price' => ''
  ]),
  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}}/:account/registrar/domains/:domain/transfers', [
  'body' => '{
  "registrant_id": 0,
  "auth_code": "",
  "whois_privacy": false,
  "auto_renew": false,
  "extended_attributes": {},
  "premium_price": ""
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/:account/registrar/domains/:domain/transfers');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'registrant_id' => 0,
  'auth_code' => '',
  'whois_privacy' => null,
  'auto_renew' => null,
  'extended_attributes' => [
    
  ],
  'premium_price' => ''
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'registrant_id' => 0,
  'auth_code' => '',
  'whois_privacy' => null,
  'auto_renew' => null,
  'extended_attributes' => [
    
  ],
  'premium_price' => ''
]));
$request->setRequestUrl('{{baseUrl}}/:account/registrar/domains/:domain/transfers');
$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}}/:account/registrar/domains/:domain/transfers' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "registrant_id": 0,
  "auth_code": "",
  "whois_privacy": false,
  "auto_renew": false,
  "extended_attributes": {},
  "premium_price": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/registrar/domains/:domain/transfers' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "registrant_id": 0,
  "auth_code": "",
  "whois_privacy": false,
  "auto_renew": false,
  "extended_attributes": {},
  "premium_price": ""
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"registrant_id\": 0,\n  \"auth_code\": \"\",\n  \"whois_privacy\": false,\n  \"auto_renew\": false,\n  \"extended_attributes\": {},\n  \"premium_price\": \"\"\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/:account/registrar/domains/:domain/transfers", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/registrar/domains/:domain/transfers"

payload = {
    "registrant_id": 0,
    "auth_code": "",
    "whois_privacy": False,
    "auto_renew": False,
    "extended_attributes": {},
    "premium_price": ""
}
headers = {"content-type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/registrar/domains/:domain/transfers"

payload <- "{\n  \"registrant_id\": 0,\n  \"auth_code\": \"\",\n  \"whois_privacy\": false,\n  \"auto_renew\": false,\n  \"extended_attributes\": {},\n  \"premium_price\": \"\"\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}}/:account/registrar/domains/:domain/transfers")

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  \"registrant_id\": 0,\n  \"auth_code\": \"\",\n  \"whois_privacy\": false,\n  \"auto_renew\": false,\n  \"extended_attributes\": {},\n  \"premium_price\": \"\"\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/:account/registrar/domains/:domain/transfers') do |req|
  req.body = "{\n  \"registrant_id\": 0,\n  \"auth_code\": \"\",\n  \"whois_privacy\": false,\n  \"auto_renew\": false,\n  \"extended_attributes\": {},\n  \"premium_price\": \"\"\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:account/registrar/domains/:domain/transfers";

    let payload = json!({
        "registrant_id": 0,
        "auth_code": "",
        "whois_privacy": false,
        "auto_renew": false,
        "extended_attributes": json!({}),
        "premium_price": ""
    });

    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}}/:account/registrar/domains/:domain/transfers \
  --header 'content-type: application/json' \
  --data '{
  "registrant_id": 0,
  "auth_code": "",
  "whois_privacy": false,
  "auto_renew": false,
  "extended_attributes": {},
  "premium_price": ""
}'
echo '{
  "registrant_id": 0,
  "auth_code": "",
  "whois_privacy": false,
  "auto_renew": false,
  "extended_attributes": {},
  "premium_price": ""
}' |  \
  http POST {{baseUrl}}/:account/registrar/domains/:domain/transfers \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "registrant_id": 0,\n  "auth_code": "",\n  "whois_privacy": false,\n  "auto_renew": false,\n  "extended_attributes": {},\n  "premium_price": ""\n}' \
  --output-document \
  - {{baseUrl}}/:account/registrar/domains/:domain/transfers
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [
  "registrant_id": 0,
  "auth_code": "",
  "whois_privacy": false,
  "auto_renew": false,
  "extended_attributes": [],
  "premium_price": ""
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/registrar/domains/:domain/transfers")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "id": 1,
    "domain_id": 999,
    "registrant_id": 2,
    "state": "transferring",
    "auto_renew": false,
    "whois_privacy": false,
    "created_at": "2016-12-09T19:43:41Z",
    "updated_at": "2016-12-09T19:43:43Z"
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "string",
  "errors": {
    "property1": {
      "field": "string",
      "errors": [
        "string"
      ]
    },
    "property2": {
      "field": "string",
      "errors": [
        "string"
      ]
    }
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Validation failed",
  "errors": {
    "address1": [
      "can't be blank"
    ],
    "city": [
      "can't be blank"
    ],
    "country": [
      "can't be blank"
    ],
    "email": [
      "can't be blank",
      "is an invalid email address"
    ],
    "first_name": [
      "can't be blank"
    ],
    "last_name": [
      "can't be blank"
    ],
    "phone": [
      "can't be blank",
      "is probably not a phone number"
    ],
    "postal_code": [
      "can't be blank"
    ],
    "state_province": [
      "can't be blank"
    ]
  }
}
PUT Change domain name servers
{{baseUrl}}/:account/registrar/domains/:domain/delegation
QUERY PARAMS

account
domain
BODY json

[
  {}
]
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/registrar/domains/:domain/delegation");

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  {}\n]");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/put "{{baseUrl}}/:account/registrar/domains/:domain/delegation" {:content-type :json
                                                                                         :form-params [{}]})
require "http/client"

url = "{{baseUrl}}/:account/registrar/domains/:domain/delegation"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "[\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}}/:account/registrar/domains/:domain/delegation"),
    Content = new StringContent("[\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}}/:account/registrar/domains/:domain/delegation");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "[\n  {}\n]", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/registrar/domains/:domain/delegation"

	payload := strings.NewReader("[\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/:account/registrar/domains/:domain/delegation HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 8

[
  {}
]
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/:account/registrar/domains/:domain/delegation")
  .setHeader("content-type", "application/json")
  .setBody("[\n  {}\n]")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/registrar/domains/:domain/delegation"))
    .header("content-type", "application/json")
    .method("PUT", HttpRequest.BodyPublishers.ofString("[\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  {}\n]");
Request request = new Request.Builder()
  .url("{{baseUrl}}/:account/registrar/domains/:domain/delegation")
  .put(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/:account/registrar/domains/:domain/delegation")
  .header("content-type", "application/json")
  .body("[\n  {}\n]")
  .asString();
const data = JSON.stringify([
  {}
]);

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('PUT', '{{baseUrl}}/:account/registrar/domains/:domain/delegation');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'PUT',
  url: '{{baseUrl}}/:account/registrar/domains/:domain/delegation',
  headers: {'content-type': 'application/json'},
  data: [{}]
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/registrar/domains/:domain/delegation';
const options = {method: 'PUT', headers: {'content-type': 'application/json'}, body: '[{}]'};

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}}/:account/registrar/domains/:domain/delegation',
  method: 'PUT',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '[\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  {}\n]")
val request = Request.Builder()
  .url("{{baseUrl}}/:account/registrar/domains/:domain/delegation")
  .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/:account/registrar/domains/:domain/delegation',
  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([{}]));
req.end();
const request = require('request');

const options = {
  method: 'PUT',
  url: '{{baseUrl}}/:account/registrar/domains/:domain/delegation',
  headers: {'content-type': 'application/json'},
  body: [{}],
  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}}/:account/registrar/domains/:domain/delegation');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send([
  {}
]);

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}}/:account/registrar/domains/:domain/delegation',
  headers: {'content-type': 'application/json'},
  data: [{}]
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/registrar/domains/:domain/delegation';
const options = {method: 'PUT', headers: {'content-type': 'application/json'}, body: '[{}]'};

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 = @[ @{  } ];

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/:account/registrar/domains/:domain/delegation"]
                                                       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}}/:account/registrar/domains/:domain/delegation" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "[\n  {}\n]" in

Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/registrar/domains/:domain/delegation",
  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([
    [
        
    ]
  ]),
  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}}/:account/registrar/domains/:domain/delegation', [
  'body' => '[
  {}
]',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/:account/registrar/domains/:domain/delegation');
$request->setMethod(HTTP_METH_PUT);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  [
    
  ]
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  [
    
  ]
]));
$request->setRequestUrl('{{baseUrl}}/:account/registrar/domains/:domain/delegation');
$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}}/:account/registrar/domains/:domain/delegation' -Method PUT -Headers $headers -ContentType 'application/json' -Body '[
  {}
]'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/registrar/domains/:domain/delegation' -Method PUT -Headers $headers -ContentType 'application/json' -Body '[
  {}
]'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "[\n  {}\n]"

headers = { 'content-type': "application/json" }

conn.request("PUT", "/baseUrl/:account/registrar/domains/:domain/delegation", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/registrar/domains/:domain/delegation"

payload = [{}]
headers = {"content-type": "application/json"}

response = requests.put(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/registrar/domains/:domain/delegation"

payload <- "[\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}}/:account/registrar/domains/:domain/delegation")

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  {}\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/:account/registrar/domains/:domain/delegation') do |req|
  req.body = "[\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}}/:account/registrar/domains/:domain/delegation";

    let payload = (json!({}));

    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}}/:account/registrar/domains/:domain/delegation \
  --header 'content-type: application/json' \
  --data '[
  {}
]'
echo '[
  {}
]' |  \
  http PUT {{baseUrl}}/:account/registrar/domains/:domain/delegation \
  content-type:application/json
wget --quiet \
  --method PUT \
  --header 'content-type: application/json' \
  --body-data '[\n  {}\n]' \
  --output-document \
  - {{baseUrl}}/:account/registrar/domains/:domain/delegation
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [[]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/registrar/domains/:domain/delegation")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "string",
  "errors": {
    "property1": {
      "field": "string",
      "errors": [
        "string"
      ]
    },
    "property2": {
      "field": "string",
      "errors": [
        "string"
      ]
    }
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Validation failed",
  "errors": {
    "address1": [
      "can't be blank"
    ],
    "city": [
      "can't be blank"
    ],
    "country": [
      "can't be blank"
    ],
    "email": [
      "can't be blank",
      "is an invalid email address"
    ],
    "first_name": [
      "can't be blank"
    ],
    "last_name": [
      "can't be blank"
    ],
    "phone": [
      "can't be blank",
      "is probably not a phone number"
    ],
    "postal_code": [
      "can't be blank"
    ],
    "state_province": [
      "can't be blank"
    ]
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Not Found"
}
DELETE De-delegate from vanity name servers
{{baseUrl}}/:account/registrar/domains/:domain/delegation/vanity
QUERY PARAMS

account
domain
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/registrar/domains/:domain/delegation/vanity");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/delete "{{baseUrl}}/:account/registrar/domains/:domain/delegation/vanity")
require "http/client"

url = "{{baseUrl}}/:account/registrar/domains/:domain/delegation/vanity"

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}}/:account/registrar/domains/:domain/delegation/vanity"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/:account/registrar/domains/:domain/delegation/vanity");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/registrar/domains/:domain/delegation/vanity"

	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/:account/registrar/domains/:domain/delegation/vanity HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/:account/registrar/domains/:domain/delegation/vanity")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/registrar/domains/:domain/delegation/vanity"))
    .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}}/:account/registrar/domains/:domain/delegation/vanity")
  .delete(null)
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/:account/registrar/domains/:domain/delegation/vanity")
  .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}}/:account/registrar/domains/:domain/delegation/vanity');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'DELETE',
  url: '{{baseUrl}}/:account/registrar/domains/:domain/delegation/vanity'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/registrar/domains/:domain/delegation/vanity';
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}}/:account/registrar/domains/:domain/delegation/vanity',
  method: 'DELETE',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/:account/registrar/domains/:domain/delegation/vanity")
  .delete(null)
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'DELETE',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/:account/registrar/domains/:domain/delegation/vanity',
  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}}/:account/registrar/domains/:domain/delegation/vanity'
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('DELETE', '{{baseUrl}}/:account/registrar/domains/:domain/delegation/vanity');

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}}/:account/registrar/domains/:domain/delegation/vanity'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/registrar/domains/:domain/delegation/vanity';
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}}/:account/registrar/domains/:domain/delegation/vanity"]
                                                       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}}/:account/registrar/domains/:domain/delegation/vanity" in

Client.call `DELETE uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/registrar/domains/:domain/delegation/vanity",
  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}}/:account/registrar/domains/:domain/delegation/vanity');

echo $response->getBody();
setUrl('{{baseUrl}}/:account/registrar/domains/:domain/delegation/vanity');
$request->setMethod(HTTP_METH_DELETE);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/:account/registrar/domains/:domain/delegation/vanity');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/:account/registrar/domains/:domain/delegation/vanity' -Method DELETE 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/registrar/domains/:domain/delegation/vanity' -Method DELETE 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("DELETE", "/baseUrl/:account/registrar/domains/:domain/delegation/vanity")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/registrar/domains/:domain/delegation/vanity"

response = requests.delete(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/registrar/domains/:domain/delegation/vanity"

response <- VERB("DELETE", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/:account/registrar/domains/:domain/delegation/vanity")

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/:account/registrar/domains/:domain/delegation/vanity') do |req|
end

puts response.status
puts response.body
use std::str::FromStr;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:account/registrar/domains/:domain/delegation/vanity";

    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}}/:account/registrar/domains/:domain/delegation/vanity
http DELETE {{baseUrl}}/:account/registrar/domains/:domain/delegation/vanity
wget --quiet \
  --method DELETE \
  --output-document \
  - {{baseUrl}}/:account/registrar/domains/:domain/delegation/vanity
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/registrar/domains/:domain/delegation/vanity")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "string",
  "errors": {
    "property1": {
      "field": "string",
      "errors": [
        "string"
      ]
    },
    "property2": {
      "field": "string",
      "errors": [
        "string"
      ]
    }
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Validation failed",
  "errors": {
    "address1": [
      "can't be blank"
    ],
    "city": [
      "can't be blank"
    ],
    "country": [
      "can't be blank"
    ],
    "email": [
      "can't be blank",
      "is an invalid email address"
    ],
    "first_name": [
      "can't be blank"
    ],
    "last_name": [
      "can't be blank"
    ],
    "phone": [
      "can't be blank",
      "is probably not a phone number"
    ],
    "postal_code": [
      "can't be blank"
    ],
    "state_province": [
      "can't be blank"
    ]
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Not Found"
}
PUT Delegate to vanity name servers
{{baseUrl}}/:account/registrar/domains/:domain/delegation/vanity
QUERY PARAMS

account
domain
BODY json

[
  {}
]
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/registrar/domains/:domain/delegation/vanity");

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  {}\n]");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/put "{{baseUrl}}/:account/registrar/domains/:domain/delegation/vanity" {:content-type :json
                                                                                                :form-params [{}]})
require "http/client"

url = "{{baseUrl}}/:account/registrar/domains/:domain/delegation/vanity"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "[\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}}/:account/registrar/domains/:domain/delegation/vanity"),
    Content = new StringContent("[\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}}/:account/registrar/domains/:domain/delegation/vanity");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "[\n  {}\n]", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/registrar/domains/:domain/delegation/vanity"

	payload := strings.NewReader("[\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/:account/registrar/domains/:domain/delegation/vanity HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 8

[
  {}
]
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/:account/registrar/domains/:domain/delegation/vanity")
  .setHeader("content-type", "application/json")
  .setBody("[\n  {}\n]")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/registrar/domains/:domain/delegation/vanity"))
    .header("content-type", "application/json")
    .method("PUT", HttpRequest.BodyPublishers.ofString("[\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  {}\n]");
Request request = new Request.Builder()
  .url("{{baseUrl}}/:account/registrar/domains/:domain/delegation/vanity")
  .put(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/:account/registrar/domains/:domain/delegation/vanity")
  .header("content-type", "application/json")
  .body("[\n  {}\n]")
  .asString();
const data = JSON.stringify([
  {}
]);

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('PUT', '{{baseUrl}}/:account/registrar/domains/:domain/delegation/vanity');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'PUT',
  url: '{{baseUrl}}/:account/registrar/domains/:domain/delegation/vanity',
  headers: {'content-type': 'application/json'},
  data: [{}]
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/registrar/domains/:domain/delegation/vanity';
const options = {method: 'PUT', headers: {'content-type': 'application/json'}, body: '[{}]'};

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}}/:account/registrar/domains/:domain/delegation/vanity',
  method: 'PUT',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '[\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  {}\n]")
val request = Request.Builder()
  .url("{{baseUrl}}/:account/registrar/domains/:domain/delegation/vanity")
  .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/:account/registrar/domains/:domain/delegation/vanity',
  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([{}]));
req.end();
const request = require('request');

const options = {
  method: 'PUT',
  url: '{{baseUrl}}/:account/registrar/domains/:domain/delegation/vanity',
  headers: {'content-type': 'application/json'},
  body: [{}],
  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}}/:account/registrar/domains/:domain/delegation/vanity');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send([
  {}
]);

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}}/:account/registrar/domains/:domain/delegation/vanity',
  headers: {'content-type': 'application/json'},
  data: [{}]
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/registrar/domains/:domain/delegation/vanity';
const options = {method: 'PUT', headers: {'content-type': 'application/json'}, body: '[{}]'};

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 = @[ @{  } ];

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/:account/registrar/domains/:domain/delegation/vanity"]
                                                       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}}/:account/registrar/domains/:domain/delegation/vanity" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "[\n  {}\n]" in

Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/registrar/domains/:domain/delegation/vanity",
  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([
    [
        
    ]
  ]),
  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}}/:account/registrar/domains/:domain/delegation/vanity', [
  'body' => '[
  {}
]',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/:account/registrar/domains/:domain/delegation/vanity');
$request->setMethod(HTTP_METH_PUT);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  [
    
  ]
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  [
    
  ]
]));
$request->setRequestUrl('{{baseUrl}}/:account/registrar/domains/:domain/delegation/vanity');
$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}}/:account/registrar/domains/:domain/delegation/vanity' -Method PUT -Headers $headers -ContentType 'application/json' -Body '[
  {}
]'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/registrar/domains/:domain/delegation/vanity' -Method PUT -Headers $headers -ContentType 'application/json' -Body '[
  {}
]'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "[\n  {}\n]"

headers = { 'content-type': "application/json" }

conn.request("PUT", "/baseUrl/:account/registrar/domains/:domain/delegation/vanity", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/registrar/domains/:domain/delegation/vanity"

payload = [{}]
headers = {"content-type": "application/json"}

response = requests.put(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/registrar/domains/:domain/delegation/vanity"

payload <- "[\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}}/:account/registrar/domains/:domain/delegation/vanity")

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  {}\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/:account/registrar/domains/:domain/delegation/vanity') do |req|
  req.body = "[\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}}/:account/registrar/domains/:domain/delegation/vanity";

    let payload = (json!({}));

    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}}/:account/registrar/domains/:domain/delegation/vanity \
  --header 'content-type: application/json' \
  --data '[
  {}
]'
echo '[
  {}
]' |  \
  http PUT {{baseUrl}}/:account/registrar/domains/:domain/delegation/vanity \
  content-type:application/json
wget --quiet \
  --method PUT \
  --header 'content-type: application/json' \
  --body-data '[\n  {}\n]' \
  --output-document \
  - {{baseUrl}}/:account/registrar/domains/:domain/delegation/vanity
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [[]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/registrar/domains/:domain/delegation/vanity")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": [
    {
      "id": 1,
      "name": "ns1.example.com",
      "ipv4": "127.0.0.1",
      "ipv6": "::1",
      "created_at": "2016-07-11T09:40:19Z",
      "updated_at": "2016-07-11T09:40:19Z"
    }
  ]
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "string",
  "errors": {
    "property1": {
      "field": "string",
      "errors": [
        "string"
      ]
    },
    "property2": {
      "field": "string",
      "errors": [
        "string"
      ]
    }
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Validation failed",
  "errors": {
    "address1": [
      "can't be blank"
    ],
    "city": [
      "can't be blank"
    ],
    "country": [
      "can't be blank"
    ],
    "email": [
      "can't be blank",
      "is an invalid email address"
    ],
    "first_name": [
      "can't be blank"
    ],
    "last_name": [
      "can't be blank"
    ],
    "phone": [
      "can't be blank",
      "is probably not a phone number"
    ],
    "postal_code": [
      "can't be blank"
    ],
    "state_province": [
      "can't be blank"
    ]
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Not Found"
}
GET List domain name servers
{{baseUrl}}/:account/registrar/domains/:domain/delegation
QUERY PARAMS

account
domain
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/registrar/domains/:domain/delegation");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/:account/registrar/domains/:domain/delegation")
require "http/client"

url = "{{baseUrl}}/:account/registrar/domains/:domain/delegation"

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}}/:account/registrar/domains/:domain/delegation"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/:account/registrar/domains/:domain/delegation");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/registrar/domains/:domain/delegation"

	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/:account/registrar/domains/:domain/delegation HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/:account/registrar/domains/:domain/delegation")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/registrar/domains/:domain/delegation"))
    .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}}/:account/registrar/domains/:domain/delegation")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/:account/registrar/domains/:domain/delegation")
  .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}}/:account/registrar/domains/:domain/delegation');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'GET',
  url: '{{baseUrl}}/:account/registrar/domains/:domain/delegation'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/registrar/domains/:domain/delegation';
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}}/:account/registrar/domains/:domain/delegation',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/:account/registrar/domains/:domain/delegation")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/:account/registrar/domains/:domain/delegation',
  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}}/:account/registrar/domains/:domain/delegation'
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/:account/registrar/domains/:domain/delegation');

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}}/:account/registrar/domains/:domain/delegation'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/registrar/domains/:domain/delegation';
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}}/:account/registrar/domains/:domain/delegation"]
                                                       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}}/:account/registrar/domains/:domain/delegation" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/registrar/domains/:domain/delegation",
  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}}/:account/registrar/domains/:domain/delegation');

echo $response->getBody();
setUrl('{{baseUrl}}/:account/registrar/domains/:domain/delegation');
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/:account/registrar/domains/:domain/delegation');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/:account/registrar/domains/:domain/delegation' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/registrar/domains/:domain/delegation' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/:account/registrar/domains/:domain/delegation")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/registrar/domains/:domain/delegation"

response = requests.get(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/registrar/domains/:domain/delegation"

response <- VERB("GET", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/:account/registrar/domains/:domain/delegation")

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/:account/registrar/domains/:domain/delegation') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:account/registrar/domains/:domain/delegation";

    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}}/:account/registrar/domains/:domain/delegation
http GET {{baseUrl}}/:account/registrar/domains/:domain/delegation
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/:account/registrar/domains/:domain/delegation
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/registrar/domains/:domain/delegation")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Not Found"
}
DELETE Disable WHOIS privacy
{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy
QUERY PARAMS

account
domain
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/delete "{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy")
require "http/client"

url = "{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy"

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}}/:account/registrar/domains/:domain/whois_privacy"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy"

	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/:account/registrar/domains/:domain/whois_privacy HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy"))
    .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}}/:account/registrar/domains/:domain/whois_privacy")
  .delete(null)
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy")
  .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}}/:account/registrar/domains/:domain/whois_privacy');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'DELETE',
  url: '{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy';
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}}/:account/registrar/domains/:domain/whois_privacy',
  method: 'DELETE',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy")
  .delete(null)
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'DELETE',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/:account/registrar/domains/:domain/whois_privacy',
  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}}/:account/registrar/domains/:domain/whois_privacy'
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('DELETE', '{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy');

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}}/:account/registrar/domains/:domain/whois_privacy'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy';
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}}/:account/registrar/domains/:domain/whois_privacy"]
                                                       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}}/:account/registrar/domains/:domain/whois_privacy" in

Client.call `DELETE uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy",
  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}}/:account/registrar/domains/:domain/whois_privacy');

echo $response->getBody();
setUrl('{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy');
$request->setMethod(HTTP_METH_DELETE);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy' -Method DELETE 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy' -Method DELETE 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("DELETE", "/baseUrl/:account/registrar/domains/:domain/whois_privacy")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy"

response = requests.delete(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy"

response <- VERB("DELETE", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy")

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/:account/registrar/domains/:domain/whois_privacy') do |req|
end

puts response.status
puts response.body
use std::str::FromStr;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy";

    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}}/:account/registrar/domains/:domain/whois_privacy
http DELETE {{baseUrl}}/:account/registrar/domains/:domain/whois_privacy
wget --quiet \
  --method DELETE \
  --output-document \
  - {{baseUrl}}/:account/registrar/domains/:domain/whois_privacy
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "id": 1,
    "domain_id": 2,
    "expires_on": "2017-02-13",
    "enabled": true,
    "created_at": "2016-02-13T14:34:50Z",
    "updated_at": "2016-02-13T14:34:52Z"
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Not Found"
}
PUT Enable WHOIS privacy
{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy
QUERY PARAMS

account
domain
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/put "{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy")
require "http/client"

url = "{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy"

response = HTTP::Client.put url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Put,
    RequestUri = new Uri("{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy");
var request = new RestRequest("", Method.Put);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy"

	req, _ := http.NewRequest("PUT", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
PUT /baseUrl/:account/registrar/domains/:domain/whois_privacy HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy"))
    .method("PUT", 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}}/:account/registrar/domains/:domain/whois_privacy")
  .put(null)
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy")
  .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('PUT', '{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'PUT',
  url: '{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy';
const options = {method: 'PUT'};

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}}/:account/registrar/domains/:domain/whois_privacy',
  method: 'PUT',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy")
  .put(null)
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'PUT',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/:account/registrar/domains/:domain/whois_privacy',
  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: 'PUT',
  url: '{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy'
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('PUT', '{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy');

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}}/:account/registrar/domains/:domain/whois_privacy'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy';
const options = {method: 'PUT'};

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}}/:account/registrar/domains/:domain/whois_privacy"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];

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}}/:account/registrar/domains/:domain/whois_privacy" in

Client.call `PUT uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PUT",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('PUT', '{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy');

echo $response->getBody();
setUrl('{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy');
$request->setMethod(HTTP_METH_PUT);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy');
$request->setRequestMethod('PUT');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy' -Method PUT 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy' -Method PUT 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("PUT", "/baseUrl/:account/registrar/domains/:domain/whois_privacy")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy"

response = requests.put(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy"

response <- VERB("PUT", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.put('/baseUrl/:account/registrar/domains/:domain/whois_privacy') do |req|
end

puts response.status
puts response.body
use std::str::FromStr;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy";

    let client = reqwest::Client::new();
    let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request PUT \
  --url {{baseUrl}}/:account/registrar/domains/:domain/whois_privacy
http PUT {{baseUrl}}/:account/registrar/domains/:domain/whois_privacy
wget --quiet \
  --method PUT \
  --output-document \
  - {{baseUrl}}/:account/registrar/domains/:domain/whois_privacy
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"

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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "id": 1,
    "domain_id": 2,
    "expires_on": "2017-02-13",
    "enabled": true,
    "created_at": "2016-02-13T14:34:50Z",
    "updated_at": "2016-02-13T14:34:52Z"
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "id": 1,
    "domain_id": 2,
    "expires_on": "2017-02-13",
    "enabled": true,
    "created_at": "2016-02-13T14:34:50Z",
    "updated_at": "2016-02-13T14:34:52Z"
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Not Found"
}
POST Renew WHOIS privacy
{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy/renewals
QUERY PARAMS

account
domain
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy/renewals");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy/renewals")
require "http/client"

url = "{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy/renewals"

response = HTTP::Client.post url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Post,
    RequestUri = new Uri("{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy/renewals"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy/renewals");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy/renewals"

	req, _ := http.NewRequest("POST", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
POST /baseUrl/:account/registrar/domains/:domain/whois_privacy/renewals HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy/renewals")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy/renewals"))
    .method("POST", 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}}/:account/registrar/domains/:domain/whois_privacy/renewals")
  .post(null)
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy/renewals")
  .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('POST', '{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy/renewals');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy/renewals'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy/renewals';
const options = {method: 'POST'};

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}}/:account/registrar/domains/:domain/whois_privacy/renewals',
  method: 'POST',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy/renewals")
  .post(null)
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'POST',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/:account/registrar/domains/:domain/whois_privacy/renewals',
  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: 'POST',
  url: '{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy/renewals'
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('POST', '{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy/renewals');

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}}/:account/registrar/domains/:domain/whois_privacy/renewals'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy/renewals';
const options = {method: 'POST'};

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}}/:account/registrar/domains/:domain/whois_privacy/renewals"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];

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}}/:account/registrar/domains/:domain/whois_privacy/renewals" in

Client.call `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy/renewals",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy/renewals');

echo $response->getBody();
setUrl('{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy/renewals');
$request->setMethod(HTTP_METH_POST);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy/renewals');
$request->setRequestMethod('POST');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy/renewals' -Method POST 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy/renewals' -Method POST 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("POST", "/baseUrl/:account/registrar/domains/:domain/whois_privacy/renewals")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy/renewals"

response = requests.post(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy/renewals"

response <- VERB("POST", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy/renewals")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.post('/baseUrl/:account/registrar/domains/:domain/whois_privacy/renewals') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy/renewals";

    let client = reqwest::Client::new();
    let response = client.post(url)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request POST \
  --url {{baseUrl}}/:account/registrar/domains/:domain/whois_privacy/renewals
http POST {{baseUrl}}/:account/registrar/domains/:domain/whois_privacy/renewals
wget --quiet \
  --method POST \
  --output-document \
  - {{baseUrl}}/:account/registrar/domains/:domain/whois_privacy/renewals
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy/renewals")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"

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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "id": 1,
    "domain_id": 100,
    "whois_privacy_id": 999,
    "state": "new",
    "enabled": true,
    "expires_on": "2020-01-10",
    "created_at": "2019-01-10T12:12:48Z",
    "updated_at": "2019-01-10T12:12:48Z"
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "string",
  "errors": {
    "property1": {
      "field": "string",
      "errors": [
        "string"
      ]
    },
    "property2": {
      "field": "string",
      "errors": [
        "string"
      ]
    }
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Validation failed",
  "errors": {
    "address1": [
      "can't be blank"
    ],
    "city": [
      "can't be blank"
    ],
    "country": [
      "can't be blank"
    ],
    "email": [
      "can't be blank",
      "is an invalid email address"
    ],
    "first_name": [
      "can't be blank"
    ],
    "last_name": [
      "can't be blank"
    ],
    "phone": [
      "can't be blank",
      "is probably not a phone number"
    ],
    "postal_code": [
      "can't be blank"
    ],
    "state_province": [
      "can't be blank"
    ]
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Not Found"
}
GET WHOIS privacy status
{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy
QUERY PARAMS

account
domain
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy")
require "http/client"

url = "{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy"

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}}/:account/registrar/domains/:domain/whois_privacy"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy"

	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/:account/registrar/domains/:domain/whois_privacy HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy"))
    .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}}/:account/registrar/domains/:domain/whois_privacy")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy")
  .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}}/:account/registrar/domains/:domain/whois_privacy');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'GET',
  url: '{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy';
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}}/:account/registrar/domains/:domain/whois_privacy',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/:account/registrar/domains/:domain/whois_privacy',
  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}}/:account/registrar/domains/:domain/whois_privacy'
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy');

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}}/:account/registrar/domains/:domain/whois_privacy'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy';
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}}/:account/registrar/domains/:domain/whois_privacy"]
                                                       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}}/:account/registrar/domains/:domain/whois_privacy" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy",
  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}}/:account/registrar/domains/:domain/whois_privacy');

echo $response->getBody();
setUrl('{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy');
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/:account/registrar/domains/:domain/whois_privacy")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy"

response = requests.get(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy"

response <- VERB("GET", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy")

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/:account/registrar/domains/:domain/whois_privacy') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy";

    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}}/:account/registrar/domains/:domain/whois_privacy
http GET {{baseUrl}}/:account/registrar/domains/:domain/whois_privacy
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/:account/registrar/domains/:domain/whois_privacy
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/registrar/domains/:domain/whois_privacy")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "id": 1,
    "domain_id": 2,
    "expires_on": "2017-02-13",
    "enabled": true,
    "created_at": "2016-02-13T14:34:50Z",
    "updated_at": "2016-02-13T14:34:52Z"
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Not Found"
}
GET Retrieve a domain registration
{{baseUrl}}/:account/registrar/domains/:domain/registrations/:domainregistration
QUERY PARAMS

account
domain
domainregistration
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/registrar/domains/:domain/registrations/:domainregistration");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/:account/registrar/domains/:domain/registrations/:domainregistration")
require "http/client"

url = "{{baseUrl}}/:account/registrar/domains/:domain/registrations/:domainregistration"

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}}/:account/registrar/domains/:domain/registrations/:domainregistration"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/:account/registrar/domains/:domain/registrations/:domainregistration");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/registrar/domains/:domain/registrations/:domainregistration"

	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/:account/registrar/domains/:domain/registrations/:domainregistration HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/:account/registrar/domains/:domain/registrations/:domainregistration")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/registrar/domains/:domain/registrations/:domainregistration"))
    .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}}/:account/registrar/domains/:domain/registrations/:domainregistration")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/:account/registrar/domains/:domain/registrations/:domainregistration")
  .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}}/:account/registrar/domains/:domain/registrations/:domainregistration');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'GET',
  url: '{{baseUrl}}/:account/registrar/domains/:domain/registrations/:domainregistration'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/registrar/domains/:domain/registrations/:domainregistration';
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}}/:account/registrar/domains/:domain/registrations/:domainregistration',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/:account/registrar/domains/:domain/registrations/:domainregistration")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/:account/registrar/domains/:domain/registrations/:domainregistration',
  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}}/:account/registrar/domains/:domain/registrations/:domainregistration'
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/:account/registrar/domains/:domain/registrations/:domainregistration');

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}}/:account/registrar/domains/:domain/registrations/:domainregistration'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/registrar/domains/:domain/registrations/:domainregistration';
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}}/:account/registrar/domains/:domain/registrations/:domainregistration"]
                                                       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}}/:account/registrar/domains/:domain/registrations/:domainregistration" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/registrar/domains/:domain/registrations/:domainregistration",
  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}}/:account/registrar/domains/:domain/registrations/:domainregistration');

echo $response->getBody();
setUrl('{{baseUrl}}/:account/registrar/domains/:domain/registrations/:domainregistration');
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/:account/registrar/domains/:domain/registrations/:domainregistration');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/:account/registrar/domains/:domain/registrations/:domainregistration' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/registrar/domains/:domain/registrations/:domainregistration' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/:account/registrar/domains/:domain/registrations/:domainregistration")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/registrar/domains/:domain/registrations/:domainregistration"

response = requests.get(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/registrar/domains/:domain/registrations/:domainregistration"

response <- VERB("GET", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/:account/registrar/domains/:domain/registrations/:domainregistration")

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/:account/registrar/domains/:domain/registrations/:domainregistration') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:account/registrar/domains/:domain/registrations/:domainregistration";

    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}}/:account/registrar/domains/:domain/registrations/:domainregistration
http GET {{baseUrl}}/:account/registrar/domains/:domain/registrations/:domainregistration
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/:account/registrar/domains/:domain/registrations/:domainregistration
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/registrar/domains/:domain/registrations/:domainregistration")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "id": 1,
    "domain_id": 999,
    "registrant_id": 2,
    "period": 1,
    "state": "new",
    "auto_renew": false,
    "whois_privacy": false,
    "created_at": "2016-12-09T19:35:31Z",
    "updated_at": "2016-12-09T19:35:31Z"
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Not Found"
}
DELETE Disable domain auto-renewal
{{baseUrl}}/:account/registrar/domains/:domain/auto_renewal
QUERY PARAMS

account
domain
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/registrar/domains/:domain/auto_renewal");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/delete "{{baseUrl}}/:account/registrar/domains/:domain/auto_renewal")
require "http/client"

url = "{{baseUrl}}/:account/registrar/domains/:domain/auto_renewal"

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}}/:account/registrar/domains/:domain/auto_renewal"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/:account/registrar/domains/:domain/auto_renewal");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/registrar/domains/:domain/auto_renewal"

	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/:account/registrar/domains/:domain/auto_renewal HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/:account/registrar/domains/:domain/auto_renewal")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/registrar/domains/:domain/auto_renewal"))
    .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}}/:account/registrar/domains/:domain/auto_renewal")
  .delete(null)
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/:account/registrar/domains/:domain/auto_renewal")
  .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}}/:account/registrar/domains/:domain/auto_renewal');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'DELETE',
  url: '{{baseUrl}}/:account/registrar/domains/:domain/auto_renewal'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/registrar/domains/:domain/auto_renewal';
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}}/:account/registrar/domains/:domain/auto_renewal',
  method: 'DELETE',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/:account/registrar/domains/:domain/auto_renewal")
  .delete(null)
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'DELETE',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/:account/registrar/domains/:domain/auto_renewal',
  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}}/:account/registrar/domains/:domain/auto_renewal'
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('DELETE', '{{baseUrl}}/:account/registrar/domains/:domain/auto_renewal');

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}}/:account/registrar/domains/:domain/auto_renewal'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/registrar/domains/:domain/auto_renewal';
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}}/:account/registrar/domains/:domain/auto_renewal"]
                                                       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}}/:account/registrar/domains/:domain/auto_renewal" in

Client.call `DELETE uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/registrar/domains/:domain/auto_renewal",
  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}}/:account/registrar/domains/:domain/auto_renewal');

echo $response->getBody();
setUrl('{{baseUrl}}/:account/registrar/domains/:domain/auto_renewal');
$request->setMethod(HTTP_METH_DELETE);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/:account/registrar/domains/:domain/auto_renewal');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/:account/registrar/domains/:domain/auto_renewal' -Method DELETE 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/registrar/domains/:domain/auto_renewal' -Method DELETE 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("DELETE", "/baseUrl/:account/registrar/domains/:domain/auto_renewal")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/registrar/domains/:domain/auto_renewal"

response = requests.delete(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/registrar/domains/:domain/auto_renewal"

response <- VERB("DELETE", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/:account/registrar/domains/:domain/auto_renewal")

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/:account/registrar/domains/:domain/auto_renewal') do |req|
end

puts response.status
puts response.body
use std::str::FromStr;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:account/registrar/domains/:domain/auto_renewal";

    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}}/:account/registrar/domains/:domain/auto_renewal
http DELETE {{baseUrl}}/:account/registrar/domains/:domain/auto_renewal
wget --quiet \
  --method DELETE \
  --output-document \
  - {{baseUrl}}/:account/registrar/domains/:domain/auto_renewal
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/registrar/domains/:domain/auto_renewal")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "string",
  "errors": {
    "property1": {
      "field": "string",
      "errors": [
        "string"
      ]
    },
    "property2": {
      "field": "string",
      "errors": [
        "string"
      ]
    }
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Validation failed",
  "errors": {
    "address1": [
      "can't be blank"
    ],
    "city": [
      "can't be blank"
    ],
    "country": [
      "can't be blank"
    ],
    "email": [
      "can't be blank",
      "is an invalid email address"
    ],
    "first_name": [
      "can't be blank"
    ],
    "last_name": [
      "can't be blank"
    ],
    "phone": [
      "can't be blank",
      "is probably not a phone number"
    ],
    "postal_code": [
      "can't be blank"
    ],
    "state_province": [
      "can't be blank"
    ]
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Not Found"
}
PUT Enable domain auto-renewal
{{baseUrl}}/:account/registrar/domains/:domain/auto_renewal
QUERY PARAMS

account
domain
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/registrar/domains/:domain/auto_renewal");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/put "{{baseUrl}}/:account/registrar/domains/:domain/auto_renewal")
require "http/client"

url = "{{baseUrl}}/:account/registrar/domains/:domain/auto_renewal"

response = HTTP::Client.put url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Put,
    RequestUri = new Uri("{{baseUrl}}/:account/registrar/domains/:domain/auto_renewal"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/:account/registrar/domains/:domain/auto_renewal");
var request = new RestRequest("", Method.Put);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/registrar/domains/:domain/auto_renewal"

	req, _ := http.NewRequest("PUT", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
PUT /baseUrl/:account/registrar/domains/:domain/auto_renewal HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/:account/registrar/domains/:domain/auto_renewal")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/registrar/domains/:domain/auto_renewal"))
    .method("PUT", 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}}/:account/registrar/domains/:domain/auto_renewal")
  .put(null)
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/:account/registrar/domains/:domain/auto_renewal")
  .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('PUT', '{{baseUrl}}/:account/registrar/domains/:domain/auto_renewal');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'PUT',
  url: '{{baseUrl}}/:account/registrar/domains/:domain/auto_renewal'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/registrar/domains/:domain/auto_renewal';
const options = {method: 'PUT'};

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}}/:account/registrar/domains/:domain/auto_renewal',
  method: 'PUT',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/:account/registrar/domains/:domain/auto_renewal")
  .put(null)
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'PUT',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/:account/registrar/domains/:domain/auto_renewal',
  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: 'PUT',
  url: '{{baseUrl}}/:account/registrar/domains/:domain/auto_renewal'
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('PUT', '{{baseUrl}}/:account/registrar/domains/:domain/auto_renewal');

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}}/:account/registrar/domains/:domain/auto_renewal'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/registrar/domains/:domain/auto_renewal';
const options = {method: 'PUT'};

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}}/:account/registrar/domains/:domain/auto_renewal"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];

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}}/:account/registrar/domains/:domain/auto_renewal" in

Client.call `PUT uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/registrar/domains/:domain/auto_renewal",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PUT",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('PUT', '{{baseUrl}}/:account/registrar/domains/:domain/auto_renewal');

echo $response->getBody();
setUrl('{{baseUrl}}/:account/registrar/domains/:domain/auto_renewal');
$request->setMethod(HTTP_METH_PUT);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/:account/registrar/domains/:domain/auto_renewal');
$request->setRequestMethod('PUT');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/:account/registrar/domains/:domain/auto_renewal' -Method PUT 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/registrar/domains/:domain/auto_renewal' -Method PUT 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("PUT", "/baseUrl/:account/registrar/domains/:domain/auto_renewal")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/registrar/domains/:domain/auto_renewal"

response = requests.put(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/registrar/domains/:domain/auto_renewal"

response <- VERB("PUT", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/:account/registrar/domains/:domain/auto_renewal")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.put('/baseUrl/:account/registrar/domains/:domain/auto_renewal') do |req|
end

puts response.status
puts response.body
use std::str::FromStr;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:account/registrar/domains/:domain/auto_renewal";

    let client = reqwest::Client::new();
    let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request PUT \
  --url {{baseUrl}}/:account/registrar/domains/:domain/auto_renewal
http PUT {{baseUrl}}/:account/registrar/domains/:domain/auto_renewal
wget --quiet \
  --method PUT \
  --output-document \
  - {{baseUrl}}/:account/registrar/domains/:domain/auto_renewal
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/registrar/domains/:domain/auto_renewal")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"

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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "string",
  "errors": {
    "property1": {
      "field": "string",
      "errors": [
        "string"
      ]
    },
    "property2": {
      "field": "string",
      "errors": [
        "string"
      ]
    }
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Validation failed",
  "errors": {
    "address1": [
      "can't be blank"
    ],
    "city": [
      "can't be blank"
    ],
    "country": [
      "can't be blank"
    ],
    "email": [
      "can't be blank",
      "is an invalid email address"
    ],
    "first_name": [
      "can't be blank"
    ],
    "last_name": [
      "can't be blank"
    ],
    "phone": [
      "can't be blank",
      "is probably not a phone number"
    ],
    "postal_code": [
      "can't be blank"
    ],
    "state_province": [
      "can't be blank"
    ]
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Not Found"
}
POST Renew a domain
{{baseUrl}}/:account/registrar/domains/:domain/renewals
QUERY PARAMS

account
domain
BODY json

{
  "period": 0,
  "premium_price": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/registrar/domains/:domain/renewals");

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  \"period\": 0,\n  \"premium_price\": \"\"\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/:account/registrar/domains/:domain/renewals" {:content-type :json
                                                                                        :form-params {:period 0
                                                                                                      :premium_price ""}})
require "http/client"

url = "{{baseUrl}}/:account/registrar/domains/:domain/renewals"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"period\": 0,\n  \"premium_price\": \"\"\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}}/:account/registrar/domains/:domain/renewals"),
    Content = new StringContent("{\n  \"period\": 0,\n  \"premium_price\": \"\"\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}}/:account/registrar/domains/:domain/renewals");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"period\": 0,\n  \"premium_price\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/registrar/domains/:domain/renewals"

	payload := strings.NewReader("{\n  \"period\": 0,\n  \"premium_price\": \"\"\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/:account/registrar/domains/:domain/renewals HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 40

{
  "period": 0,
  "premium_price": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/:account/registrar/domains/:domain/renewals")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"period\": 0,\n  \"premium_price\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/registrar/domains/:domain/renewals"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"period\": 0,\n  \"premium_price\": \"\"\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  \"period\": 0,\n  \"premium_price\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/:account/registrar/domains/:domain/renewals")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/:account/registrar/domains/:domain/renewals")
  .header("content-type", "application/json")
  .body("{\n  \"period\": 0,\n  \"premium_price\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  period: 0,
  premium_price: ''
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/:account/registrar/domains/:domain/renewals');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/:account/registrar/domains/:domain/renewals',
  headers: {'content-type': 'application/json'},
  data: {period: 0, premium_price: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/registrar/domains/:domain/renewals';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"period":0,"premium_price":""}'
};

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}}/:account/registrar/domains/:domain/renewals',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "period": 0,\n  "premium_price": ""\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"period\": 0,\n  \"premium_price\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/:account/registrar/domains/:domain/renewals")
  .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/:account/registrar/domains/:domain/renewals',
  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({period: 0, premium_price: ''}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/:account/registrar/domains/:domain/renewals',
  headers: {'content-type': 'application/json'},
  body: {period: 0, premium_price: ''},
  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}}/:account/registrar/domains/:domain/renewals');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  period: 0,
  premium_price: ''
});

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}}/:account/registrar/domains/:domain/renewals',
  headers: {'content-type': 'application/json'},
  data: {period: 0, premium_price: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/registrar/domains/:domain/renewals';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"period":0,"premium_price":""}'
};

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 = @{ @"period": @0,
                              @"premium_price": @"" };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/:account/registrar/domains/:domain/renewals"]
                                                       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}}/:account/registrar/domains/:domain/renewals" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"period\": 0,\n  \"premium_price\": \"\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/registrar/domains/:domain/renewals",
  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([
    'period' => 0,
    'premium_price' => ''
  ]),
  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}}/:account/registrar/domains/:domain/renewals', [
  'body' => '{
  "period": 0,
  "premium_price": ""
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/:account/registrar/domains/:domain/renewals');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'period' => 0,
  'premium_price' => ''
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'period' => 0,
  'premium_price' => ''
]));
$request->setRequestUrl('{{baseUrl}}/:account/registrar/domains/:domain/renewals');
$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}}/:account/registrar/domains/:domain/renewals' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "period": 0,
  "premium_price": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/registrar/domains/:domain/renewals' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "period": 0,
  "premium_price": ""
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"period\": 0,\n  \"premium_price\": \"\"\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/:account/registrar/domains/:domain/renewals", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/registrar/domains/:domain/renewals"

payload = {
    "period": 0,
    "premium_price": ""
}
headers = {"content-type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/registrar/domains/:domain/renewals"

payload <- "{\n  \"period\": 0,\n  \"premium_price\": \"\"\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}}/:account/registrar/domains/:domain/renewals")

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  \"period\": 0,\n  \"premium_price\": \"\"\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/:account/registrar/domains/:domain/renewals') do |req|
  req.body = "{\n  \"period\": 0,\n  \"premium_price\": \"\"\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:account/registrar/domains/:domain/renewals";

    let payload = json!({
        "period": 0,
        "premium_price": ""
    });

    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}}/:account/registrar/domains/:domain/renewals \
  --header 'content-type: application/json' \
  --data '{
  "period": 0,
  "premium_price": ""
}'
echo '{
  "period": 0,
  "premium_price": ""
}' |  \
  http POST {{baseUrl}}/:account/registrar/domains/:domain/renewals \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "period": 0,\n  "premium_price": ""\n}' \
  --output-document \
  - {{baseUrl}}/:account/registrar/domains/:domain/renewals
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [
  "period": 0,
  "premium_price": ""
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/registrar/domains/:domain/renewals")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "id": 1,
    "domain_id": 999,
    "period": 1,
    "state": "new",
    "created_at": "2016-12-09T19:46:45Z",
    "updated_at": "2016-12-09T19:46:45Z"
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "string",
  "errors": {
    "property1": {
      "field": "string",
      "errors": [
        "string"
      ]
    },
    "property2": {
      "field": "string",
      "errors": [
        "string"
      ]
    }
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Validation failed",
  "errors": {
    "address1": [
      "can't be blank"
    ],
    "city": [
      "can't be blank"
    ],
    "country": [
      "can't be blank"
    ],
    "email": [
      "can't be blank",
      "is an invalid email address"
    ],
    "first_name": [
      "can't be blank"
    ],
    "last_name": [
      "can't be blank"
    ],
    "phone": [
      "can't be blank",
      "is probably not a phone number"
    ],
    "postal_code": [
      "can't be blank"
    ],
    "state_province": [
      "can't be blank"
    ]
  }
}
GET Retrieve a domain renewal
{{baseUrl}}/:account/registrar/domains/:domain/renewals/:domainrenewal
QUERY PARAMS

account
domain
domainrenewal
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/registrar/domains/:domain/renewals/:domainrenewal");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/:account/registrar/domains/:domain/renewals/:domainrenewal")
require "http/client"

url = "{{baseUrl}}/:account/registrar/domains/:domain/renewals/:domainrenewal"

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}}/:account/registrar/domains/:domain/renewals/:domainrenewal"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/:account/registrar/domains/:domain/renewals/:domainrenewal");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/registrar/domains/:domain/renewals/:domainrenewal"

	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/:account/registrar/domains/:domain/renewals/:domainrenewal HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/:account/registrar/domains/:domain/renewals/:domainrenewal")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/registrar/domains/:domain/renewals/:domainrenewal"))
    .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}}/:account/registrar/domains/:domain/renewals/:domainrenewal")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/:account/registrar/domains/:domain/renewals/:domainrenewal")
  .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}}/:account/registrar/domains/:domain/renewals/:domainrenewal');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'GET',
  url: '{{baseUrl}}/:account/registrar/domains/:domain/renewals/:domainrenewal'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/registrar/domains/:domain/renewals/:domainrenewal';
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}}/:account/registrar/domains/:domain/renewals/:domainrenewal',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/:account/registrar/domains/:domain/renewals/:domainrenewal")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/:account/registrar/domains/:domain/renewals/:domainrenewal',
  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}}/:account/registrar/domains/:domain/renewals/:domainrenewal'
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/:account/registrar/domains/:domain/renewals/:domainrenewal');

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}}/:account/registrar/domains/:domain/renewals/:domainrenewal'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/registrar/domains/:domain/renewals/:domainrenewal';
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}}/:account/registrar/domains/:domain/renewals/:domainrenewal"]
                                                       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}}/:account/registrar/domains/:domain/renewals/:domainrenewal" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/registrar/domains/:domain/renewals/:domainrenewal",
  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}}/:account/registrar/domains/:domain/renewals/:domainrenewal');

echo $response->getBody();
setUrl('{{baseUrl}}/:account/registrar/domains/:domain/renewals/:domainrenewal');
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/:account/registrar/domains/:domain/renewals/:domainrenewal');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/:account/registrar/domains/:domain/renewals/:domainrenewal' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/registrar/domains/:domain/renewals/:domainrenewal' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/:account/registrar/domains/:domain/renewals/:domainrenewal")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/registrar/domains/:domain/renewals/:domainrenewal"

response = requests.get(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/registrar/domains/:domain/renewals/:domainrenewal"

response <- VERB("GET", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/:account/registrar/domains/:domain/renewals/:domainrenewal")

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/:account/registrar/domains/:domain/renewals/:domainrenewal') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:account/registrar/domains/:domain/renewals/:domainrenewal";

    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}}/:account/registrar/domains/:domain/renewals/:domainrenewal
http GET {{baseUrl}}/:account/registrar/domains/:domain/renewals/:domainrenewal
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/:account/registrar/domains/:domain/renewals/:domainrenewal
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/registrar/domains/:domain/renewals/:domainrenewal")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "id": 1,
    "domain_id": 999,
    "period": 1,
    "state": "new",
    "created_at": "2016-12-09T19:46:45Z",
    "updated_at": "2016-12-09T19:46:45Z"
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Not Found"
}
POST Restore a domain
{{baseUrl}}/:account/registrar/domains/:domain/restores
QUERY PARAMS

account
domain
BODY json

{
  "premium_price": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/registrar/domains/:domain/restores");

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  \"premium_price\": \"\"\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/:account/registrar/domains/:domain/restores" {:content-type :json
                                                                                        :form-params {:premium_price ""}})
require "http/client"

url = "{{baseUrl}}/:account/registrar/domains/:domain/restores"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"premium_price\": \"\"\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}}/:account/registrar/domains/:domain/restores"),
    Content = new StringContent("{\n  \"premium_price\": \"\"\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}}/:account/registrar/domains/:domain/restores");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"premium_price\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/registrar/domains/:domain/restores"

	payload := strings.NewReader("{\n  \"premium_price\": \"\"\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/:account/registrar/domains/:domain/restores HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 25

{
  "premium_price": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/:account/registrar/domains/:domain/restores")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"premium_price\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/registrar/domains/:domain/restores"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"premium_price\": \"\"\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  \"premium_price\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/:account/registrar/domains/:domain/restores")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/:account/registrar/domains/:domain/restores")
  .header("content-type", "application/json")
  .body("{\n  \"premium_price\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  premium_price: ''
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/:account/registrar/domains/:domain/restores');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/:account/registrar/domains/:domain/restores',
  headers: {'content-type': 'application/json'},
  data: {premium_price: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/registrar/domains/:domain/restores';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"premium_price":""}'
};

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}}/:account/registrar/domains/:domain/restores',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "premium_price": ""\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"premium_price\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/:account/registrar/domains/:domain/restores")
  .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/:account/registrar/domains/:domain/restores',
  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({premium_price: ''}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/:account/registrar/domains/:domain/restores',
  headers: {'content-type': 'application/json'},
  body: {premium_price: ''},
  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}}/:account/registrar/domains/:domain/restores');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  premium_price: ''
});

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}}/:account/registrar/domains/:domain/restores',
  headers: {'content-type': 'application/json'},
  data: {premium_price: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/registrar/domains/:domain/restores';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"premium_price":""}'
};

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 = @{ @"premium_price": @"" };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/:account/registrar/domains/:domain/restores"]
                                                       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}}/:account/registrar/domains/:domain/restores" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"premium_price\": \"\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/registrar/domains/:domain/restores",
  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([
    'premium_price' => ''
  ]),
  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}}/:account/registrar/domains/:domain/restores', [
  'body' => '{
  "premium_price": ""
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/:account/registrar/domains/:domain/restores');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'premium_price' => ''
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'premium_price' => ''
]));
$request->setRequestUrl('{{baseUrl}}/:account/registrar/domains/:domain/restores');
$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}}/:account/registrar/domains/:domain/restores' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "premium_price": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/registrar/domains/:domain/restores' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "premium_price": ""
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"premium_price\": \"\"\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/:account/registrar/domains/:domain/restores", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/registrar/domains/:domain/restores"

payload = { "premium_price": "" }
headers = {"content-type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/registrar/domains/:domain/restores"

payload <- "{\n  \"premium_price\": \"\"\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}}/:account/registrar/domains/:domain/restores")

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  \"premium_price\": \"\"\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/:account/registrar/domains/:domain/restores') do |req|
  req.body = "{\n  \"premium_price\": \"\"\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:account/registrar/domains/:domain/restores";

    let payload = json!({"premium_price": ""});

    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}}/:account/registrar/domains/:domain/restores \
  --header 'content-type: application/json' \
  --data '{
  "premium_price": ""
}'
echo '{
  "premium_price": ""
}' |  \
  http POST {{baseUrl}}/:account/registrar/domains/:domain/restores \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "premium_price": ""\n}' \
  --output-document \
  - {{baseUrl}}/:account/registrar/domains/:domain/restores
import Foundation

let headers = ["content-type": "application/json"]
let parameters = ["premium_price": ""] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/registrar/domains/:domain/restores")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "id": 1,
    "domain_id": 999,
    "state": "new",
    "created_at": "2016-12-09T19:46:45Z",
    "updated_at": "2016-12-09T19:46:45Z"
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "string",
  "errors": {
    "property1": {
      "field": "string",
      "errors": [
        "string"
      ]
    },
    "property2": {
      "field": "string",
      "errors": [
        "string"
      ]
    }
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Validation failed",
  "errors": {
    "address1": [
      "can't be blank"
    ],
    "city": [
      "can't be blank"
    ],
    "country": [
      "can't be blank"
    ],
    "email": [
      "can't be blank",
      "is an invalid email address"
    ],
    "first_name": [
      "can't be blank"
    ],
    "last_name": [
      "can't be blank"
    ],
    "phone": [
      "can't be blank",
      "is probably not a phone number"
    ],
    "postal_code": [
      "can't be blank"
    ],
    "state_province": [
      "can't be blank"
    ]
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Authentication failed"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Not Found"
}
GET Retrieve a domain restore
{{baseUrl}}/:account/registrar/domains/:domain/restores/:domainrestore
QUERY PARAMS

account
domain
domainrestore
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/registrar/domains/:domain/restores/:domainrestore");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/:account/registrar/domains/:domain/restores/:domainrestore")
require "http/client"

url = "{{baseUrl}}/:account/registrar/domains/:domain/restores/:domainrestore"

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}}/:account/registrar/domains/:domain/restores/:domainrestore"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/:account/registrar/domains/:domain/restores/:domainrestore");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/registrar/domains/:domain/restores/:domainrestore"

	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/:account/registrar/domains/:domain/restores/:domainrestore HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/:account/registrar/domains/:domain/restores/:domainrestore")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/registrar/domains/:domain/restores/:domainrestore"))
    .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}}/:account/registrar/domains/:domain/restores/:domainrestore")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/:account/registrar/domains/:domain/restores/:domainrestore")
  .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}}/:account/registrar/domains/:domain/restores/:domainrestore');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'GET',
  url: '{{baseUrl}}/:account/registrar/domains/:domain/restores/:domainrestore'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/registrar/domains/:domain/restores/:domainrestore';
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}}/:account/registrar/domains/:domain/restores/:domainrestore',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/:account/registrar/domains/:domain/restores/:domainrestore")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/:account/registrar/domains/:domain/restores/:domainrestore',
  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}}/:account/registrar/domains/:domain/restores/:domainrestore'
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/:account/registrar/domains/:domain/restores/:domainrestore');

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}}/:account/registrar/domains/:domain/restores/:domainrestore'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/registrar/domains/:domain/restores/:domainrestore';
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}}/:account/registrar/domains/:domain/restores/:domainrestore"]
                                                       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}}/:account/registrar/domains/:domain/restores/:domainrestore" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/registrar/domains/:domain/restores/:domainrestore",
  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}}/:account/registrar/domains/:domain/restores/:domainrestore');

echo $response->getBody();
setUrl('{{baseUrl}}/:account/registrar/domains/:domain/restores/:domainrestore');
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/:account/registrar/domains/:domain/restores/:domainrestore');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/:account/registrar/domains/:domain/restores/:domainrestore' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/registrar/domains/:domain/restores/:domainrestore' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/:account/registrar/domains/:domain/restores/:domainrestore")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/registrar/domains/:domain/restores/:domainrestore"

response = requests.get(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/registrar/domains/:domain/restores/:domainrestore"

response <- VERB("GET", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/:account/registrar/domains/:domain/restores/:domainrestore")

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/:account/registrar/domains/:domain/restores/:domainrestore') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:account/registrar/domains/:domain/restores/:domainrestore";

    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}}/:account/registrar/domains/:domain/restores/:domainrestore
http GET {{baseUrl}}/:account/registrar/domains/:domain/restores/:domainrestore
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/:account/registrar/domains/:domain/restores/:domainrestore
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/registrar/domains/:domain/restores/:domainrestore")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "id": 1,
    "domain_id": 999,
    "state": "new",
    "created_at": "2016-12-09T19:46:45Z",
    "updated_at": "2016-12-09T19:46:45Z"
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Authentication failed"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Not Found"
}
DELETE Cancel a domain transfer
{{baseUrl}}/:account/registrar/domains/:domain/transfers/:domaintransfer
QUERY PARAMS

account
domain
domaintransfer
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/registrar/domains/:domain/transfers/:domaintransfer");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/delete "{{baseUrl}}/:account/registrar/domains/:domain/transfers/:domaintransfer")
require "http/client"

url = "{{baseUrl}}/:account/registrar/domains/:domain/transfers/:domaintransfer"

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}}/:account/registrar/domains/:domain/transfers/:domaintransfer"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/:account/registrar/domains/:domain/transfers/:domaintransfer");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/registrar/domains/:domain/transfers/:domaintransfer"

	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/:account/registrar/domains/:domain/transfers/:domaintransfer HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/:account/registrar/domains/:domain/transfers/:domaintransfer")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/registrar/domains/:domain/transfers/:domaintransfer"))
    .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}}/:account/registrar/domains/:domain/transfers/:domaintransfer")
  .delete(null)
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/:account/registrar/domains/:domain/transfers/:domaintransfer")
  .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}}/:account/registrar/domains/:domain/transfers/:domaintransfer');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'DELETE',
  url: '{{baseUrl}}/:account/registrar/domains/:domain/transfers/:domaintransfer'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/registrar/domains/:domain/transfers/:domaintransfer';
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}}/:account/registrar/domains/:domain/transfers/:domaintransfer',
  method: 'DELETE',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/:account/registrar/domains/:domain/transfers/:domaintransfer")
  .delete(null)
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'DELETE',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/:account/registrar/domains/:domain/transfers/:domaintransfer',
  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}}/:account/registrar/domains/:domain/transfers/:domaintransfer'
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('DELETE', '{{baseUrl}}/:account/registrar/domains/:domain/transfers/:domaintransfer');

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}}/:account/registrar/domains/:domain/transfers/:domaintransfer'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/registrar/domains/:domain/transfers/:domaintransfer';
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}}/:account/registrar/domains/:domain/transfers/:domaintransfer"]
                                                       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}}/:account/registrar/domains/:domain/transfers/:domaintransfer" in

Client.call `DELETE uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/registrar/domains/:domain/transfers/:domaintransfer",
  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}}/:account/registrar/domains/:domain/transfers/:domaintransfer');

echo $response->getBody();
setUrl('{{baseUrl}}/:account/registrar/domains/:domain/transfers/:domaintransfer');
$request->setMethod(HTTP_METH_DELETE);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/:account/registrar/domains/:domain/transfers/:domaintransfer');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/:account/registrar/domains/:domain/transfers/:domaintransfer' -Method DELETE 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/registrar/domains/:domain/transfers/:domaintransfer' -Method DELETE 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("DELETE", "/baseUrl/:account/registrar/domains/:domain/transfers/:domaintransfer")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/registrar/domains/:domain/transfers/:domaintransfer"

response = requests.delete(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/registrar/domains/:domain/transfers/:domaintransfer"

response <- VERB("DELETE", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/:account/registrar/domains/:domain/transfers/:domaintransfer")

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/:account/registrar/domains/:domain/transfers/:domaintransfer') do |req|
end

puts response.status
puts response.body
use std::str::FromStr;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:account/registrar/domains/:domain/transfers/:domaintransfer";

    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}}/:account/registrar/domains/:domain/transfers/:domaintransfer
http DELETE {{baseUrl}}/:account/registrar/domains/:domain/transfers/:domaintransfer
wget --quiet \
  --method DELETE \
  --output-document \
  - {{baseUrl}}/:account/registrar/domains/:domain/transfers/:domaintransfer
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/registrar/domains/:domain/transfers/:domaintransfer")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "id": 1,
    "domain_id": 999,
    "registrant_id": 2,
    "state": "transferring",
    "auto_renew": false,
    "whois_privacy": false,
    "created_at": "2016-12-09T19:43:41Z",
    "updated_at": "2016-12-09T19:43:43Z"
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Not Found"
}
DELETE Disable domain transfer lock
{{baseUrl}}/:account/registrar/domains/:domain/transfer_lock
QUERY PARAMS

account
domain
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/registrar/domains/:domain/transfer_lock");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/delete "{{baseUrl}}/:account/registrar/domains/:domain/transfer_lock")
require "http/client"

url = "{{baseUrl}}/:account/registrar/domains/:domain/transfer_lock"

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}}/:account/registrar/domains/:domain/transfer_lock"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/:account/registrar/domains/:domain/transfer_lock");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/registrar/domains/:domain/transfer_lock"

	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/:account/registrar/domains/:domain/transfer_lock HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/:account/registrar/domains/:domain/transfer_lock")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/registrar/domains/:domain/transfer_lock"))
    .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}}/:account/registrar/domains/:domain/transfer_lock")
  .delete(null)
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/:account/registrar/domains/:domain/transfer_lock")
  .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}}/:account/registrar/domains/:domain/transfer_lock');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'DELETE',
  url: '{{baseUrl}}/:account/registrar/domains/:domain/transfer_lock'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/registrar/domains/:domain/transfer_lock';
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}}/:account/registrar/domains/:domain/transfer_lock',
  method: 'DELETE',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/:account/registrar/domains/:domain/transfer_lock")
  .delete(null)
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'DELETE',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/:account/registrar/domains/:domain/transfer_lock',
  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}}/:account/registrar/domains/:domain/transfer_lock'
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('DELETE', '{{baseUrl}}/:account/registrar/domains/:domain/transfer_lock');

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}}/:account/registrar/domains/:domain/transfer_lock'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/registrar/domains/:domain/transfer_lock';
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}}/:account/registrar/domains/:domain/transfer_lock"]
                                                       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}}/:account/registrar/domains/:domain/transfer_lock" in

Client.call `DELETE uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/registrar/domains/:domain/transfer_lock",
  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}}/:account/registrar/domains/:domain/transfer_lock');

echo $response->getBody();
setUrl('{{baseUrl}}/:account/registrar/domains/:domain/transfer_lock');
$request->setMethod(HTTP_METH_DELETE);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/:account/registrar/domains/:domain/transfer_lock');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/:account/registrar/domains/:domain/transfer_lock' -Method DELETE 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/registrar/domains/:domain/transfer_lock' -Method DELETE 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("DELETE", "/baseUrl/:account/registrar/domains/:domain/transfer_lock")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/registrar/domains/:domain/transfer_lock"

response = requests.delete(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/registrar/domains/:domain/transfer_lock"

response <- VERB("DELETE", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/:account/registrar/domains/:domain/transfer_lock")

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/:account/registrar/domains/:domain/transfer_lock') do |req|
end

puts response.status
puts response.body
use std::str::FromStr;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:account/registrar/domains/:domain/transfer_lock";

    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}}/:account/registrar/domains/:domain/transfer_lock
http DELETE {{baseUrl}}/:account/registrar/domains/:domain/transfer_lock
wget --quiet \
  --method DELETE \
  --output-document \
  - {{baseUrl}}/:account/registrar/domains/:domain/transfer_lock
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/registrar/domains/:domain/transfer_lock")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "enabled": true
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "string",
  "errors": {
    "property1": {
      "field": "string",
      "errors": [
        "string"
      ]
    },
    "property2": {
      "field": "string",
      "errors": [
        "string"
      ]
    }
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Validation failed",
  "errors": {
    "address1": [
      "can't be blank"
    ],
    "city": [
      "can't be blank"
    ],
    "country": [
      "can't be blank"
    ],
    "email": [
      "can't be blank",
      "is an invalid email address"
    ],
    "first_name": [
      "can't be blank"
    ],
    "last_name": [
      "can't be blank"
    ],
    "phone": [
      "can't be blank",
      "is probably not a phone number"
    ],
    "postal_code": [
      "can't be blank"
    ],
    "state_province": [
      "can't be blank"
    ]
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Not Found"
}
GET Domain transfer lock status
{{baseUrl}}/:account/registrar/domains/:domain/transfer_lock
QUERY PARAMS

account
domain
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/registrar/domains/:domain/transfer_lock");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/:account/registrar/domains/:domain/transfer_lock")
require "http/client"

url = "{{baseUrl}}/:account/registrar/domains/:domain/transfer_lock"

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}}/:account/registrar/domains/:domain/transfer_lock"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/:account/registrar/domains/:domain/transfer_lock");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/registrar/domains/:domain/transfer_lock"

	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/:account/registrar/domains/:domain/transfer_lock HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/:account/registrar/domains/:domain/transfer_lock")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/registrar/domains/:domain/transfer_lock"))
    .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}}/:account/registrar/domains/:domain/transfer_lock")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/:account/registrar/domains/:domain/transfer_lock")
  .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}}/:account/registrar/domains/:domain/transfer_lock');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'GET',
  url: '{{baseUrl}}/:account/registrar/domains/:domain/transfer_lock'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/registrar/domains/:domain/transfer_lock';
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}}/:account/registrar/domains/:domain/transfer_lock',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/:account/registrar/domains/:domain/transfer_lock")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/:account/registrar/domains/:domain/transfer_lock',
  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}}/:account/registrar/domains/:domain/transfer_lock'
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/:account/registrar/domains/:domain/transfer_lock');

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}}/:account/registrar/domains/:domain/transfer_lock'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/registrar/domains/:domain/transfer_lock';
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}}/:account/registrar/domains/:domain/transfer_lock"]
                                                       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}}/:account/registrar/domains/:domain/transfer_lock" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/registrar/domains/:domain/transfer_lock",
  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}}/:account/registrar/domains/:domain/transfer_lock');

echo $response->getBody();
setUrl('{{baseUrl}}/:account/registrar/domains/:domain/transfer_lock');
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/:account/registrar/domains/:domain/transfer_lock');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/:account/registrar/domains/:domain/transfer_lock' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/registrar/domains/:domain/transfer_lock' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/:account/registrar/domains/:domain/transfer_lock")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/registrar/domains/:domain/transfer_lock"

response = requests.get(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/registrar/domains/:domain/transfer_lock"

response <- VERB("GET", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/:account/registrar/domains/:domain/transfer_lock")

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/:account/registrar/domains/:domain/transfer_lock') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:account/registrar/domains/:domain/transfer_lock";

    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}}/:account/registrar/domains/:domain/transfer_lock
http GET {{baseUrl}}/:account/registrar/domains/:domain/transfer_lock
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/:account/registrar/domains/:domain/transfer_lock
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/registrar/domains/:domain/transfer_lock")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "enabled": true
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Not Found"
}
POST Enable domain transfer lock
{{baseUrl}}/:account/registrar/domains/:domain/transfer_lock
QUERY PARAMS

account
domain
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/registrar/domains/:domain/transfer_lock");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/:account/registrar/domains/:domain/transfer_lock")
require "http/client"

url = "{{baseUrl}}/:account/registrar/domains/:domain/transfer_lock"

response = HTTP::Client.post url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Post,
    RequestUri = new Uri("{{baseUrl}}/:account/registrar/domains/:domain/transfer_lock"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/:account/registrar/domains/:domain/transfer_lock");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/registrar/domains/:domain/transfer_lock"

	req, _ := http.NewRequest("POST", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
POST /baseUrl/:account/registrar/domains/:domain/transfer_lock HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/:account/registrar/domains/:domain/transfer_lock")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/registrar/domains/:domain/transfer_lock"))
    .method("POST", 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}}/:account/registrar/domains/:domain/transfer_lock")
  .post(null)
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/:account/registrar/domains/:domain/transfer_lock")
  .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('POST', '{{baseUrl}}/:account/registrar/domains/:domain/transfer_lock');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/:account/registrar/domains/:domain/transfer_lock'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/registrar/domains/:domain/transfer_lock';
const options = {method: 'POST'};

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}}/:account/registrar/domains/:domain/transfer_lock',
  method: 'POST',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/:account/registrar/domains/:domain/transfer_lock")
  .post(null)
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'POST',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/:account/registrar/domains/:domain/transfer_lock',
  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: 'POST',
  url: '{{baseUrl}}/:account/registrar/domains/:domain/transfer_lock'
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('POST', '{{baseUrl}}/:account/registrar/domains/:domain/transfer_lock');

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}}/:account/registrar/domains/:domain/transfer_lock'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/registrar/domains/:domain/transfer_lock';
const options = {method: 'POST'};

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}}/:account/registrar/domains/:domain/transfer_lock"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];

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}}/:account/registrar/domains/:domain/transfer_lock" in

Client.call `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/registrar/domains/:domain/transfer_lock",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/:account/registrar/domains/:domain/transfer_lock');

echo $response->getBody();
setUrl('{{baseUrl}}/:account/registrar/domains/:domain/transfer_lock');
$request->setMethod(HTTP_METH_POST);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/:account/registrar/domains/:domain/transfer_lock');
$request->setRequestMethod('POST');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/:account/registrar/domains/:domain/transfer_lock' -Method POST 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/registrar/domains/:domain/transfer_lock' -Method POST 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("POST", "/baseUrl/:account/registrar/domains/:domain/transfer_lock")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/registrar/domains/:domain/transfer_lock"

response = requests.post(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/registrar/domains/:domain/transfer_lock"

response <- VERB("POST", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/:account/registrar/domains/:domain/transfer_lock")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.post('/baseUrl/:account/registrar/domains/:domain/transfer_lock') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:account/registrar/domains/:domain/transfer_lock";

    let client = reqwest::Client::new();
    let response = client.post(url)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request POST \
  --url {{baseUrl}}/:account/registrar/domains/:domain/transfer_lock
http POST {{baseUrl}}/:account/registrar/domains/:domain/transfer_lock
wget --quiet \
  --method POST \
  --output-document \
  - {{baseUrl}}/:account/registrar/domains/:domain/transfer_lock
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/registrar/domains/:domain/transfer_lock")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"

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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "enabled": true
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "string",
  "errors": {
    "property1": {
      "field": "string",
      "errors": [
        "string"
      ]
    },
    "property2": {
      "field": "string",
      "errors": [
        "string"
      ]
    }
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Validation failed",
  "errors": {
    "address1": [
      "can't be blank"
    ],
    "city": [
      "can't be blank"
    ],
    "country": [
      "can't be blank"
    ],
    "email": [
      "can't be blank",
      "is an invalid email address"
    ],
    "first_name": [
      "can't be blank"
    ],
    "last_name": [
      "can't be blank"
    ],
    "phone": [
      "can't be blank",
      "is probably not a phone number"
    ],
    "postal_code": [
      "can't be blank"
    ],
    "state_province": [
      "can't be blank"
    ]
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Not Found"
}
GET Retrieve a domain transfer
{{baseUrl}}/:account/registrar/domains/:domain/transfers/:domaintransfer
QUERY PARAMS

account
domain
domaintransfer
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/registrar/domains/:domain/transfers/:domaintransfer");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/:account/registrar/domains/:domain/transfers/:domaintransfer")
require "http/client"

url = "{{baseUrl}}/:account/registrar/domains/:domain/transfers/:domaintransfer"

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}}/:account/registrar/domains/:domain/transfers/:domaintransfer"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/:account/registrar/domains/:domain/transfers/:domaintransfer");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/registrar/domains/:domain/transfers/:domaintransfer"

	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/:account/registrar/domains/:domain/transfers/:domaintransfer HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/:account/registrar/domains/:domain/transfers/:domaintransfer")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/registrar/domains/:domain/transfers/:domaintransfer"))
    .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}}/:account/registrar/domains/:domain/transfers/:domaintransfer")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/:account/registrar/domains/:domain/transfers/:domaintransfer")
  .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}}/:account/registrar/domains/:domain/transfers/:domaintransfer');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'GET',
  url: '{{baseUrl}}/:account/registrar/domains/:domain/transfers/:domaintransfer'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/registrar/domains/:domain/transfers/:domaintransfer';
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}}/:account/registrar/domains/:domain/transfers/:domaintransfer',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/:account/registrar/domains/:domain/transfers/:domaintransfer")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/:account/registrar/domains/:domain/transfers/:domaintransfer',
  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}}/:account/registrar/domains/:domain/transfers/:domaintransfer'
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/:account/registrar/domains/:domain/transfers/:domaintransfer');

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}}/:account/registrar/domains/:domain/transfers/:domaintransfer'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/registrar/domains/:domain/transfers/:domaintransfer';
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}}/:account/registrar/domains/:domain/transfers/:domaintransfer"]
                                                       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}}/:account/registrar/domains/:domain/transfers/:domaintransfer" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/registrar/domains/:domain/transfers/:domaintransfer",
  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}}/:account/registrar/domains/:domain/transfers/:domaintransfer');

echo $response->getBody();
setUrl('{{baseUrl}}/:account/registrar/domains/:domain/transfers/:domaintransfer');
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/:account/registrar/domains/:domain/transfers/:domaintransfer');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/:account/registrar/domains/:domain/transfers/:domaintransfer' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/registrar/domains/:domain/transfers/:domaintransfer' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/:account/registrar/domains/:domain/transfers/:domaintransfer")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/registrar/domains/:domain/transfers/:domaintransfer"

response = requests.get(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/registrar/domains/:domain/transfers/:domaintransfer"

response <- VERB("GET", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/:account/registrar/domains/:domain/transfers/:domaintransfer")

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/:account/registrar/domains/:domain/transfers/:domaintransfer') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:account/registrar/domains/:domain/transfers/:domaintransfer";

    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}}/:account/registrar/domains/:domain/transfers/:domaintransfer
http GET {{baseUrl}}/:account/registrar/domains/:domain/transfers/:domaintransfer
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/:account/registrar/domains/:domain/transfers/:domaintransfer
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/registrar/domains/:domain/transfers/:domaintransfer")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "id": 1,
    "domain_id": 999,
    "registrant_id": 2,
    "state": "transferring",
    "auto_renew": false,
    "whois_privacy": false,
    "created_at": "2016-12-09T19:43:41Z",
    "updated_at": "2016-12-09T19:43:43Z"
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Not Found"
}
POST Create a primary server
{{baseUrl}}/:account/secondary_dns/primaries
QUERY PARAMS

account
BODY json

{
  "name": "",
  "ip": "",
  "port": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/secondary_dns/primaries");

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  \"name\": \"\",\n  \"ip\": \"\",\n  \"port\": \"\"\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/:account/secondary_dns/primaries" {:content-type :json
                                                                             :form-params {:name ""
                                                                                           :ip ""
                                                                                           :port ""}})
require "http/client"

url = "{{baseUrl}}/:account/secondary_dns/primaries"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"name\": \"\",\n  \"ip\": \"\",\n  \"port\": \"\"\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}}/:account/secondary_dns/primaries"),
    Content = new StringContent("{\n  \"name\": \"\",\n  \"ip\": \"\",\n  \"port\": \"\"\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}}/:account/secondary_dns/primaries");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"name\": \"\",\n  \"ip\": \"\",\n  \"port\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/secondary_dns/primaries"

	payload := strings.NewReader("{\n  \"name\": \"\",\n  \"ip\": \"\",\n  \"port\": \"\"\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/:account/secondary_dns/primaries HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 42

{
  "name": "",
  "ip": "",
  "port": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/:account/secondary_dns/primaries")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"name\": \"\",\n  \"ip\": \"\",\n  \"port\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/secondary_dns/primaries"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"name\": \"\",\n  \"ip\": \"\",\n  \"port\": \"\"\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  \"name\": \"\",\n  \"ip\": \"\",\n  \"port\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/:account/secondary_dns/primaries")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/:account/secondary_dns/primaries")
  .header("content-type", "application/json")
  .body("{\n  \"name\": \"\",\n  \"ip\": \"\",\n  \"port\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  name: '',
  ip: '',
  port: ''
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/:account/secondary_dns/primaries');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/:account/secondary_dns/primaries',
  headers: {'content-type': 'application/json'},
  data: {name: '', ip: '', port: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/secondary_dns/primaries';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"name":"","ip":"","port":""}'
};

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}}/:account/secondary_dns/primaries',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "name": "",\n  "ip": "",\n  "port": ""\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"name\": \"\",\n  \"ip\": \"\",\n  \"port\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/:account/secondary_dns/primaries")
  .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/:account/secondary_dns/primaries',
  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({name: '', ip: '', port: ''}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/:account/secondary_dns/primaries',
  headers: {'content-type': 'application/json'},
  body: {name: '', ip: '', port: ''},
  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}}/:account/secondary_dns/primaries');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  name: '',
  ip: '',
  port: ''
});

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}}/:account/secondary_dns/primaries',
  headers: {'content-type': 'application/json'},
  data: {name: '', ip: '', port: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/secondary_dns/primaries';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"name":"","ip":"","port":""}'
};

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 = @{ @"name": @"",
                              @"ip": @"",
                              @"port": @"" };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/:account/secondary_dns/primaries"]
                                                       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}}/:account/secondary_dns/primaries" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"name\": \"\",\n  \"ip\": \"\",\n  \"port\": \"\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/secondary_dns/primaries",
  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([
    'name' => '',
    'ip' => '',
    'port' => ''
  ]),
  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}}/:account/secondary_dns/primaries', [
  'body' => '{
  "name": "",
  "ip": "",
  "port": ""
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/:account/secondary_dns/primaries');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'name' => '',
  'ip' => '',
  'port' => ''
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'name' => '',
  'ip' => '',
  'port' => ''
]));
$request->setRequestUrl('{{baseUrl}}/:account/secondary_dns/primaries');
$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}}/:account/secondary_dns/primaries' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "name": "",
  "ip": "",
  "port": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/secondary_dns/primaries' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "name": "",
  "ip": "",
  "port": ""
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"name\": \"\",\n  \"ip\": \"\",\n  \"port\": \"\"\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/:account/secondary_dns/primaries", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/secondary_dns/primaries"

payload = {
    "name": "",
    "ip": "",
    "port": ""
}
headers = {"content-type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/secondary_dns/primaries"

payload <- "{\n  \"name\": \"\",\n  \"ip\": \"\",\n  \"port\": \"\"\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}}/:account/secondary_dns/primaries")

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  \"name\": \"\",\n  \"ip\": \"\",\n  \"port\": \"\"\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/:account/secondary_dns/primaries') do |req|
  req.body = "{\n  \"name\": \"\",\n  \"ip\": \"\",\n  \"port\": \"\"\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:account/secondary_dns/primaries";

    let payload = json!({
        "name": "",
        "ip": "",
        "port": ""
    });

    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}}/:account/secondary_dns/primaries \
  --header 'content-type: application/json' \
  --data '{
  "name": "",
  "ip": "",
  "port": ""
}'
echo '{
  "name": "",
  "ip": "",
  "port": ""
}' |  \
  http POST {{baseUrl}}/:account/secondary_dns/primaries \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "name": "",\n  "ip": "",\n  "port": ""\n}' \
  --output-document \
  - {{baseUrl}}/:account/secondary_dns/primaries
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [
  "name": "",
  "ip": "",
  "port": ""
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/secondary_dns/primaries")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "id": 1,
    "account_id": 2020,
    "name": "Primary Server",
    "ip": "1.1.1.1",
    "port": 4567,
    "linked_secondary_zones": [
      "example.com"
    ],
    "created_at": "2016-08-11T10:16:03Z",
    "updated_at": "2016-08-11T10:16:03Z"
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "string",
  "errors": {
    "property1": {
      "field": "string",
      "errors": [
        "string"
      ]
    },
    "property2": {
      "field": "string",
      "errors": [
        "string"
      ]
    }
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Validation failed",
  "errors": {
    "address1": [
      "can't be blank"
    ],
    "city": [
      "can't be blank"
    ],
    "country": [
      "can't be blank"
    ],
    "email": [
      "can't be blank",
      "is an invalid email address"
    ],
    "first_name": [
      "can't be blank"
    ],
    "last_name": [
      "can't be blank"
    ],
    "phone": [
      "can't be blank",
      "is probably not a phone number"
    ],
    "postal_code": [
      "can't be blank"
    ],
    "state_province": [
      "can't be blank"
    ]
  }
}
POST Create a secondary zone
{{baseUrl}}/:account/secondary_dns/zones
QUERY PARAMS

account
BODY json

{
  "name": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/secondary_dns/zones");

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  \"name\": \"\"\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/:account/secondary_dns/zones" {:content-type :json
                                                                         :form-params {:name ""}})
require "http/client"

url = "{{baseUrl}}/:account/secondary_dns/zones"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"name\": \"\"\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}}/:account/secondary_dns/zones"),
    Content = new StringContent("{\n  \"name\": \"\"\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}}/:account/secondary_dns/zones");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"name\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/secondary_dns/zones"

	payload := strings.NewReader("{\n  \"name\": \"\"\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/:account/secondary_dns/zones HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 16

{
  "name": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/:account/secondary_dns/zones")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"name\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/secondary_dns/zones"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"name\": \"\"\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  \"name\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/:account/secondary_dns/zones")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/:account/secondary_dns/zones")
  .header("content-type", "application/json")
  .body("{\n  \"name\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  name: ''
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/:account/secondary_dns/zones');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/:account/secondary_dns/zones',
  headers: {'content-type': 'application/json'},
  data: {name: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/secondary_dns/zones';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"name":""}'
};

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}}/:account/secondary_dns/zones',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "name": ""\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"name\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/:account/secondary_dns/zones")
  .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/:account/secondary_dns/zones',
  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({name: ''}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/:account/secondary_dns/zones',
  headers: {'content-type': 'application/json'},
  body: {name: ''},
  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}}/:account/secondary_dns/zones');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  name: ''
});

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}}/:account/secondary_dns/zones',
  headers: {'content-type': 'application/json'},
  data: {name: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/secondary_dns/zones';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"name":""}'
};

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 = @{ @"name": @"" };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/:account/secondary_dns/zones"]
                                                       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}}/:account/secondary_dns/zones" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"name\": \"\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/secondary_dns/zones",
  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([
    'name' => ''
  ]),
  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}}/:account/secondary_dns/zones', [
  'body' => '{
  "name": ""
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/:account/secondary_dns/zones');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'name' => ''
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'name' => ''
]));
$request->setRequestUrl('{{baseUrl}}/:account/secondary_dns/zones');
$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}}/:account/secondary_dns/zones' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "name": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/secondary_dns/zones' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "name": ""
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"name\": \"\"\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/:account/secondary_dns/zones", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/secondary_dns/zones"

payload = { "name": "" }
headers = {"content-type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/secondary_dns/zones"

payload <- "{\n  \"name\": \"\"\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}}/:account/secondary_dns/zones")

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  \"name\": \"\"\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/:account/secondary_dns/zones') do |req|
  req.body = "{\n  \"name\": \"\"\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:account/secondary_dns/zones";

    let payload = json!({"name": ""});

    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}}/:account/secondary_dns/zones \
  --header 'content-type: application/json' \
  --data '{
  "name": ""
}'
echo '{
  "name": ""
}' |  \
  http POST {{baseUrl}}/:account/secondary_dns/zones \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "name": ""\n}' \
  --output-document \
  - {{baseUrl}}/:account/secondary_dns/zones
import Foundation

let headers = ["content-type": "application/json"]
let parameters = ["name": ""] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/secondary_dns/zones")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "id": 1,
    "account_id": 1010,
    "name": "example-alpha.com",
    "reverse": false,
    "secondary": false,
    "last_transferred_at": null,
    "active": true,
    "created_at": "2015-04-23T07:40:03Z",
    "updated_at": "2015-04-23T07:40:03Z"
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "string",
  "errors": {
    "property1": {
      "field": "string",
      "errors": [
        "string"
      ]
    },
    "property2": {
      "field": "string",
      "errors": [
        "string"
      ]
    }
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Validation failed",
  "errors": {
    "address1": [
      "can't be blank"
    ],
    "city": [
      "can't be blank"
    ],
    "country": [
      "can't be blank"
    ],
    "email": [
      "can't be blank",
      "is an invalid email address"
    ],
    "first_name": [
      "can't be blank"
    ],
    "last_name": [
      "can't be blank"
    ],
    "phone": [
      "can't be blank",
      "is probably not a phone number"
    ],
    "postal_code": [
      "can't be blank"
    ],
    "state_province": [
      "can't be blank"
    ]
  }
}
DELETE Delete a primary server
{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver
QUERY PARAMS

account
primaryserver
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/delete "{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver")
require "http/client"

url = "{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver"

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}}/:account/secondary_dns/primaries/:primaryserver"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver"

	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/:account/secondary_dns/primaries/:primaryserver HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver"))
    .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}}/:account/secondary_dns/primaries/:primaryserver")
  .delete(null)
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver")
  .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}}/:account/secondary_dns/primaries/:primaryserver');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'DELETE',
  url: '{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver';
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}}/:account/secondary_dns/primaries/:primaryserver',
  method: 'DELETE',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver")
  .delete(null)
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'DELETE',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/:account/secondary_dns/primaries/:primaryserver',
  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}}/:account/secondary_dns/primaries/:primaryserver'
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('DELETE', '{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver');

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}}/:account/secondary_dns/primaries/:primaryserver'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver';
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}}/:account/secondary_dns/primaries/:primaryserver"]
                                                       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}}/:account/secondary_dns/primaries/:primaryserver" in

Client.call `DELETE uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver",
  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}}/:account/secondary_dns/primaries/:primaryserver');

echo $response->getBody();
setUrl('{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver');
$request->setMethod(HTTP_METH_DELETE);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver' -Method DELETE 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver' -Method DELETE 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("DELETE", "/baseUrl/:account/secondary_dns/primaries/:primaryserver")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver"

response = requests.delete(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver"

response <- VERB("DELETE", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver")

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/:account/secondary_dns/primaries/:primaryserver') do |req|
end

puts response.status
puts response.body
use std::str::FromStr;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver";

    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}}/:account/secondary_dns/primaries/:primaryserver
http DELETE {{baseUrl}}/:account/secondary_dns/primaries/:primaryserver
wget --quiet \
  --method DELETE \
  --output-document \
  - {{baseUrl}}/:account/secondary_dns/primaries/:primaryserver
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Not Found"
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver/link");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/put "{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver/link")
require "http/client"

url = "{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver/link"

response = HTTP::Client.put url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Put,
    RequestUri = new Uri("{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver/link"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver/link");
var request = new RestRequest("", Method.Put);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver/link"

	req, _ := http.NewRequest("PUT", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
PUT /baseUrl/:account/secondary_dns/primaries/:primaryserver/link HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver/link")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver/link"))
    .method("PUT", 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}}/:account/secondary_dns/primaries/:primaryserver/link")
  .put(null)
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver/link")
  .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('PUT', '{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver/link');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'PUT',
  url: '{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver/link'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver/link';
const options = {method: 'PUT'};

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}}/:account/secondary_dns/primaries/:primaryserver/link',
  method: 'PUT',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver/link")
  .put(null)
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'PUT',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/:account/secondary_dns/primaries/:primaryserver/link',
  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: 'PUT',
  url: '{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver/link'
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('PUT', '{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver/link');

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}}/:account/secondary_dns/primaries/:primaryserver/link'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver/link';
const options = {method: 'PUT'};

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}}/:account/secondary_dns/primaries/:primaryserver/link"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];

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}}/:account/secondary_dns/primaries/:primaryserver/link" in

Client.call `PUT uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver/link",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PUT",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('PUT', '{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver/link');

echo $response->getBody();
setUrl('{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver/link');
$request->setMethod(HTTP_METH_PUT);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver/link');
$request->setRequestMethod('PUT');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver/link' -Method PUT 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver/link' -Method PUT 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("PUT", "/baseUrl/:account/secondary_dns/primaries/:primaryserver/link")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver/link"

response = requests.put(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver/link"

response <- VERB("PUT", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver/link")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.put('/baseUrl/:account/secondary_dns/primaries/:primaryserver/link') do |req|
end

puts response.status
puts response.body
use std::str::FromStr;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver/link";

    let client = reqwest::Client::new();
    let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request PUT \
  --url {{baseUrl}}/:account/secondary_dns/primaries/:primaryserver/link
http PUT {{baseUrl}}/:account/secondary_dns/primaries/:primaryserver/link
wget --quiet \
  --method PUT \
  --output-document \
  - {{baseUrl}}/:account/secondary_dns/primaries/:primaryserver/link
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver/link")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"

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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "id": 1,
    "account_id": 2020,
    "name": "Primary Server",
    "ip": "1.1.1.1",
    "port": 4567,
    "linked_secondary_zones": [
      "example.com"
    ],
    "created_at": "2016-08-11T10:16:03Z",
    "updated_at": "2016-08-11T10:16:03Z"
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "string",
  "errors": {
    "property1": {
      "field": "string",
      "errors": [
        "string"
      ]
    },
    "property2": {
      "field": "string",
      "errors": [
        "string"
      ]
    }
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Validation failed",
  "errors": {
    "address1": [
      "can't be blank"
    ],
    "city": [
      "can't be blank"
    ],
    "country": [
      "can't be blank"
    ],
    "email": [
      "can't be blank",
      "is an invalid email address"
    ],
    "first_name": [
      "can't be blank"
    ],
    "last_name": [
      "can't be blank"
    ],
    "phone": [
      "can't be blank",
      "is probably not a phone number"
    ],
    "postal_code": [
      "can't be blank"
    ],
    "state_province": [
      "can't be blank"
    ]
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Not Found"
}
GET List primary servers
{{baseUrl}}/:account/secondary_dns/primaries
QUERY PARAMS

account
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/secondary_dns/primaries");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/:account/secondary_dns/primaries")
require "http/client"

url = "{{baseUrl}}/:account/secondary_dns/primaries"

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}}/:account/secondary_dns/primaries"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/:account/secondary_dns/primaries");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/secondary_dns/primaries"

	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/:account/secondary_dns/primaries HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/:account/secondary_dns/primaries")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/secondary_dns/primaries"))
    .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}}/:account/secondary_dns/primaries")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/:account/secondary_dns/primaries")
  .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}}/:account/secondary_dns/primaries');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'GET',
  url: '{{baseUrl}}/:account/secondary_dns/primaries'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/secondary_dns/primaries';
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}}/:account/secondary_dns/primaries',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/:account/secondary_dns/primaries")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/:account/secondary_dns/primaries',
  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}}/:account/secondary_dns/primaries'
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/:account/secondary_dns/primaries');

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}}/:account/secondary_dns/primaries'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/secondary_dns/primaries';
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}}/:account/secondary_dns/primaries"]
                                                       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}}/:account/secondary_dns/primaries" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/secondary_dns/primaries",
  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}}/:account/secondary_dns/primaries');

echo $response->getBody();
setUrl('{{baseUrl}}/:account/secondary_dns/primaries');
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/:account/secondary_dns/primaries');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/:account/secondary_dns/primaries' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/secondary_dns/primaries' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/:account/secondary_dns/primaries")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/secondary_dns/primaries"

response = requests.get(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/secondary_dns/primaries"

response <- VERB("GET", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/:account/secondary_dns/primaries")

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/:account/secondary_dns/primaries') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:account/secondary_dns/primaries";

    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}}/:account/secondary_dns/primaries
http GET {{baseUrl}}/:account/secondary_dns/primaries
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/:account/secondary_dns/primaries
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/secondary_dns/primaries")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": [
    {
      "id": 1,
      "account_id": 2020,
      "name": "Primary Server",
      "ip": "1.1.1.1",
      "port": 4567,
      "linked_secondary_zones": [
        "example.com"
      ],
      "created_at": "2016-08-11T10:16:03Z",
      "updated_at": "2016-08-11T10:16:03Z"
    }
  ],
  "pagination": {
    "current_page": 1,
    "per_page": 30,
    "total_entries": 2,
    "total_pages": 1
  }
}
GET Retrieve a primary server
{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver
QUERY PARAMS

account
primaryserver
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver")
require "http/client"

url = "{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver"

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}}/:account/secondary_dns/primaries/:primaryserver"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver"

	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/:account/secondary_dns/primaries/:primaryserver HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver"))
    .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}}/:account/secondary_dns/primaries/:primaryserver")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver")
  .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}}/:account/secondary_dns/primaries/:primaryserver');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'GET',
  url: '{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver';
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}}/:account/secondary_dns/primaries/:primaryserver',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/:account/secondary_dns/primaries/:primaryserver',
  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}}/:account/secondary_dns/primaries/:primaryserver'
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver');

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}}/:account/secondary_dns/primaries/:primaryserver'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver';
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}}/:account/secondary_dns/primaries/:primaryserver"]
                                                       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}}/:account/secondary_dns/primaries/:primaryserver" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver",
  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}}/:account/secondary_dns/primaries/:primaryserver');

echo $response->getBody();
setUrl('{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver');
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/:account/secondary_dns/primaries/:primaryserver")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver"

response = requests.get(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver"

response <- VERB("GET", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver")

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/:account/secondary_dns/primaries/:primaryserver') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver";

    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}}/:account/secondary_dns/primaries/:primaryserver
http GET {{baseUrl}}/:account/secondary_dns/primaries/:primaryserver
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/:account/secondary_dns/primaries/:primaryserver
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "id": 1,
    "account_id": 2020,
    "name": "Primary Server",
    "ip": "1.1.1.1",
    "port": 4567,
    "linked_secondary_zones": [
      "example.com"
    ],
    "created_at": "2016-08-11T10:16:03Z",
    "updated_at": "2016-08-11T10:16:03Z"
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "string",
  "errors": {
    "property1": {
      "field": "string",
      "errors": [
        "string"
      ]
    },
    "property2": {
      "field": "string",
      "errors": [
        "string"
      ]
    }
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Validation failed",
  "errors": {
    "address1": [
      "can't be blank"
    ],
    "city": [
      "can't be blank"
    ],
    "country": [
      "can't be blank"
    ],
    "email": [
      "can't be blank",
      "is an invalid email address"
    ],
    "first_name": [
      "can't be blank"
    ],
    "last_name": [
      "can't be blank"
    ],
    "phone": [
      "can't be blank",
      "is probably not a phone number"
    ],
    "postal_code": [
      "can't be blank"
    ],
    "state_province": [
      "can't be blank"
    ]
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Not Found"
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver/unlink");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/put "{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver/unlink")
require "http/client"

url = "{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver/unlink"

response = HTTP::Client.put url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Put,
    RequestUri = new Uri("{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver/unlink"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver/unlink");
var request = new RestRequest("", Method.Put);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver/unlink"

	req, _ := http.NewRequest("PUT", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
PUT /baseUrl/:account/secondary_dns/primaries/:primaryserver/unlink HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver/unlink")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver/unlink"))
    .method("PUT", 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}}/:account/secondary_dns/primaries/:primaryserver/unlink")
  .put(null)
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver/unlink")
  .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('PUT', '{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver/unlink');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'PUT',
  url: '{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver/unlink'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver/unlink';
const options = {method: 'PUT'};

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}}/:account/secondary_dns/primaries/:primaryserver/unlink',
  method: 'PUT',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver/unlink")
  .put(null)
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'PUT',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/:account/secondary_dns/primaries/:primaryserver/unlink',
  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: 'PUT',
  url: '{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver/unlink'
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('PUT', '{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver/unlink');

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}}/:account/secondary_dns/primaries/:primaryserver/unlink'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver/unlink';
const options = {method: 'PUT'};

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}}/:account/secondary_dns/primaries/:primaryserver/unlink"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];

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}}/:account/secondary_dns/primaries/:primaryserver/unlink" in

Client.call `PUT uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver/unlink",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PUT",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('PUT', '{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver/unlink');

echo $response->getBody();
setUrl('{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver/unlink');
$request->setMethod(HTTP_METH_PUT);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver/unlink');
$request->setRequestMethod('PUT');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver/unlink' -Method PUT 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver/unlink' -Method PUT 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("PUT", "/baseUrl/:account/secondary_dns/primaries/:primaryserver/unlink")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver/unlink"

response = requests.put(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver/unlink"

response <- VERB("PUT", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver/unlink")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.put('/baseUrl/:account/secondary_dns/primaries/:primaryserver/unlink') do |req|
end

puts response.status
puts response.body
use std::str::FromStr;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver/unlink";

    let client = reqwest::Client::new();
    let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request PUT \
  --url {{baseUrl}}/:account/secondary_dns/primaries/:primaryserver/unlink
http PUT {{baseUrl}}/:account/secondary_dns/primaries/:primaryserver/unlink
wget --quiet \
  --method PUT \
  --output-document \
  - {{baseUrl}}/:account/secondary_dns/primaries/:primaryserver/unlink
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/secondary_dns/primaries/:primaryserver/unlink")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"

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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "id": 1,
    "account_id": 2020,
    "name": "Primary Server",
    "ip": "1.1.1.1",
    "port": 4567,
    "linked_secondary_zones": [
      "example.com"
    ],
    "created_at": "2016-08-11T10:16:03Z",
    "updated_at": "2016-08-11T10:16:03Z"
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "string",
  "errors": {
    "property1": {
      "field": "string",
      "errors": [
        "string"
      ]
    },
    "property2": {
      "field": "string",
      "errors": [
        "string"
      ]
    }
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Validation failed",
  "errors": {
    "address1": [
      "can't be blank"
    ],
    "city": [
      "can't be blank"
    ],
    "country": [
      "can't be blank"
    ],
    "email": [
      "can't be blank",
      "is an invalid email address"
    ],
    "first_name": [
      "can't be blank"
    ],
    "last_name": [
      "can't be blank"
    ],
    "phone": [
      "can't be blank",
      "is probably not a phone number"
    ],
    "postal_code": [
      "can't be blank"
    ],
    "state_province": [
      "can't be blank"
    ]
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Not Found"
}
POST Apply a template
{{baseUrl}}/:account/domains/:domain/templates/:template
QUERY PARAMS

account
domain
template
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/domains/:domain/templates/:template");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/:account/domains/:domain/templates/:template")
require "http/client"

url = "{{baseUrl}}/:account/domains/:domain/templates/:template"

response = HTTP::Client.post url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Post,
    RequestUri = new Uri("{{baseUrl}}/:account/domains/:domain/templates/:template"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/:account/domains/:domain/templates/:template");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/domains/:domain/templates/:template"

	req, _ := http.NewRequest("POST", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
POST /baseUrl/:account/domains/:domain/templates/:template HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/:account/domains/:domain/templates/:template")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/domains/:domain/templates/:template"))
    .method("POST", 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}}/:account/domains/:domain/templates/:template")
  .post(null)
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/:account/domains/:domain/templates/:template")
  .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('POST', '{{baseUrl}}/:account/domains/:domain/templates/:template');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/:account/domains/:domain/templates/:template'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/domains/:domain/templates/:template';
const options = {method: 'POST'};

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}}/:account/domains/:domain/templates/:template',
  method: 'POST',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/:account/domains/:domain/templates/:template")
  .post(null)
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'POST',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/:account/domains/:domain/templates/:template',
  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: 'POST',
  url: '{{baseUrl}}/:account/domains/:domain/templates/:template'
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('POST', '{{baseUrl}}/:account/domains/:domain/templates/:template');

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}}/:account/domains/:domain/templates/:template'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/domains/:domain/templates/:template';
const options = {method: 'POST'};

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}}/:account/domains/:domain/templates/:template"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];

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}}/:account/domains/:domain/templates/:template" in

Client.call `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/domains/:domain/templates/:template",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/:account/domains/:domain/templates/:template');

echo $response->getBody();
setUrl('{{baseUrl}}/:account/domains/:domain/templates/:template');
$request->setMethod(HTTP_METH_POST);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/:account/domains/:domain/templates/:template');
$request->setRequestMethod('POST');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/:account/domains/:domain/templates/:template' -Method POST 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/domains/:domain/templates/:template' -Method POST 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("POST", "/baseUrl/:account/domains/:domain/templates/:template")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/domains/:domain/templates/:template"

response = requests.post(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/domains/:domain/templates/:template"

response <- VERB("POST", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/:account/domains/:domain/templates/:template")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.post('/baseUrl/:account/domains/:domain/templates/:template') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:account/domains/:domain/templates/:template";

    let client = reqwest::Client::new();
    let response = client.post(url)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request POST \
  --url {{baseUrl}}/:account/domains/:domain/templates/:template
http POST {{baseUrl}}/:account/domains/:domain/templates/:template
wget --quiet \
  --method POST \
  --output-document \
  - {{baseUrl}}/:account/domains/:domain/templates/:template
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/domains/:domain/templates/:template")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"

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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Not Found"
}
POST Create a template record
{{baseUrl}}/:account/templates/:template/records
QUERY PARAMS

account
template
BODY json

{
  "name": "",
  "type": "",
  "content": "",
  "ttl": 0,
  "priority": 0
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/templates/:template/records");

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  \"name\": \"\",\n  \"type\": \"\",\n  \"content\": \"\",\n  \"ttl\": 0,\n  \"priority\": 0\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/:account/templates/:template/records" {:content-type :json
                                                                                 :form-params {:name ""
                                                                                               :type ""
                                                                                               :content ""
                                                                                               :ttl 0
                                                                                               :priority 0}})
require "http/client"

url = "{{baseUrl}}/:account/templates/:template/records"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"name\": \"\",\n  \"type\": \"\",\n  \"content\": \"\",\n  \"ttl\": 0,\n  \"priority\": 0\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}}/:account/templates/:template/records"),
    Content = new StringContent("{\n  \"name\": \"\",\n  \"type\": \"\",\n  \"content\": \"\",\n  \"ttl\": 0,\n  \"priority\": 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}}/:account/templates/:template/records");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"name\": \"\",\n  \"type\": \"\",\n  \"content\": \"\",\n  \"ttl\": 0,\n  \"priority\": 0\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/templates/:template/records"

	payload := strings.NewReader("{\n  \"name\": \"\",\n  \"type\": \"\",\n  \"content\": \"\",\n  \"ttl\": 0,\n  \"priority\": 0\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/:account/templates/:template/records HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 76

{
  "name": "",
  "type": "",
  "content": "",
  "ttl": 0,
  "priority": 0
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/:account/templates/:template/records")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"name\": \"\",\n  \"type\": \"\",\n  \"content\": \"\",\n  \"ttl\": 0,\n  \"priority\": 0\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/templates/:template/records"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"name\": \"\",\n  \"type\": \"\",\n  \"content\": \"\",\n  \"ttl\": 0,\n  \"priority\": 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  \"name\": \"\",\n  \"type\": \"\",\n  \"content\": \"\",\n  \"ttl\": 0,\n  \"priority\": 0\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/:account/templates/:template/records")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/:account/templates/:template/records")
  .header("content-type", "application/json")
  .body("{\n  \"name\": \"\",\n  \"type\": \"\",\n  \"content\": \"\",\n  \"ttl\": 0,\n  \"priority\": 0\n}")
  .asString();
const data = JSON.stringify({
  name: '',
  type: '',
  content: '',
  ttl: 0,
  priority: 0
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/:account/templates/:template/records');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/:account/templates/:template/records',
  headers: {'content-type': 'application/json'},
  data: {name: '', type: '', content: '', ttl: 0, priority: 0}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/templates/:template/records';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"name":"","type":"","content":"","ttl":0,"priority":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}}/:account/templates/:template/records',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "name": "",\n  "type": "",\n  "content": "",\n  "ttl": 0,\n  "priority": 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  \"name\": \"\",\n  \"type\": \"\",\n  \"content\": \"\",\n  \"ttl\": 0,\n  \"priority\": 0\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/:account/templates/:template/records")
  .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/:account/templates/:template/records',
  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({name: '', type: '', content: '', ttl: 0, priority: 0}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/:account/templates/:template/records',
  headers: {'content-type': 'application/json'},
  body: {name: '', type: '', content: '', ttl: 0, priority: 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('POST', '{{baseUrl}}/:account/templates/:template/records');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  name: '',
  type: '',
  content: '',
  ttl: 0,
  priority: 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: 'POST',
  url: '{{baseUrl}}/:account/templates/:template/records',
  headers: {'content-type': 'application/json'},
  data: {name: '', type: '', content: '', ttl: 0, priority: 0}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/templates/:template/records';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"name":"","type":"","content":"","ttl":0,"priority":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 = @{ @"name": @"",
                              @"type": @"",
                              @"content": @"",
                              @"ttl": @0,
                              @"priority": @0 };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/:account/templates/:template/records"]
                                                       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}}/:account/templates/:template/records" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"name\": \"\",\n  \"type\": \"\",\n  \"content\": \"\",\n  \"ttl\": 0,\n  \"priority\": 0\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/templates/:template/records",
  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([
    'name' => '',
    'type' => '',
    'content' => '',
    'ttl' => 0,
    'priority' => 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('POST', '{{baseUrl}}/:account/templates/:template/records', [
  'body' => '{
  "name": "",
  "type": "",
  "content": "",
  "ttl": 0,
  "priority": 0
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/:account/templates/:template/records');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'name' => '',
  'type' => '',
  'content' => '',
  'ttl' => 0,
  'priority' => 0
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'name' => '',
  'type' => '',
  'content' => '',
  'ttl' => 0,
  'priority' => 0
]));
$request->setRequestUrl('{{baseUrl}}/:account/templates/:template/records');
$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}}/:account/templates/:template/records' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "name": "",
  "type": "",
  "content": "",
  "ttl": 0,
  "priority": 0
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/templates/:template/records' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "name": "",
  "type": "",
  "content": "",
  "ttl": 0,
  "priority": 0
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"name\": \"\",\n  \"type\": \"\",\n  \"content\": \"\",\n  \"ttl\": 0,\n  \"priority\": 0\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/:account/templates/:template/records", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/templates/:template/records"

payload = {
    "name": "",
    "type": "",
    "content": "",
    "ttl": 0,
    "priority": 0
}
headers = {"content-type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/templates/:template/records"

payload <- "{\n  \"name\": \"\",\n  \"type\": \"\",\n  \"content\": \"\",\n  \"ttl\": 0,\n  \"priority\": 0\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}}/:account/templates/:template/records")

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  \"name\": \"\",\n  \"type\": \"\",\n  \"content\": \"\",\n  \"ttl\": 0,\n  \"priority\": 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.post('/baseUrl/:account/templates/:template/records') do |req|
  req.body = "{\n  \"name\": \"\",\n  \"type\": \"\",\n  \"content\": \"\",\n  \"ttl\": 0,\n  \"priority\": 0\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:account/templates/:template/records";

    let payload = json!({
        "name": "",
        "type": "",
        "content": "",
        "ttl": 0,
        "priority": 0
    });

    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}}/:account/templates/:template/records \
  --header 'content-type: application/json' \
  --data '{
  "name": "",
  "type": "",
  "content": "",
  "ttl": 0,
  "priority": 0
}'
echo '{
  "name": "",
  "type": "",
  "content": "",
  "ttl": 0,
  "priority": 0
}' |  \
  http POST {{baseUrl}}/:account/templates/:template/records \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "name": "",\n  "type": "",\n  "content": "",\n  "ttl": 0,\n  "priority": 0\n}' \
  --output-document \
  - {{baseUrl}}/:account/templates/:template/records
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [
  "name": "",
  "type": "",
  "content": "",
  "ttl": 0,
  "priority": 0
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/templates/:template/records")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "id": 296,
    "template_id": 268,
    "name": "",
    "content": "192.168.1.1",
    "ttl": 3600,
    "priority": null,
    "type": "A",
    "created_at": "2016-04-26T08:23:54Z",
    "updated_at": "2016-04-26T08:23:54Z"
  }
}
POST Create a template
{{baseUrl}}/:account/templates
QUERY PARAMS

account
BODY json

{
  "sid": "",
  "name": "",
  "description": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/templates");

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  \"sid\": \"\",\n  \"name\": \"\",\n  \"description\": \"\"\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/:account/templates" {:content-type :json
                                                               :form-params {:sid ""
                                                                             :name ""
                                                                             :description ""}})
require "http/client"

url = "{{baseUrl}}/:account/templates"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"sid\": \"\",\n  \"name\": \"\",\n  \"description\": \"\"\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}}/:account/templates"),
    Content = new StringContent("{\n  \"sid\": \"\",\n  \"name\": \"\",\n  \"description\": \"\"\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}}/:account/templates");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"sid\": \"\",\n  \"name\": \"\",\n  \"description\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/templates"

	payload := strings.NewReader("{\n  \"sid\": \"\",\n  \"name\": \"\",\n  \"description\": \"\"\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/:account/templates HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 50

{
  "sid": "",
  "name": "",
  "description": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/:account/templates")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"sid\": \"\",\n  \"name\": \"\",\n  \"description\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/templates"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"sid\": \"\",\n  \"name\": \"\",\n  \"description\": \"\"\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  \"sid\": \"\",\n  \"name\": \"\",\n  \"description\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/:account/templates")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/:account/templates")
  .header("content-type", "application/json")
  .body("{\n  \"sid\": \"\",\n  \"name\": \"\",\n  \"description\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  sid: '',
  name: '',
  description: ''
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/:account/templates');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/:account/templates',
  headers: {'content-type': 'application/json'},
  data: {sid: '', name: '', description: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/templates';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"sid":"","name":"","description":""}'
};

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}}/:account/templates',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "sid": "",\n  "name": "",\n  "description": ""\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"sid\": \"\",\n  \"name\": \"\",\n  \"description\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/:account/templates")
  .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/:account/templates',
  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({sid: '', name: '', description: ''}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/:account/templates',
  headers: {'content-type': 'application/json'},
  body: {sid: '', name: '', description: ''},
  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}}/:account/templates');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  sid: '',
  name: '',
  description: ''
});

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}}/:account/templates',
  headers: {'content-type': 'application/json'},
  data: {sid: '', name: '', description: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/templates';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"sid":"","name":"","description":""}'
};

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 = @{ @"sid": @"",
                              @"name": @"",
                              @"description": @"" };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/:account/templates"]
                                                       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}}/:account/templates" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"sid\": \"\",\n  \"name\": \"\",\n  \"description\": \"\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/templates",
  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([
    'sid' => '',
    'name' => '',
    'description' => ''
  ]),
  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}}/:account/templates', [
  'body' => '{
  "sid": "",
  "name": "",
  "description": ""
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/:account/templates');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'sid' => '',
  'name' => '',
  'description' => ''
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'sid' => '',
  'name' => '',
  'description' => ''
]));
$request->setRequestUrl('{{baseUrl}}/:account/templates');
$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}}/:account/templates' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "sid": "",
  "name": "",
  "description": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/templates' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "sid": "",
  "name": "",
  "description": ""
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"sid\": \"\",\n  \"name\": \"\",\n  \"description\": \"\"\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/:account/templates", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/templates"

payload = {
    "sid": "",
    "name": "",
    "description": ""
}
headers = {"content-type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/templates"

payload <- "{\n  \"sid\": \"\",\n  \"name\": \"\",\n  \"description\": \"\"\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}}/:account/templates")

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  \"sid\": \"\",\n  \"name\": \"\",\n  \"description\": \"\"\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/:account/templates') do |req|
  req.body = "{\n  \"sid\": \"\",\n  \"name\": \"\",\n  \"description\": \"\"\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:account/templates";

    let payload = json!({
        "sid": "",
        "name": "",
        "description": ""
    });

    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}}/:account/templates \
  --header 'content-type: application/json' \
  --data '{
  "sid": "",
  "name": "",
  "description": ""
}'
echo '{
  "sid": "",
  "name": "",
  "description": ""
}' |  \
  http POST {{baseUrl}}/:account/templates \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "sid": "",\n  "name": "",\n  "description": ""\n}' \
  --output-document \
  - {{baseUrl}}/:account/templates
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [
  "sid": "",
  "name": "",
  "description": ""
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/templates")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "id": 1,
    "account_id": 1010,
    "name": "Alpha",
    "sid": "alpha",
    "description": "An alpha template.",
    "created_at": "2016-03-22T11:08:58Z",
    "updated_at": "2016-03-22T11:08:58Z"
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "string",
  "errors": {
    "property1": {
      "field": "string",
      "errors": [
        "string"
      ]
    },
    "property2": {
      "field": "string",
      "errors": [
        "string"
      ]
    }
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Validation failed",
  "errors": {
    "address1": [
      "can't be blank"
    ],
    "city": [
      "can't be blank"
    ],
    "country": [
      "can't be blank"
    ],
    "email": [
      "can't be blank",
      "is an invalid email address"
    ],
    "first_name": [
      "can't be blank"
    ],
    "last_name": [
      "can't be blank"
    ],
    "phone": [
      "can't be blank",
      "is probably not a phone number"
    ],
    "postal_code": [
      "can't be blank"
    ],
    "state_province": [
      "can't be blank"
    ]
  }
}
DELETE Delete a template record
{{baseUrl}}/:account/templates/:template/records/:templaterecord
QUERY PARAMS

account
template
templaterecord
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/templates/:template/records/:templaterecord");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/delete "{{baseUrl}}/:account/templates/:template/records/:templaterecord")
require "http/client"

url = "{{baseUrl}}/:account/templates/:template/records/:templaterecord"

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}}/:account/templates/:template/records/:templaterecord"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/:account/templates/:template/records/:templaterecord");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/templates/:template/records/:templaterecord"

	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/:account/templates/:template/records/:templaterecord HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/:account/templates/:template/records/:templaterecord")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/templates/:template/records/:templaterecord"))
    .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}}/:account/templates/:template/records/:templaterecord")
  .delete(null)
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/:account/templates/:template/records/:templaterecord")
  .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}}/:account/templates/:template/records/:templaterecord');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'DELETE',
  url: '{{baseUrl}}/:account/templates/:template/records/:templaterecord'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/templates/:template/records/:templaterecord';
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}}/:account/templates/:template/records/:templaterecord',
  method: 'DELETE',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/:account/templates/:template/records/:templaterecord")
  .delete(null)
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'DELETE',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/:account/templates/:template/records/:templaterecord',
  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}}/:account/templates/:template/records/:templaterecord'
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('DELETE', '{{baseUrl}}/:account/templates/:template/records/:templaterecord');

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}}/:account/templates/:template/records/:templaterecord'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/templates/:template/records/:templaterecord';
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}}/:account/templates/:template/records/:templaterecord"]
                                                       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}}/:account/templates/:template/records/:templaterecord" in

Client.call `DELETE uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/templates/:template/records/:templaterecord",
  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}}/:account/templates/:template/records/:templaterecord');

echo $response->getBody();
setUrl('{{baseUrl}}/:account/templates/:template/records/:templaterecord');
$request->setMethod(HTTP_METH_DELETE);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/:account/templates/:template/records/:templaterecord');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/:account/templates/:template/records/:templaterecord' -Method DELETE 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/templates/:template/records/:templaterecord' -Method DELETE 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("DELETE", "/baseUrl/:account/templates/:template/records/:templaterecord")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/templates/:template/records/:templaterecord"

response = requests.delete(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/templates/:template/records/:templaterecord"

response <- VERB("DELETE", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/:account/templates/:template/records/:templaterecord")

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/:account/templates/:template/records/:templaterecord') do |req|
end

puts response.status
puts response.body
use std::str::FromStr;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:account/templates/:template/records/:templaterecord";

    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}}/:account/templates/:template/records/:templaterecord
http DELETE {{baseUrl}}/:account/templates/:template/records/:templaterecord
wget --quiet \
  --method DELETE \
  --output-document \
  - {{baseUrl}}/:account/templates/:template/records/:templaterecord
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/templates/:template/records/:templaterecord")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Not Found"
}
DELETE Delete a template
{{baseUrl}}/:account/templates/:template
QUERY PARAMS

account
template
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/templates/:template");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/delete "{{baseUrl}}/:account/templates/:template")
require "http/client"

url = "{{baseUrl}}/:account/templates/:template"

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}}/:account/templates/:template"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/:account/templates/:template");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/templates/:template"

	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/:account/templates/:template HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/:account/templates/:template")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/templates/:template"))
    .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}}/:account/templates/:template")
  .delete(null)
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/:account/templates/:template")
  .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}}/:account/templates/:template');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'DELETE',
  url: '{{baseUrl}}/:account/templates/:template'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/templates/:template';
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}}/:account/templates/:template',
  method: 'DELETE',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/:account/templates/:template")
  .delete(null)
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'DELETE',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/:account/templates/:template',
  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}}/:account/templates/:template'
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('DELETE', '{{baseUrl}}/:account/templates/:template');

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}}/:account/templates/:template'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/templates/:template';
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}}/:account/templates/:template"]
                                                       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}}/:account/templates/:template" in

Client.call `DELETE uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/templates/:template",
  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}}/:account/templates/:template');

echo $response->getBody();
setUrl('{{baseUrl}}/:account/templates/:template');
$request->setMethod(HTTP_METH_DELETE);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/:account/templates/:template');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/:account/templates/:template' -Method DELETE 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/templates/:template' -Method DELETE 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("DELETE", "/baseUrl/:account/templates/:template")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/templates/:template"

response = requests.delete(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/templates/:template"

response <- VERB("DELETE", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/:account/templates/:template")

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/:account/templates/:template') do |req|
end

puts response.status
puts response.body
use std::str::FromStr;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:account/templates/:template";

    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}}/:account/templates/:template
http DELETE {{baseUrl}}/:account/templates/:template
wget --quiet \
  --method DELETE \
  --output-document \
  - {{baseUrl}}/:account/templates/:template
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/templates/:template")! 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 List template records
{{baseUrl}}/:account/templates/:template/records
QUERY PARAMS

account
template
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/templates/:template/records");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/:account/templates/:template/records")
require "http/client"

url = "{{baseUrl}}/:account/templates/:template/records"

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}}/:account/templates/:template/records"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/:account/templates/:template/records");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/templates/:template/records"

	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/:account/templates/:template/records HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/:account/templates/:template/records")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/templates/:template/records"))
    .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}}/:account/templates/:template/records")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/:account/templates/:template/records")
  .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}}/:account/templates/:template/records');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'GET',
  url: '{{baseUrl}}/:account/templates/:template/records'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/templates/:template/records';
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}}/:account/templates/:template/records',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/:account/templates/:template/records")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/:account/templates/:template/records',
  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}}/:account/templates/:template/records'
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/:account/templates/:template/records');

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}}/:account/templates/:template/records'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/templates/:template/records';
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}}/:account/templates/:template/records"]
                                                       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}}/:account/templates/:template/records" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/templates/:template/records",
  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}}/:account/templates/:template/records');

echo $response->getBody();
setUrl('{{baseUrl}}/:account/templates/:template/records');
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/:account/templates/:template/records');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/:account/templates/:template/records' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/templates/:template/records' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/:account/templates/:template/records")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/templates/:template/records"

response = requests.get(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/templates/:template/records"

response <- VERB("GET", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/:account/templates/:template/records")

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/:account/templates/:template/records') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:account/templates/:template/records";

    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}}/:account/templates/:template/records
http GET {{baseUrl}}/:account/templates/:template/records
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/:account/templates/:template/records
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/templates/:template/records")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": [
    {
      "id": 296,
      "template_id": 268,
      "name": "",
      "content": "192.168.1.1",
      "ttl": 3600,
      "priority": null,
      "type": "A",
      "created_at": "2016-04-26T08:23:54Z",
      "updated_at": "2016-04-26T08:23:54Z"
    }
  ],
  "pagination": {
    "current_page": 1,
    "per_page": 30,
    "total_entries": 2,
    "total_pages": 1
  }
}
GET List templates
{{baseUrl}}/:account/templates
QUERY PARAMS

account
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/templates");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/:account/templates")
require "http/client"

url = "{{baseUrl}}/:account/templates"

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}}/:account/templates"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/:account/templates");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/templates"

	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/:account/templates HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/:account/templates")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/templates"))
    .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}}/:account/templates")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/:account/templates")
  .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}}/:account/templates');

xhr.send(data);
import axios from 'axios';

const options = {method: 'GET', url: '{{baseUrl}}/:account/templates'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/templates';
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}}/:account/templates',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/:account/templates")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/:account/templates',
  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}}/:account/templates'};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/:account/templates');

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}}/:account/templates'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/templates';
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}}/:account/templates"]
                                                       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}}/:account/templates" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/templates",
  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}}/:account/templates');

echo $response->getBody();
setUrl('{{baseUrl}}/:account/templates');
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/:account/templates');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/:account/templates' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/templates' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/:account/templates")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/templates"

response = requests.get(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/templates"

response <- VERB("GET", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/:account/templates")

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/:account/templates') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:account/templates";

    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}}/:account/templates
http GET {{baseUrl}}/:account/templates
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/:account/templates
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/templates")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": [
    {
      "id": 1,
      "account_id": 1010,
      "name": "Alpha",
      "sid": "alpha",
      "description": "An alpha template.",
      "created_at": "2016-03-22T11:08:58Z",
      "updated_at": "2016-03-22T11:08:58Z"
    }
  ],
  "pagination": {
    "current_page": 1,
    "per_page": 30,
    "total_entries": 2,
    "total_pages": 1
  }
}
GET Retrieve a template record
{{baseUrl}}/:account/templates/:template/records/:templaterecord
QUERY PARAMS

account
template
templaterecord
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/templates/:template/records/:templaterecord");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/:account/templates/:template/records/:templaterecord")
require "http/client"

url = "{{baseUrl}}/:account/templates/:template/records/:templaterecord"

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}}/:account/templates/:template/records/:templaterecord"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/:account/templates/:template/records/:templaterecord");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/templates/:template/records/:templaterecord"

	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/:account/templates/:template/records/:templaterecord HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/:account/templates/:template/records/:templaterecord")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/templates/:template/records/:templaterecord"))
    .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}}/:account/templates/:template/records/:templaterecord")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/:account/templates/:template/records/:templaterecord")
  .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}}/:account/templates/:template/records/:templaterecord');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'GET',
  url: '{{baseUrl}}/:account/templates/:template/records/:templaterecord'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/templates/:template/records/:templaterecord';
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}}/:account/templates/:template/records/:templaterecord',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/:account/templates/:template/records/:templaterecord")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/:account/templates/:template/records/:templaterecord',
  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}}/:account/templates/:template/records/:templaterecord'
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/:account/templates/:template/records/:templaterecord');

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}}/:account/templates/:template/records/:templaterecord'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/templates/:template/records/:templaterecord';
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}}/:account/templates/:template/records/:templaterecord"]
                                                       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}}/:account/templates/:template/records/:templaterecord" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/templates/:template/records/:templaterecord",
  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}}/:account/templates/:template/records/:templaterecord');

echo $response->getBody();
setUrl('{{baseUrl}}/:account/templates/:template/records/:templaterecord');
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/:account/templates/:template/records/:templaterecord');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/:account/templates/:template/records/:templaterecord' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/templates/:template/records/:templaterecord' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/:account/templates/:template/records/:templaterecord")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/templates/:template/records/:templaterecord"

response = requests.get(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/templates/:template/records/:templaterecord"

response <- VERB("GET", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/:account/templates/:template/records/:templaterecord")

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/:account/templates/:template/records/:templaterecord') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:account/templates/:template/records/:templaterecord";

    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}}/:account/templates/:template/records/:templaterecord
http GET {{baseUrl}}/:account/templates/:template/records/:templaterecord
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/:account/templates/:template/records/:templaterecord
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/templates/:template/records/:templaterecord")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "id": 296,
    "template_id": 268,
    "name": "",
    "content": "192.168.1.1",
    "ttl": 3600,
    "priority": null,
    "type": "A",
    "created_at": "2016-04-26T08:23:54Z",
    "updated_at": "2016-04-26T08:23:54Z"
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Not Found"
}
GET Retrieve a template
{{baseUrl}}/:account/templates/:template
QUERY PARAMS

account
template
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/templates/:template");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/:account/templates/:template")
require "http/client"

url = "{{baseUrl}}/:account/templates/:template"

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}}/:account/templates/:template"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/:account/templates/:template");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/templates/:template"

	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/:account/templates/:template HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/:account/templates/:template")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/templates/:template"))
    .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}}/:account/templates/:template")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/:account/templates/:template")
  .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}}/:account/templates/:template');

xhr.send(data);
import axios from 'axios';

const options = {method: 'GET', url: '{{baseUrl}}/:account/templates/:template'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/templates/:template';
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}}/:account/templates/:template',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/:account/templates/:template")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/:account/templates/:template',
  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}}/:account/templates/:template'};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/:account/templates/:template');

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}}/:account/templates/:template'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/templates/:template';
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}}/:account/templates/:template"]
                                                       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}}/:account/templates/:template" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/templates/:template",
  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}}/:account/templates/:template');

echo $response->getBody();
setUrl('{{baseUrl}}/:account/templates/:template');
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/:account/templates/:template');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/:account/templates/:template' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/templates/:template' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/:account/templates/:template")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/templates/:template"

response = requests.get(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/templates/:template"

response <- VERB("GET", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/:account/templates/:template")

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/:account/templates/:template') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:account/templates/:template";

    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}}/:account/templates/:template
http GET {{baseUrl}}/:account/templates/:template
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/:account/templates/:template
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/templates/:template")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "id": 1,
    "account_id": 1010,
    "name": "Alpha",
    "sid": "alpha",
    "description": "An alpha template.",
    "created_at": "2016-03-22T11:08:58Z",
    "updated_at": "2016-03-22T11:08:58Z"
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Not Found"
}
PATCH Update a template
{{baseUrl}}/:account/templates/:template
QUERY PARAMS

account
template
BODY json

{
  "sid": "",
  "name": "",
  "description": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/templates/:template");

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  \"sid\": \"\",\n  \"name\": \"\",\n  \"description\": \"\"\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/patch "{{baseUrl}}/:account/templates/:template" {:content-type :json
                                                                          :form-params {:sid ""
                                                                                        :name ""
                                                                                        :description ""}})
require "http/client"

url = "{{baseUrl}}/:account/templates/:template"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"sid\": \"\",\n  \"name\": \"\",\n  \"description\": \"\"\n}"

response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Patch,
    RequestUri = new Uri("{{baseUrl}}/:account/templates/:template"),
    Content = new StringContent("{\n  \"sid\": \"\",\n  \"name\": \"\",\n  \"description\": \"\"\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}}/:account/templates/:template");
var request = new RestRequest("", Method.Patch);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"sid\": \"\",\n  \"name\": \"\",\n  \"description\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/templates/:template"

	payload := strings.NewReader("{\n  \"sid\": \"\",\n  \"name\": \"\",\n  \"description\": \"\"\n}")

	req, _ := http.NewRequest("PATCH", 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))

}
PATCH /baseUrl/:account/templates/:template HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 50

{
  "sid": "",
  "name": "",
  "description": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/:account/templates/:template")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"sid\": \"\",\n  \"name\": \"\",\n  \"description\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/templates/:template"))
    .header("content-type", "application/json")
    .method("PATCH", HttpRequest.BodyPublishers.ofString("{\n  \"sid\": \"\",\n  \"name\": \"\",\n  \"description\": \"\"\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  \"sid\": \"\",\n  \"name\": \"\",\n  \"description\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/:account/templates/:template")
  .patch(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/:account/templates/:template")
  .header("content-type", "application/json")
  .body("{\n  \"sid\": \"\",\n  \"name\": \"\",\n  \"description\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  sid: '',
  name: '',
  description: ''
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('PATCH', '{{baseUrl}}/:account/templates/:template');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'PATCH',
  url: '{{baseUrl}}/:account/templates/:template',
  headers: {'content-type': 'application/json'},
  data: {sid: '', name: '', description: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/templates/:template';
const options = {
  method: 'PATCH',
  headers: {'content-type': 'application/json'},
  body: '{"sid":"","name":"","description":""}'
};

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}}/:account/templates/:template',
  method: 'PATCH',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "sid": "",\n  "name": "",\n  "description": ""\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"sid\": \"\",\n  \"name\": \"\",\n  \"description\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/:account/templates/:template")
  .patch(body)
  .addHeader("content-type", "application/json")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'PATCH',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/:account/templates/:template',
  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({sid: '', name: '', description: ''}));
req.end();
const request = require('request');

const options = {
  method: 'PATCH',
  url: '{{baseUrl}}/:account/templates/:template',
  headers: {'content-type': 'application/json'},
  body: {sid: '', name: '', description: ''},
  json: true
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('PATCH', '{{baseUrl}}/:account/templates/:template');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  sid: '',
  name: '',
  description: ''
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'PATCH',
  url: '{{baseUrl}}/:account/templates/:template',
  headers: {'content-type': 'application/json'},
  data: {sid: '', name: '', description: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/templates/:template';
const options = {
  method: 'PATCH',
  headers: {'content-type': 'application/json'},
  body: '{"sid":"","name":"","description":""}'
};

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 = @{ @"sid": @"",
                              @"name": @"",
                              @"description": @"" };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/:account/templates/:template"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[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}}/:account/templates/:template" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"sid\": \"\",\n  \"name\": \"\",\n  \"description\": \"\"\n}" in

Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/templates/:template",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PATCH",
  CURLOPT_POSTFIELDS => json_encode([
    'sid' => '',
    'name' => '',
    'description' => ''
  ]),
  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('PATCH', '{{baseUrl}}/:account/templates/:template', [
  'body' => '{
  "sid": "",
  "name": "",
  "description": ""
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/:account/templates/:template');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'sid' => '',
  'name' => '',
  'description' => ''
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'sid' => '',
  'name' => '',
  'description' => ''
]));
$request->setRequestUrl('{{baseUrl}}/:account/templates/:template');
$request->setRequestMethod('PATCH');
$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}}/:account/templates/:template' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
  "sid": "",
  "name": "",
  "description": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/templates/:template' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
  "sid": "",
  "name": "",
  "description": ""
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"sid\": \"\",\n  \"name\": \"\",\n  \"description\": \"\"\n}"

headers = { 'content-type': "application/json" }

conn.request("PATCH", "/baseUrl/:account/templates/:template", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/templates/:template"

payload = {
    "sid": "",
    "name": "",
    "description": ""
}
headers = {"content-type": "application/json"}

response = requests.patch(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/templates/:template"

payload <- "{\n  \"sid\": \"\",\n  \"name\": \"\",\n  \"description\": \"\"\n}"

encode <- "json"

response <- VERB("PATCH", url, body = payload, content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/:account/templates/:template")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["content-type"] = 'application/json'
request.body = "{\n  \"sid\": \"\",\n  \"name\": \"\",\n  \"description\": \"\"\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.patch('/baseUrl/:account/templates/:template') do |req|
  req.body = "{\n  \"sid\": \"\",\n  \"name\": \"\",\n  \"description\": \"\"\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}}/:account/templates/:template";

    let payload = json!({
        "sid": "",
        "name": "",
        "description": ""
    });

    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("PATCH").unwrap(), url)
        .headers(headers)
        .json(&payload)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request PATCH \
  --url {{baseUrl}}/:account/templates/:template \
  --header 'content-type: application/json' \
  --data '{
  "sid": "",
  "name": "",
  "description": ""
}'
echo '{
  "sid": "",
  "name": "",
  "description": ""
}' |  \
  http PATCH {{baseUrl}}/:account/templates/:template \
  content-type:application/json
wget --quiet \
  --method PATCH \
  --header 'content-type: application/json' \
  --body-data '{\n  "sid": "",\n  "name": "",\n  "description": ""\n}' \
  --output-document \
  - {{baseUrl}}/:account/templates/:template
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [
  "sid": "",
  "name": "",
  "description": ""
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/templates/:template")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "id": 1,
    "account_id": 1010,
    "name": "Alpha",
    "sid": "alpha",
    "description": "An alpha template.",
    "created_at": "2016-03-22T11:08:58Z",
    "updated_at": "2016-03-22T11:08:58Z"
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Not Found"
}
GET List TLD extended attributes
{{baseUrl}}/tlds/:tld/extended_attributes
QUERY PARAMS

tld
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/tlds/:tld/extended_attributes");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/tlds/:tld/extended_attributes")
require "http/client"

url = "{{baseUrl}}/tlds/:tld/extended_attributes"

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}}/tlds/:tld/extended_attributes"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/tlds/:tld/extended_attributes");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/tlds/:tld/extended_attributes"

	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/tlds/:tld/extended_attributes HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/tlds/:tld/extended_attributes")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/tlds/:tld/extended_attributes"))
    .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}}/tlds/:tld/extended_attributes")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/tlds/:tld/extended_attributes")
  .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}}/tlds/:tld/extended_attributes');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'GET',
  url: '{{baseUrl}}/tlds/:tld/extended_attributes'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/tlds/:tld/extended_attributes';
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}}/tlds/:tld/extended_attributes',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/tlds/:tld/extended_attributes")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/tlds/:tld/extended_attributes',
  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}}/tlds/:tld/extended_attributes'
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/tlds/:tld/extended_attributes');

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}}/tlds/:tld/extended_attributes'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/tlds/:tld/extended_attributes';
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}}/tlds/:tld/extended_attributes"]
                                                       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}}/tlds/:tld/extended_attributes" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/tlds/:tld/extended_attributes",
  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}}/tlds/:tld/extended_attributes');

echo $response->getBody();
setUrl('{{baseUrl}}/tlds/:tld/extended_attributes');
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/tlds/:tld/extended_attributes');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/tlds/:tld/extended_attributes' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/tlds/:tld/extended_attributes' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/tlds/:tld/extended_attributes")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/tlds/:tld/extended_attributes"

response = requests.get(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/tlds/:tld/extended_attributes"

response <- VERB("GET", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/tlds/:tld/extended_attributes")

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/tlds/:tld/extended_attributes') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/tlds/:tld/extended_attributes";

    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}}/tlds/:tld/extended_attributes
http GET {{baseUrl}}/tlds/:tld/extended_attributes
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/tlds/:tld/extended_attributes
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/tlds/:tld/extended_attributes")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": [
    {
      "name": "uk_legal_type",
      "description": "Legal type of registrant contact",
      "required": true,
      "options": [
        {
          "title": "UK Individual",
          "value": "IND",
          "description": "UK Individual (our default value)"
        },
        {
          "title": "Non-UK Individual (representing self)",
          "value": "FIND",
          "description": "Non-UK Individual (representing self)"
        }
      ],
      "title": "UK Legal Type"
    }
  ]
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Not Found"
}
GET List TLDs
{{baseUrl}}/tlds
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/tlds");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/tlds")
require "http/client"

url = "{{baseUrl}}/tlds"

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}}/tlds"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/tlds");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/tlds"

	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/tlds HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/tlds")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/tlds"))
    .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}}/tlds")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/tlds")
  .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}}/tlds');

xhr.send(data);
import axios from 'axios';

const options = {method: 'GET', url: '{{baseUrl}}/tlds'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/tlds';
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}}/tlds',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/tlds")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/tlds',
  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}}/tlds'};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/tlds');

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}}/tlds'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/tlds';
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}}/tlds"]
                                                       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}}/tlds" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/tlds",
  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}}/tlds');

echo $response->getBody();
setUrl('{{baseUrl}}/tlds');
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/tlds');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/tlds' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/tlds' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/tlds")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/tlds"

response = requests.get(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/tlds"

response <- VERB("GET", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/tlds")

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/tlds') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/tlds";

    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}}/tlds
http GET {{baseUrl}}/tlds
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/tlds
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/tlds")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": [
    {
      "tld": "ac",
      "tld_type": 2,
      "whois_privacy": false,
      "auto_renew_only": true,
      "idn": false,
      "minimum_registration": 1,
      "registration_enabled": true,
      "renewal_enabled": true,
      "transfer_enabled": false,
      "dnssec_interface_type": "ds",
      "name_server_min": 2
    }
  ],
  "pagination": {
    "current_page": 1,
    "per_page": 30,
    "total_entries": 2,
    "total_pages": 1
  }
}
GET Retrieve the TLD
{{baseUrl}}/tlds/:tld
QUERY PARAMS

tld
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/tlds/:tld");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/tlds/:tld")
require "http/client"

url = "{{baseUrl}}/tlds/:tld"

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}}/tlds/:tld"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/tlds/:tld");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/tlds/:tld"

	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/tlds/:tld HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/tlds/:tld")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/tlds/:tld"))
    .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}}/tlds/:tld")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/tlds/:tld")
  .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}}/tlds/:tld');

xhr.send(data);
import axios from 'axios';

const options = {method: 'GET', url: '{{baseUrl}}/tlds/:tld'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/tlds/:tld';
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}}/tlds/:tld',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/tlds/:tld")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/tlds/:tld',
  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}}/tlds/:tld'};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/tlds/:tld');

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}}/tlds/:tld'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/tlds/:tld';
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}}/tlds/:tld"]
                                                       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}}/tlds/:tld" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/tlds/:tld",
  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}}/tlds/:tld');

echo $response->getBody();
setUrl('{{baseUrl}}/tlds/:tld');
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/tlds/:tld');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/tlds/:tld' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/tlds/:tld' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/tlds/:tld")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/tlds/:tld"

response = requests.get(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/tlds/:tld"

response <- VERB("GET", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/tlds/:tld")

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/tlds/:tld') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/tlds/:tld";

    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}}/tlds/:tld
http GET {{baseUrl}}/tlds/:tld
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/tlds/:tld
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/tlds/:tld")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "tld": "ac",
    "tld_type": 2,
    "whois_privacy": false,
    "auto_renew_only": true,
    "idn": false,
    "minimum_registration": 1,
    "registration_enabled": true,
    "renewal_enabled": true,
    "transfer_enabled": false,
    "dnssec_interface_type": "ds",
    "name_server_min": 2
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Not Found"
}
DELETE Disable vanity name servers
{{baseUrl}}/:account/vanity/:domain
QUERY PARAMS

account
domain
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/vanity/:domain");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/delete "{{baseUrl}}/:account/vanity/:domain")
require "http/client"

url = "{{baseUrl}}/:account/vanity/:domain"

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}}/:account/vanity/:domain"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/:account/vanity/:domain");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/vanity/:domain"

	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/:account/vanity/:domain HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/:account/vanity/:domain")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/vanity/:domain"))
    .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}}/:account/vanity/:domain")
  .delete(null)
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/:account/vanity/:domain")
  .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}}/:account/vanity/:domain');

xhr.send(data);
import axios from 'axios';

const options = {method: 'DELETE', url: '{{baseUrl}}/:account/vanity/:domain'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/vanity/:domain';
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}}/:account/vanity/:domain',
  method: 'DELETE',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/:account/vanity/:domain")
  .delete(null)
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'DELETE',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/:account/vanity/:domain',
  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}}/:account/vanity/:domain'};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('DELETE', '{{baseUrl}}/:account/vanity/:domain');

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}}/:account/vanity/:domain'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/vanity/:domain';
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}}/:account/vanity/:domain"]
                                                       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}}/:account/vanity/:domain" in

Client.call `DELETE uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/vanity/:domain",
  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}}/:account/vanity/:domain');

echo $response->getBody();
setUrl('{{baseUrl}}/:account/vanity/:domain');
$request->setMethod(HTTP_METH_DELETE);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/:account/vanity/:domain');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/:account/vanity/:domain' -Method DELETE 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/vanity/:domain' -Method DELETE 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("DELETE", "/baseUrl/:account/vanity/:domain")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/vanity/:domain"

response = requests.delete(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/vanity/:domain"

response <- VERB("DELETE", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/:account/vanity/:domain")

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/:account/vanity/:domain') do |req|
end

puts response.status
puts response.body
use std::str::FromStr;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:account/vanity/:domain";

    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}}/:account/vanity/:domain
http DELETE {{baseUrl}}/:account/vanity/:domain
wget --quiet \
  --method DELETE \
  --output-document \
  - {{baseUrl}}/:account/vanity/:domain
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/vanity/:domain")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "string",
  "errors": {
    "property1": {
      "field": "string",
      "errors": [
        "string"
      ]
    },
    "property2": {
      "field": "string",
      "errors": [
        "string"
      ]
    }
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Validation failed",
  "errors": {
    "address1": [
      "can't be blank"
    ],
    "city": [
      "can't be blank"
    ],
    "country": [
      "can't be blank"
    ],
    "email": [
      "can't be blank",
      "is an invalid email address"
    ],
    "first_name": [
      "can't be blank"
    ],
    "last_name": [
      "can't be blank"
    ],
    "phone": [
      "can't be blank",
      "is probably not a phone number"
    ],
    "postal_code": [
      "can't be blank"
    ],
    "state_province": [
      "can't be blank"
    ]
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Not Found"
}
PUT Enable vanity name servers
{{baseUrl}}/:account/vanity/:domain
QUERY PARAMS

account
domain
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/vanity/:domain");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/put "{{baseUrl}}/:account/vanity/:domain")
require "http/client"

url = "{{baseUrl}}/:account/vanity/:domain"

response = HTTP::Client.put url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Put,
    RequestUri = new Uri("{{baseUrl}}/:account/vanity/:domain"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/:account/vanity/:domain");
var request = new RestRequest("", Method.Put);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/vanity/:domain"

	req, _ := http.NewRequest("PUT", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
PUT /baseUrl/:account/vanity/:domain HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/:account/vanity/:domain")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/vanity/:domain"))
    .method("PUT", 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}}/:account/vanity/:domain")
  .put(null)
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/:account/vanity/:domain")
  .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('PUT', '{{baseUrl}}/:account/vanity/:domain');

xhr.send(data);
import axios from 'axios';

const options = {method: 'PUT', url: '{{baseUrl}}/:account/vanity/:domain'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/vanity/:domain';
const options = {method: 'PUT'};

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}}/:account/vanity/:domain',
  method: 'PUT',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/:account/vanity/:domain")
  .put(null)
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'PUT',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/:account/vanity/:domain',
  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: 'PUT', url: '{{baseUrl}}/:account/vanity/:domain'};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('PUT', '{{baseUrl}}/:account/vanity/:domain');

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}}/:account/vanity/:domain'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/vanity/:domain';
const options = {method: 'PUT'};

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}}/:account/vanity/:domain"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];

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}}/:account/vanity/:domain" in

Client.call `PUT uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/vanity/:domain",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PUT",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('PUT', '{{baseUrl}}/:account/vanity/:domain');

echo $response->getBody();
setUrl('{{baseUrl}}/:account/vanity/:domain');
$request->setMethod(HTTP_METH_PUT);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/:account/vanity/:domain');
$request->setRequestMethod('PUT');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/:account/vanity/:domain' -Method PUT 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/vanity/:domain' -Method PUT 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("PUT", "/baseUrl/:account/vanity/:domain")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/vanity/:domain"

response = requests.put(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/vanity/:domain"

response <- VERB("PUT", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/:account/vanity/:domain")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.put('/baseUrl/:account/vanity/:domain') do |req|
end

puts response.status
puts response.body
use std::str::FromStr;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:account/vanity/:domain";

    let client = reqwest::Client::new();
    let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request PUT \
  --url {{baseUrl}}/:account/vanity/:domain
http PUT {{baseUrl}}/:account/vanity/:domain
wget --quiet \
  --method PUT \
  --output-document \
  - {{baseUrl}}/:account/vanity/:domain
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/vanity/:domain")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"

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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "string",
  "errors": {
    "property1": {
      "field": "string",
      "errors": [
        "string"
      ]
    },
    "property2": {
      "field": "string",
      "errors": [
        "string"
      ]
    }
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Validation failed",
  "errors": {
    "address1": [
      "can't be blank"
    ],
    "city": [
      "can't be blank"
    ],
    "country": [
      "can't be blank"
    ],
    "email": [
      "can't be blank",
      "is an invalid email address"
    ],
    "first_name": [
      "can't be blank"
    ],
    "last_name": [
      "can't be blank"
    ],
    "phone": [
      "can't be blank",
      "is probably not a phone number"
    ],
    "postal_code": [
      "can't be blank"
    ],
    "state_province": [
      "can't be blank"
    ]
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Not Found"
}
POST Create a webhook
{{baseUrl}}/:account/webhooks
QUERY PARAMS

account
BODY json

{
  "url": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/webhooks");

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  \"url\": \"\"\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/:account/webhooks" {:content-type :json
                                                              :form-params {:url ""}})
require "http/client"

url = "{{baseUrl}}/:account/webhooks"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"url\": \"\"\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}}/:account/webhooks"),
    Content = new StringContent("{\n  \"url\": \"\"\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}}/:account/webhooks");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"url\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/webhooks"

	payload := strings.NewReader("{\n  \"url\": \"\"\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/:account/webhooks HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 15

{
  "url": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/:account/webhooks")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"url\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/webhooks"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"url\": \"\"\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  \"url\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/:account/webhooks")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/:account/webhooks")
  .header("content-type", "application/json")
  .body("{\n  \"url\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  url: ''
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/:account/webhooks');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/:account/webhooks',
  headers: {'content-type': 'application/json'},
  data: {url: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/webhooks';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"url":""}'
};

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}}/:account/webhooks',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "url": ""\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"url\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/:account/webhooks")
  .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/:account/webhooks',
  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({url: ''}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/:account/webhooks',
  headers: {'content-type': 'application/json'},
  body: {url: ''},
  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}}/:account/webhooks');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  url: ''
});

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}}/:account/webhooks',
  headers: {'content-type': 'application/json'},
  data: {url: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/webhooks';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"url":""}'
};

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 = @{ @"url": @"" };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/:account/webhooks"]
                                                       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}}/:account/webhooks" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"url\": \"\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/webhooks",
  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([
    'url' => ''
  ]),
  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}}/:account/webhooks', [
  'body' => '{
  "url": ""
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/:account/webhooks');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'url' => ''
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'url' => ''
]));
$request->setRequestUrl('{{baseUrl}}/:account/webhooks');
$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}}/:account/webhooks' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "url": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/webhooks' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "url": ""
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"url\": \"\"\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/:account/webhooks", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/webhooks"

payload = { "url": "" }
headers = {"content-type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/webhooks"

payload <- "{\n  \"url\": \"\"\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}}/:account/webhooks")

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  \"url\": \"\"\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/:account/webhooks') do |req|
  req.body = "{\n  \"url\": \"\"\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:account/webhooks";

    let payload = json!({"url": ""});

    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}}/:account/webhooks \
  --header 'content-type: application/json' \
  --data '{
  "url": ""
}'
echo '{
  "url": ""
}' |  \
  http POST {{baseUrl}}/:account/webhooks \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "url": ""\n}' \
  --output-document \
  - {{baseUrl}}/:account/webhooks
import Foundation

let headers = ["content-type": "application/json"]
let parameters = ["url": ""] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/webhooks")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "id": 1,
    "url": "https://webhook.test",
    "suppressed_at": "2022-06-07T17:45:13Z"
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "string",
  "errors": {
    "property1": {
      "field": "string",
      "errors": [
        "string"
      ]
    },
    "property2": {
      "field": "string",
      "errors": [
        "string"
      ]
    }
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Validation failed",
  "errors": {
    "address1": [
      "can't be blank"
    ],
    "city": [
      "can't be blank"
    ],
    "country": [
      "can't be blank"
    ],
    "email": [
      "can't be blank",
      "is an invalid email address"
    ],
    "first_name": [
      "can't be blank"
    ],
    "last_name": [
      "can't be blank"
    ],
    "phone": [
      "can't be blank",
      "is probably not a phone number"
    ],
    "postal_code": [
      "can't be blank"
    ],
    "state_province": [
      "can't be blank"
    ]
  }
}
DELETE Delete a webhook
{{baseUrl}}/:account/webhooks/:webhook
QUERY PARAMS

account
webhook
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/webhooks/:webhook");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/delete "{{baseUrl}}/:account/webhooks/:webhook")
require "http/client"

url = "{{baseUrl}}/:account/webhooks/:webhook"

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}}/:account/webhooks/:webhook"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/:account/webhooks/:webhook");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/webhooks/:webhook"

	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/:account/webhooks/:webhook HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/:account/webhooks/:webhook")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/webhooks/:webhook"))
    .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}}/:account/webhooks/:webhook")
  .delete(null)
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/:account/webhooks/:webhook")
  .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}}/:account/webhooks/:webhook');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'DELETE',
  url: '{{baseUrl}}/:account/webhooks/:webhook'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/webhooks/:webhook';
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}}/:account/webhooks/:webhook',
  method: 'DELETE',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/:account/webhooks/:webhook")
  .delete(null)
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'DELETE',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/:account/webhooks/:webhook',
  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}}/:account/webhooks/:webhook'
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('DELETE', '{{baseUrl}}/:account/webhooks/:webhook');

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}}/:account/webhooks/:webhook'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/webhooks/:webhook';
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}}/:account/webhooks/:webhook"]
                                                       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}}/:account/webhooks/:webhook" in

Client.call `DELETE uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/webhooks/:webhook",
  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}}/:account/webhooks/:webhook');

echo $response->getBody();
setUrl('{{baseUrl}}/:account/webhooks/:webhook');
$request->setMethod(HTTP_METH_DELETE);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/:account/webhooks/:webhook');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/:account/webhooks/:webhook' -Method DELETE 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/webhooks/:webhook' -Method DELETE 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("DELETE", "/baseUrl/:account/webhooks/:webhook")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/webhooks/:webhook"

response = requests.delete(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/webhooks/:webhook"

response <- VERB("DELETE", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/:account/webhooks/:webhook")

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/:account/webhooks/:webhook') do |req|
end

puts response.status
puts response.body
use std::str::FromStr;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:account/webhooks/:webhook";

    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}}/:account/webhooks/:webhook
http DELETE {{baseUrl}}/:account/webhooks/:webhook
wget --quiet \
  --method DELETE \
  --output-document \
  - {{baseUrl}}/:account/webhooks/:webhook
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/webhooks/:webhook")! 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 List webhooks
{{baseUrl}}/:account/webhooks
QUERY PARAMS

account
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/webhooks");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/:account/webhooks")
require "http/client"

url = "{{baseUrl}}/:account/webhooks"

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}}/:account/webhooks"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/:account/webhooks");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/webhooks"

	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/:account/webhooks HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/:account/webhooks")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/webhooks"))
    .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}}/:account/webhooks")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/:account/webhooks")
  .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}}/:account/webhooks');

xhr.send(data);
import axios from 'axios';

const options = {method: 'GET', url: '{{baseUrl}}/:account/webhooks'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/webhooks';
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}}/:account/webhooks',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/:account/webhooks")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/:account/webhooks',
  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}}/:account/webhooks'};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/:account/webhooks');

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}}/:account/webhooks'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/webhooks';
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}}/:account/webhooks"]
                                                       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}}/:account/webhooks" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/webhooks",
  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}}/:account/webhooks');

echo $response->getBody();
setUrl('{{baseUrl}}/:account/webhooks');
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/:account/webhooks');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/:account/webhooks' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/webhooks' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/:account/webhooks")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/webhooks"

response = requests.get(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/webhooks"

response <- VERB("GET", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/:account/webhooks")

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/:account/webhooks') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:account/webhooks";

    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}}/:account/webhooks
http GET {{baseUrl}}/:account/webhooks
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/:account/webhooks
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/webhooks")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": [
    {
      "id": 1,
      "url": "https://webhook.test",
      "suppressed_at": "2022-06-07T17:45:13Z"
    }
  ]
}
GET Retrieve a webhook
{{baseUrl}}/:account/webhooks/:webhook
QUERY PARAMS

account
webhook
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/webhooks/:webhook");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/:account/webhooks/:webhook")
require "http/client"

url = "{{baseUrl}}/:account/webhooks/:webhook"

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}}/:account/webhooks/:webhook"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/:account/webhooks/:webhook");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/webhooks/:webhook"

	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/:account/webhooks/:webhook HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/:account/webhooks/:webhook")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/webhooks/:webhook"))
    .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}}/:account/webhooks/:webhook")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/:account/webhooks/:webhook")
  .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}}/:account/webhooks/:webhook');

xhr.send(data);
import axios from 'axios';

const options = {method: 'GET', url: '{{baseUrl}}/:account/webhooks/:webhook'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/webhooks/:webhook';
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}}/:account/webhooks/:webhook',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/:account/webhooks/:webhook")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/:account/webhooks/:webhook',
  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}}/:account/webhooks/:webhook'};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/:account/webhooks/:webhook');

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}}/:account/webhooks/:webhook'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/webhooks/:webhook';
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}}/:account/webhooks/:webhook"]
                                                       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}}/:account/webhooks/:webhook" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/webhooks/:webhook",
  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}}/:account/webhooks/:webhook');

echo $response->getBody();
setUrl('{{baseUrl}}/:account/webhooks/:webhook');
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/:account/webhooks/:webhook');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/:account/webhooks/:webhook' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/webhooks/:webhook' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/:account/webhooks/:webhook")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/webhooks/:webhook"

response = requests.get(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/webhooks/:webhook"

response <- VERB("GET", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/:account/webhooks/:webhook")

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/:account/webhooks/:webhook') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:account/webhooks/:webhook";

    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}}/:account/webhooks/:webhook
http GET {{baseUrl}}/:account/webhooks/:webhook
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/:account/webhooks/:webhook
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/webhooks/:webhook")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "id": 1,
    "url": "https://webhook.test",
    "suppressed_at": "2022-06-07T17:45:13Z"
  }
}
PUT Activate a zone DNS service
{{baseUrl}}/:account/zones/:zone/activation
QUERY PARAMS

account
zone
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/zones/:zone/activation");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/put "{{baseUrl}}/:account/zones/:zone/activation")
require "http/client"

url = "{{baseUrl}}/:account/zones/:zone/activation"

response = HTTP::Client.put url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Put,
    RequestUri = new Uri("{{baseUrl}}/:account/zones/:zone/activation"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/:account/zones/:zone/activation");
var request = new RestRequest("", Method.Put);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/zones/:zone/activation"

	req, _ := http.NewRequest("PUT", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
PUT /baseUrl/:account/zones/:zone/activation HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/:account/zones/:zone/activation")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/zones/:zone/activation"))
    .method("PUT", 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}}/:account/zones/:zone/activation")
  .put(null)
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/:account/zones/:zone/activation")
  .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('PUT', '{{baseUrl}}/:account/zones/:zone/activation');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'PUT',
  url: '{{baseUrl}}/:account/zones/:zone/activation'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/zones/:zone/activation';
const options = {method: 'PUT'};

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}}/:account/zones/:zone/activation',
  method: 'PUT',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/:account/zones/:zone/activation")
  .put(null)
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'PUT',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/:account/zones/:zone/activation',
  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: 'PUT',
  url: '{{baseUrl}}/:account/zones/:zone/activation'
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('PUT', '{{baseUrl}}/:account/zones/:zone/activation');

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}}/:account/zones/:zone/activation'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/zones/:zone/activation';
const options = {method: 'PUT'};

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}}/:account/zones/:zone/activation"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];

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}}/:account/zones/:zone/activation" in

Client.call `PUT uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/zones/:zone/activation",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PUT",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('PUT', '{{baseUrl}}/:account/zones/:zone/activation');

echo $response->getBody();
setUrl('{{baseUrl}}/:account/zones/:zone/activation');
$request->setMethod(HTTP_METH_PUT);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/:account/zones/:zone/activation');
$request->setRequestMethod('PUT');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/:account/zones/:zone/activation' -Method PUT 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/zones/:zone/activation' -Method PUT 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("PUT", "/baseUrl/:account/zones/:zone/activation")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/zones/:zone/activation"

response = requests.put(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/zones/:zone/activation"

response <- VERB("PUT", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/:account/zones/:zone/activation")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.put('/baseUrl/:account/zones/:zone/activation') do |req|
end

puts response.status
puts response.body
use std::str::FromStr;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:account/zones/:zone/activation";

    let client = reqwest::Client::new();
    let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request PUT \
  --url {{baseUrl}}/:account/zones/:zone/activation
http PUT {{baseUrl}}/:account/zones/:zone/activation
wget --quiet \
  --method PUT \
  --output-document \
  - {{baseUrl}}/:account/zones/:zone/activation
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/zones/:zone/activation")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"

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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "id": 1,
    "account_id": 1010,
    "name": "example-alpha.com",
    "reverse": false,
    "secondary": false,
    "last_transferred_at": null,
    "active": true,
    "created_at": "2015-04-23T07:40:03Z",
    "updated_at": "2015-04-23T07:40:03Z"
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Not Found"
}
POST Batch create, update, and-or delete records in a zone
{{baseUrl}}/:account/zones/:zone/batch
QUERY PARAMS

account
zone
BODY json

{
  "creates": [
    {
      "name": "",
      "type": "",
      "content": "",
      "ttl": 0,
      "priority": 0,
      "regions": []
    }
  ],
  "updates": [
    {
      "id": 0,
      "name": "",
      "content": "",
      "ttl": 0,
      "priority": 0,
      "regions": []
    }
  ],
  "deletes": [
    {
      "id": 0
    }
  ]
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/zones/:zone/batch");

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  \"creates\": [\n    {\n      \"name\": \"\",\n      \"type\": \"\",\n      \"content\": \"\",\n      \"ttl\": 0,\n      \"priority\": 0,\n      \"regions\": []\n    }\n  ],\n  \"updates\": [\n    {\n      \"id\": 0,\n      \"name\": \"\",\n      \"content\": \"\",\n      \"ttl\": 0,\n      \"priority\": 0,\n      \"regions\": []\n    }\n  ],\n  \"deletes\": [\n    {\n      \"id\": 0\n    }\n  ]\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/:account/zones/:zone/batch" {:content-type :json
                                                                       :form-params {:creates [{:name ""
                                                                                                :type ""
                                                                                                :content ""
                                                                                                :ttl 0
                                                                                                :priority 0
                                                                                                :regions []}]
                                                                                     :updates [{:id 0
                                                                                                :name ""
                                                                                                :content ""
                                                                                                :ttl 0
                                                                                                :priority 0
                                                                                                :regions []}]
                                                                                     :deletes [{:id 0}]}})
require "http/client"

url = "{{baseUrl}}/:account/zones/:zone/batch"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"creates\": [\n    {\n      \"name\": \"\",\n      \"type\": \"\",\n      \"content\": \"\",\n      \"ttl\": 0,\n      \"priority\": 0,\n      \"regions\": []\n    }\n  ],\n  \"updates\": [\n    {\n      \"id\": 0,\n      \"name\": \"\",\n      \"content\": \"\",\n      \"ttl\": 0,\n      \"priority\": 0,\n      \"regions\": []\n    }\n  ],\n  \"deletes\": [\n    {\n      \"id\": 0\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}}/:account/zones/:zone/batch"),
    Content = new StringContent("{\n  \"creates\": [\n    {\n      \"name\": \"\",\n      \"type\": \"\",\n      \"content\": \"\",\n      \"ttl\": 0,\n      \"priority\": 0,\n      \"regions\": []\n    }\n  ],\n  \"updates\": [\n    {\n      \"id\": 0,\n      \"name\": \"\",\n      \"content\": \"\",\n      \"ttl\": 0,\n      \"priority\": 0,\n      \"regions\": []\n    }\n  ],\n  \"deletes\": [\n    {\n      \"id\": 0\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}}/:account/zones/:zone/batch");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"creates\": [\n    {\n      \"name\": \"\",\n      \"type\": \"\",\n      \"content\": \"\",\n      \"ttl\": 0,\n      \"priority\": 0,\n      \"regions\": []\n    }\n  ],\n  \"updates\": [\n    {\n      \"id\": 0,\n      \"name\": \"\",\n      \"content\": \"\",\n      \"ttl\": 0,\n      \"priority\": 0,\n      \"regions\": []\n    }\n  ],\n  \"deletes\": [\n    {\n      \"id\": 0\n    }\n  ]\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/zones/:zone/batch"

	payload := strings.NewReader("{\n  \"creates\": [\n    {\n      \"name\": \"\",\n      \"type\": \"\",\n      \"content\": \"\",\n      \"ttl\": 0,\n      \"priority\": 0,\n      \"regions\": []\n    }\n  ],\n  \"updates\": [\n    {\n      \"id\": 0,\n      \"name\": \"\",\n      \"content\": \"\",\n      \"ttl\": 0,\n      \"priority\": 0,\n      \"regions\": []\n    }\n  ],\n  \"deletes\": [\n    {\n      \"id\": 0\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/:account/zones/:zone/batch HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 337

{
  "creates": [
    {
      "name": "",
      "type": "",
      "content": "",
      "ttl": 0,
      "priority": 0,
      "regions": []
    }
  ],
  "updates": [
    {
      "id": 0,
      "name": "",
      "content": "",
      "ttl": 0,
      "priority": 0,
      "regions": []
    }
  ],
  "deletes": [
    {
      "id": 0
    }
  ]
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/:account/zones/:zone/batch")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"creates\": [\n    {\n      \"name\": \"\",\n      \"type\": \"\",\n      \"content\": \"\",\n      \"ttl\": 0,\n      \"priority\": 0,\n      \"regions\": []\n    }\n  ],\n  \"updates\": [\n    {\n      \"id\": 0,\n      \"name\": \"\",\n      \"content\": \"\",\n      \"ttl\": 0,\n      \"priority\": 0,\n      \"regions\": []\n    }\n  ],\n  \"deletes\": [\n    {\n      \"id\": 0\n    }\n  ]\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/zones/:zone/batch"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"creates\": [\n    {\n      \"name\": \"\",\n      \"type\": \"\",\n      \"content\": \"\",\n      \"ttl\": 0,\n      \"priority\": 0,\n      \"regions\": []\n    }\n  ],\n  \"updates\": [\n    {\n      \"id\": 0,\n      \"name\": \"\",\n      \"content\": \"\",\n      \"ttl\": 0,\n      \"priority\": 0,\n      \"regions\": []\n    }\n  ],\n  \"deletes\": [\n    {\n      \"id\": 0\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  \"creates\": [\n    {\n      \"name\": \"\",\n      \"type\": \"\",\n      \"content\": \"\",\n      \"ttl\": 0,\n      \"priority\": 0,\n      \"regions\": []\n    }\n  ],\n  \"updates\": [\n    {\n      \"id\": 0,\n      \"name\": \"\",\n      \"content\": \"\",\n      \"ttl\": 0,\n      \"priority\": 0,\n      \"regions\": []\n    }\n  ],\n  \"deletes\": [\n    {\n      \"id\": 0\n    }\n  ]\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/:account/zones/:zone/batch")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/:account/zones/:zone/batch")
  .header("content-type", "application/json")
  .body("{\n  \"creates\": [\n    {\n      \"name\": \"\",\n      \"type\": \"\",\n      \"content\": \"\",\n      \"ttl\": 0,\n      \"priority\": 0,\n      \"regions\": []\n    }\n  ],\n  \"updates\": [\n    {\n      \"id\": 0,\n      \"name\": \"\",\n      \"content\": \"\",\n      \"ttl\": 0,\n      \"priority\": 0,\n      \"regions\": []\n    }\n  ],\n  \"deletes\": [\n    {\n      \"id\": 0\n    }\n  ]\n}")
  .asString();
const data = JSON.stringify({
  creates: [
    {
      name: '',
      type: '',
      content: '',
      ttl: 0,
      priority: 0,
      regions: []
    }
  ],
  updates: [
    {
      id: 0,
      name: '',
      content: '',
      ttl: 0,
      priority: 0,
      regions: []
    }
  ],
  deletes: [
    {
      id: 0
    }
  ]
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/:account/zones/:zone/batch');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/:account/zones/:zone/batch',
  headers: {'content-type': 'application/json'},
  data: {
    creates: [{name: '', type: '', content: '', ttl: 0, priority: 0, regions: []}],
    updates: [{id: 0, name: '', content: '', ttl: 0, priority: 0, regions: []}],
    deletes: [{id: 0}]
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/zones/:zone/batch';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"creates":[{"name":"","type":"","content":"","ttl":0,"priority":0,"regions":[]}],"updates":[{"id":0,"name":"","content":"","ttl":0,"priority":0,"regions":[]}],"deletes":[{"id":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}}/:account/zones/:zone/batch',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "creates": [\n    {\n      "name": "",\n      "type": "",\n      "content": "",\n      "ttl": 0,\n      "priority": 0,\n      "regions": []\n    }\n  ],\n  "updates": [\n    {\n      "id": 0,\n      "name": "",\n      "content": "",\n      "ttl": 0,\n      "priority": 0,\n      "regions": []\n    }\n  ],\n  "deletes": [\n    {\n      "id": 0\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  \"creates\": [\n    {\n      \"name\": \"\",\n      \"type\": \"\",\n      \"content\": \"\",\n      \"ttl\": 0,\n      \"priority\": 0,\n      \"regions\": []\n    }\n  ],\n  \"updates\": [\n    {\n      \"id\": 0,\n      \"name\": \"\",\n      \"content\": \"\",\n      \"ttl\": 0,\n      \"priority\": 0,\n      \"regions\": []\n    }\n  ],\n  \"deletes\": [\n    {\n      \"id\": 0\n    }\n  ]\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/:account/zones/:zone/batch")
  .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/:account/zones/:zone/batch',
  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({
  creates: [{name: '', type: '', content: '', ttl: 0, priority: 0, regions: []}],
  updates: [{id: 0, name: '', content: '', ttl: 0, priority: 0, regions: []}],
  deletes: [{id: 0}]
}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/:account/zones/:zone/batch',
  headers: {'content-type': 'application/json'},
  body: {
    creates: [{name: '', type: '', content: '', ttl: 0, priority: 0, regions: []}],
    updates: [{id: 0, name: '', content: '', ttl: 0, priority: 0, regions: []}],
    deletes: [{id: 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('POST', '{{baseUrl}}/:account/zones/:zone/batch');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  creates: [
    {
      name: '',
      type: '',
      content: '',
      ttl: 0,
      priority: 0,
      regions: []
    }
  ],
  updates: [
    {
      id: 0,
      name: '',
      content: '',
      ttl: 0,
      priority: 0,
      regions: []
    }
  ],
  deletes: [
    {
      id: 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: 'POST',
  url: '{{baseUrl}}/:account/zones/:zone/batch',
  headers: {'content-type': 'application/json'},
  data: {
    creates: [{name: '', type: '', content: '', ttl: 0, priority: 0, regions: []}],
    updates: [{id: 0, name: '', content: '', ttl: 0, priority: 0, regions: []}],
    deletes: [{id: 0}]
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/zones/:zone/batch';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"creates":[{"name":"","type":"","content":"","ttl":0,"priority":0,"regions":[]}],"updates":[{"id":0,"name":"","content":"","ttl":0,"priority":0,"regions":[]}],"deletes":[{"id":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 = @{ @"creates": @[ @{ @"name": @"", @"type": @"", @"content": @"", @"ttl": @0, @"priority": @0, @"regions": @[  ] } ],
                              @"updates": @[ @{ @"id": @0, @"name": @"", @"content": @"", @"ttl": @0, @"priority": @0, @"regions": @[  ] } ],
                              @"deletes": @[ @{ @"id": @0 } ] };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/:account/zones/:zone/batch"]
                                                       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}}/:account/zones/:zone/batch" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"creates\": [\n    {\n      \"name\": \"\",\n      \"type\": \"\",\n      \"content\": \"\",\n      \"ttl\": 0,\n      \"priority\": 0,\n      \"regions\": []\n    }\n  ],\n  \"updates\": [\n    {\n      \"id\": 0,\n      \"name\": \"\",\n      \"content\": \"\",\n      \"ttl\": 0,\n      \"priority\": 0,\n      \"regions\": []\n    }\n  ],\n  \"deletes\": [\n    {\n      \"id\": 0\n    }\n  ]\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/zones/:zone/batch",
  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([
    'creates' => [
        [
                'name' => '',
                'type' => '',
                'content' => '',
                'ttl' => 0,
                'priority' => 0,
                'regions' => [
                                
                ]
        ]
    ],
    'updates' => [
        [
                'id' => 0,
                'name' => '',
                'content' => '',
                'ttl' => 0,
                'priority' => 0,
                'regions' => [
                                
                ]
        ]
    ],
    'deletes' => [
        [
                'id' => 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('POST', '{{baseUrl}}/:account/zones/:zone/batch', [
  'body' => '{
  "creates": [
    {
      "name": "",
      "type": "",
      "content": "",
      "ttl": 0,
      "priority": 0,
      "regions": []
    }
  ],
  "updates": [
    {
      "id": 0,
      "name": "",
      "content": "",
      "ttl": 0,
      "priority": 0,
      "regions": []
    }
  ],
  "deletes": [
    {
      "id": 0
    }
  ]
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/:account/zones/:zone/batch');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'creates' => [
    [
        'name' => '',
        'type' => '',
        'content' => '',
        'ttl' => 0,
        'priority' => 0,
        'regions' => [
                
        ]
    ]
  ],
  'updates' => [
    [
        'id' => 0,
        'name' => '',
        'content' => '',
        'ttl' => 0,
        'priority' => 0,
        'regions' => [
                
        ]
    ]
  ],
  'deletes' => [
    [
        'id' => 0
    ]
  ]
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'creates' => [
    [
        'name' => '',
        'type' => '',
        'content' => '',
        'ttl' => 0,
        'priority' => 0,
        'regions' => [
                
        ]
    ]
  ],
  'updates' => [
    [
        'id' => 0,
        'name' => '',
        'content' => '',
        'ttl' => 0,
        'priority' => 0,
        'regions' => [
                
        ]
    ]
  ],
  'deletes' => [
    [
        'id' => 0
    ]
  ]
]));
$request->setRequestUrl('{{baseUrl}}/:account/zones/:zone/batch');
$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}}/:account/zones/:zone/batch' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "creates": [
    {
      "name": "",
      "type": "",
      "content": "",
      "ttl": 0,
      "priority": 0,
      "regions": []
    }
  ],
  "updates": [
    {
      "id": 0,
      "name": "",
      "content": "",
      "ttl": 0,
      "priority": 0,
      "regions": []
    }
  ],
  "deletes": [
    {
      "id": 0
    }
  ]
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/zones/:zone/batch' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "creates": [
    {
      "name": "",
      "type": "",
      "content": "",
      "ttl": 0,
      "priority": 0,
      "regions": []
    }
  ],
  "updates": [
    {
      "id": 0,
      "name": "",
      "content": "",
      "ttl": 0,
      "priority": 0,
      "regions": []
    }
  ],
  "deletes": [
    {
      "id": 0
    }
  ]
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"creates\": [\n    {\n      \"name\": \"\",\n      \"type\": \"\",\n      \"content\": \"\",\n      \"ttl\": 0,\n      \"priority\": 0,\n      \"regions\": []\n    }\n  ],\n  \"updates\": [\n    {\n      \"id\": 0,\n      \"name\": \"\",\n      \"content\": \"\",\n      \"ttl\": 0,\n      \"priority\": 0,\n      \"regions\": []\n    }\n  ],\n  \"deletes\": [\n    {\n      \"id\": 0\n    }\n  ]\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/:account/zones/:zone/batch", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/zones/:zone/batch"

payload = {
    "creates": [
        {
            "name": "",
            "type": "",
            "content": "",
            "ttl": 0,
            "priority": 0,
            "regions": []
        }
    ],
    "updates": [
        {
            "id": 0,
            "name": "",
            "content": "",
            "ttl": 0,
            "priority": 0,
            "regions": []
        }
    ],
    "deletes": [{ "id": 0 }]
}
headers = {"content-type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/zones/:zone/batch"

payload <- "{\n  \"creates\": [\n    {\n      \"name\": \"\",\n      \"type\": \"\",\n      \"content\": \"\",\n      \"ttl\": 0,\n      \"priority\": 0,\n      \"regions\": []\n    }\n  ],\n  \"updates\": [\n    {\n      \"id\": 0,\n      \"name\": \"\",\n      \"content\": \"\",\n      \"ttl\": 0,\n      \"priority\": 0,\n      \"regions\": []\n    }\n  ],\n  \"deletes\": [\n    {\n      \"id\": 0\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}}/:account/zones/:zone/batch")

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  \"creates\": [\n    {\n      \"name\": \"\",\n      \"type\": \"\",\n      \"content\": \"\",\n      \"ttl\": 0,\n      \"priority\": 0,\n      \"regions\": []\n    }\n  ],\n  \"updates\": [\n    {\n      \"id\": 0,\n      \"name\": \"\",\n      \"content\": \"\",\n      \"ttl\": 0,\n      \"priority\": 0,\n      \"regions\": []\n    }\n  ],\n  \"deletes\": [\n    {\n      \"id\": 0\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/:account/zones/:zone/batch') do |req|
  req.body = "{\n  \"creates\": [\n    {\n      \"name\": \"\",\n      \"type\": \"\",\n      \"content\": \"\",\n      \"ttl\": 0,\n      \"priority\": 0,\n      \"regions\": []\n    }\n  ],\n  \"updates\": [\n    {\n      \"id\": 0,\n      \"name\": \"\",\n      \"content\": \"\",\n      \"ttl\": 0,\n      \"priority\": 0,\n      \"regions\": []\n    }\n  ],\n  \"deletes\": [\n    {\n      \"id\": 0\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}}/:account/zones/:zone/batch";

    let payload = json!({
        "creates": (
            json!({
                "name": "",
                "type": "",
                "content": "",
                "ttl": 0,
                "priority": 0,
                "regions": ()
            })
        ),
        "updates": (
            json!({
                "id": 0,
                "name": "",
                "content": "",
                "ttl": 0,
                "priority": 0,
                "regions": ()
            })
        ),
        "deletes": (json!({"id": 0}))
    });

    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}}/:account/zones/:zone/batch \
  --header 'content-type: application/json' \
  --data '{
  "creates": [
    {
      "name": "",
      "type": "",
      "content": "",
      "ttl": 0,
      "priority": 0,
      "regions": []
    }
  ],
  "updates": [
    {
      "id": 0,
      "name": "",
      "content": "",
      "ttl": 0,
      "priority": 0,
      "regions": []
    }
  ],
  "deletes": [
    {
      "id": 0
    }
  ]
}'
echo '{
  "creates": [
    {
      "name": "",
      "type": "",
      "content": "",
      "ttl": 0,
      "priority": 0,
      "regions": []
    }
  ],
  "updates": [
    {
      "id": 0,
      "name": "",
      "content": "",
      "ttl": 0,
      "priority": 0,
      "regions": []
    }
  ],
  "deletes": [
    {
      "id": 0
    }
  ]
}' |  \
  http POST {{baseUrl}}/:account/zones/:zone/batch \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "creates": [\n    {\n      "name": "",\n      "type": "",\n      "content": "",\n      "ttl": 0,\n      "priority": 0,\n      "regions": []\n    }\n  ],\n  "updates": [\n    {\n      "id": 0,\n      "name": "",\n      "content": "",\n      "ttl": 0,\n      "priority": 0,\n      "regions": []\n    }\n  ],\n  "deletes": [\n    {\n      "id": 0\n    }\n  ]\n}' \
  --output-document \
  - {{baseUrl}}/:account/zones/:zone/batch
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [
  "creates": [
    [
      "name": "",
      "type": "",
      "content": "",
      "ttl": 0,
      "priority": 0,
      "regions": []
    ]
  ],
  "updates": [
    [
      "id": 0,
      "name": "",
      "content": "",
      "ttl": 0,
      "priority": 0,
      "regions": []
    ]
  ],
  "deletes": [["id": 0]]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/zones/:zone/batch")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "creates": [
      {
        "id": 67623409,
        "zone_id": "example.com",
        "parent_id": null,
        "name": "ab",
        "content": "3.2.3.4",
        "ttl": 3600,
        "priority": null,
        "type": "A",
        "regions": [
          "global"
        ],
        "system_record": false,
        "created_at": "2025-09-05T05:25:00Z",
        "updated_at": "2025-09-05T05:25:00Z"
      }
    ],
    "updates": [
      {
        "id": 67622534,
        "zone_id": "example.com",
        "parent_id": null,
        "name": "update1-1757049890",
        "content": "3.2.3.40",
        "ttl": 3600,
        "priority": null,
        "type": "A",
        "regions": [
          "global"
        ],
        "system_record": false,
        "created_at": "2025-09-05T04:40:15Z",
        "updated_at": "2025-09-05T05:25:00Z"
      }
    ],
    "deletes": [
      {
        "id": 67622509
      }
    ]
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Not Found"
}
GET Check zone distribution
{{baseUrl}}/:account/zones/:zone/distribution
QUERY PARAMS

account
zone
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/zones/:zone/distribution");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/:account/zones/:zone/distribution")
require "http/client"

url = "{{baseUrl}}/:account/zones/:zone/distribution"

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}}/:account/zones/:zone/distribution"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/:account/zones/:zone/distribution");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/zones/:zone/distribution"

	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/:account/zones/:zone/distribution HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/:account/zones/:zone/distribution")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/zones/:zone/distribution"))
    .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}}/:account/zones/:zone/distribution")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/:account/zones/:zone/distribution")
  .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}}/:account/zones/:zone/distribution');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'GET',
  url: '{{baseUrl}}/:account/zones/:zone/distribution'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/zones/:zone/distribution';
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}}/:account/zones/:zone/distribution',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/:account/zones/:zone/distribution")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/:account/zones/:zone/distribution',
  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}}/:account/zones/:zone/distribution'
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/:account/zones/:zone/distribution');

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}}/:account/zones/:zone/distribution'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/zones/:zone/distribution';
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}}/:account/zones/:zone/distribution"]
                                                       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}}/:account/zones/:zone/distribution" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/zones/:zone/distribution",
  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}}/:account/zones/:zone/distribution');

echo $response->getBody();
setUrl('{{baseUrl}}/:account/zones/:zone/distribution');
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/:account/zones/:zone/distribution');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/:account/zones/:zone/distribution' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/zones/:zone/distribution' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/:account/zones/:zone/distribution")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/zones/:zone/distribution"

response = requests.get(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/zones/:zone/distribution"

response <- VERB("GET", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/:account/zones/:zone/distribution")

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/:account/zones/:zone/distribution') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:account/zones/:zone/distribution";

    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}}/:account/zones/:zone/distribution
http GET {{baseUrl}}/:account/zones/:zone/distribution
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/:account/zones/:zone/distribution
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/zones/:zone/distribution")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "distributed": true
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Not Found"
}
GET Check zone record distribution
{{baseUrl}}/:account/zones/:zone/records/:zonerecord/distribution
QUERY PARAMS

account
zone
zonerecord
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/zones/:zone/records/:zonerecord/distribution");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/:account/zones/:zone/records/:zonerecord/distribution")
require "http/client"

url = "{{baseUrl}}/:account/zones/:zone/records/:zonerecord/distribution"

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}}/:account/zones/:zone/records/:zonerecord/distribution"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/:account/zones/:zone/records/:zonerecord/distribution");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/zones/:zone/records/:zonerecord/distribution"

	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/:account/zones/:zone/records/:zonerecord/distribution HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/:account/zones/:zone/records/:zonerecord/distribution")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/zones/:zone/records/:zonerecord/distribution"))
    .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}}/:account/zones/:zone/records/:zonerecord/distribution")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/:account/zones/:zone/records/:zonerecord/distribution")
  .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}}/:account/zones/:zone/records/:zonerecord/distribution');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'GET',
  url: '{{baseUrl}}/:account/zones/:zone/records/:zonerecord/distribution'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/zones/:zone/records/:zonerecord/distribution';
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}}/:account/zones/:zone/records/:zonerecord/distribution',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/:account/zones/:zone/records/:zonerecord/distribution")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/:account/zones/:zone/records/:zonerecord/distribution',
  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}}/:account/zones/:zone/records/:zonerecord/distribution'
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/:account/zones/:zone/records/:zonerecord/distribution');

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}}/:account/zones/:zone/records/:zonerecord/distribution'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/zones/:zone/records/:zonerecord/distribution';
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}}/:account/zones/:zone/records/:zonerecord/distribution"]
                                                       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}}/:account/zones/:zone/records/:zonerecord/distribution" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/zones/:zone/records/:zonerecord/distribution",
  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}}/:account/zones/:zone/records/:zonerecord/distribution');

echo $response->getBody();
setUrl('{{baseUrl}}/:account/zones/:zone/records/:zonerecord/distribution');
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/:account/zones/:zone/records/:zonerecord/distribution');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/:account/zones/:zone/records/:zonerecord/distribution' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/zones/:zone/records/:zonerecord/distribution' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/:account/zones/:zone/records/:zonerecord/distribution")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/zones/:zone/records/:zonerecord/distribution"

response = requests.get(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/zones/:zone/records/:zonerecord/distribution"

response <- VERB("GET", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/:account/zones/:zone/records/:zonerecord/distribution")

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/:account/zones/:zone/records/:zonerecord/distribution') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:account/zones/:zone/records/:zonerecord/distribution";

    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}}/:account/zones/:zone/records/:zonerecord/distribution
http GET {{baseUrl}}/:account/zones/:zone/records/:zonerecord/distribution
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/:account/zones/:zone/records/:zonerecord/distribution
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/zones/:zone/records/:zonerecord/distribution")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "distributed": true
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Not Found"
}
POST Create a zone record
{{baseUrl}}/:account/zones/:zone/records
QUERY PARAMS

account
zone
BODY json

{
  "name": "",
  "type": "",
  "content": "",
  "ttl": 0,
  "priority": 0,
  "regions": [],
  "integrated_zones": []
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/zones/:zone/records");

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  \"name\": \"\",\n  \"type\": \"\",\n  \"content\": \"\",\n  \"ttl\": 0,\n  \"priority\": 0,\n  \"regions\": [],\n  \"integrated_zones\": []\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/:account/zones/:zone/records" {:content-type :json
                                                                         :form-params {:name ""
                                                                                       :type ""
                                                                                       :content ""
                                                                                       :ttl 0
                                                                                       :priority 0
                                                                                       :regions []
                                                                                       :integrated_zones []}})
require "http/client"

url = "{{baseUrl}}/:account/zones/:zone/records"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"name\": \"\",\n  \"type\": \"\",\n  \"content\": \"\",\n  \"ttl\": 0,\n  \"priority\": 0,\n  \"regions\": [],\n  \"integrated_zones\": []\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}}/:account/zones/:zone/records"),
    Content = new StringContent("{\n  \"name\": \"\",\n  \"type\": \"\",\n  \"content\": \"\",\n  \"ttl\": 0,\n  \"priority\": 0,\n  \"regions\": [],\n  \"integrated_zones\": []\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}}/:account/zones/:zone/records");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"name\": \"\",\n  \"type\": \"\",\n  \"content\": \"\",\n  \"ttl\": 0,\n  \"priority\": 0,\n  \"regions\": [],\n  \"integrated_zones\": []\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/zones/:zone/records"

	payload := strings.NewReader("{\n  \"name\": \"\",\n  \"type\": \"\",\n  \"content\": \"\",\n  \"ttl\": 0,\n  \"priority\": 0,\n  \"regions\": [],\n  \"integrated_zones\": []\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/:account/zones/:zone/records HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 119

{
  "name": "",
  "type": "",
  "content": "",
  "ttl": 0,
  "priority": 0,
  "regions": [],
  "integrated_zones": []
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/:account/zones/:zone/records")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"name\": \"\",\n  \"type\": \"\",\n  \"content\": \"\",\n  \"ttl\": 0,\n  \"priority\": 0,\n  \"regions\": [],\n  \"integrated_zones\": []\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/zones/:zone/records"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"name\": \"\",\n  \"type\": \"\",\n  \"content\": \"\",\n  \"ttl\": 0,\n  \"priority\": 0,\n  \"regions\": [],\n  \"integrated_zones\": []\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  \"name\": \"\",\n  \"type\": \"\",\n  \"content\": \"\",\n  \"ttl\": 0,\n  \"priority\": 0,\n  \"regions\": [],\n  \"integrated_zones\": []\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/:account/zones/:zone/records")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/:account/zones/:zone/records")
  .header("content-type", "application/json")
  .body("{\n  \"name\": \"\",\n  \"type\": \"\",\n  \"content\": \"\",\n  \"ttl\": 0,\n  \"priority\": 0,\n  \"regions\": [],\n  \"integrated_zones\": []\n}")
  .asString();
const data = JSON.stringify({
  name: '',
  type: '',
  content: '',
  ttl: 0,
  priority: 0,
  regions: [],
  integrated_zones: []
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/:account/zones/:zone/records');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/:account/zones/:zone/records',
  headers: {'content-type': 'application/json'},
  data: {
    name: '',
    type: '',
    content: '',
    ttl: 0,
    priority: 0,
    regions: [],
    integrated_zones: []
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/zones/:zone/records';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"name":"","type":"","content":"","ttl":0,"priority":0,"regions":[],"integrated_zones":[]}'
};

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}}/:account/zones/:zone/records',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "name": "",\n  "type": "",\n  "content": "",\n  "ttl": 0,\n  "priority": 0,\n  "regions": [],\n  "integrated_zones": []\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"name\": \"\",\n  \"type\": \"\",\n  \"content\": \"\",\n  \"ttl\": 0,\n  \"priority\": 0,\n  \"regions\": [],\n  \"integrated_zones\": []\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/:account/zones/:zone/records")
  .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/:account/zones/:zone/records',
  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({
  name: '',
  type: '',
  content: '',
  ttl: 0,
  priority: 0,
  regions: [],
  integrated_zones: []
}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/:account/zones/:zone/records',
  headers: {'content-type': 'application/json'},
  body: {
    name: '',
    type: '',
    content: '',
    ttl: 0,
    priority: 0,
    regions: [],
    integrated_zones: []
  },
  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}}/:account/zones/:zone/records');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  name: '',
  type: '',
  content: '',
  ttl: 0,
  priority: 0,
  regions: [],
  integrated_zones: []
});

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}}/:account/zones/:zone/records',
  headers: {'content-type': 'application/json'},
  data: {
    name: '',
    type: '',
    content: '',
    ttl: 0,
    priority: 0,
    regions: [],
    integrated_zones: []
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/zones/:zone/records';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"name":"","type":"","content":"","ttl":0,"priority":0,"regions":[],"integrated_zones":[]}'
};

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 = @{ @"name": @"",
                              @"type": @"",
                              @"content": @"",
                              @"ttl": @0,
                              @"priority": @0,
                              @"regions": @[  ],
                              @"integrated_zones": @[  ] };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/:account/zones/:zone/records"]
                                                       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}}/:account/zones/:zone/records" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"name\": \"\",\n  \"type\": \"\",\n  \"content\": \"\",\n  \"ttl\": 0,\n  \"priority\": 0,\n  \"regions\": [],\n  \"integrated_zones\": []\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/zones/:zone/records",
  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([
    'name' => '',
    'type' => '',
    'content' => '',
    'ttl' => 0,
    'priority' => 0,
    'regions' => [
        
    ],
    'integrated_zones' => [
        
    ]
  ]),
  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}}/:account/zones/:zone/records', [
  'body' => '{
  "name": "",
  "type": "",
  "content": "",
  "ttl": 0,
  "priority": 0,
  "regions": [],
  "integrated_zones": []
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/:account/zones/:zone/records');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'name' => '',
  'type' => '',
  'content' => '',
  'ttl' => 0,
  'priority' => 0,
  'regions' => [
    
  ],
  'integrated_zones' => [
    
  ]
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'name' => '',
  'type' => '',
  'content' => '',
  'ttl' => 0,
  'priority' => 0,
  'regions' => [
    
  ],
  'integrated_zones' => [
    
  ]
]));
$request->setRequestUrl('{{baseUrl}}/:account/zones/:zone/records');
$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}}/:account/zones/:zone/records' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "name": "",
  "type": "",
  "content": "",
  "ttl": 0,
  "priority": 0,
  "regions": [],
  "integrated_zones": []
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/zones/:zone/records' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "name": "",
  "type": "",
  "content": "",
  "ttl": 0,
  "priority": 0,
  "regions": [],
  "integrated_zones": []
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"name\": \"\",\n  \"type\": \"\",\n  \"content\": \"\",\n  \"ttl\": 0,\n  \"priority\": 0,\n  \"regions\": [],\n  \"integrated_zones\": []\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/:account/zones/:zone/records", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/zones/:zone/records"

payload = {
    "name": "",
    "type": "",
    "content": "",
    "ttl": 0,
    "priority": 0,
    "regions": [],
    "integrated_zones": []
}
headers = {"content-type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/zones/:zone/records"

payload <- "{\n  \"name\": \"\",\n  \"type\": \"\",\n  \"content\": \"\",\n  \"ttl\": 0,\n  \"priority\": 0,\n  \"regions\": [],\n  \"integrated_zones\": []\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}}/:account/zones/:zone/records")

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  \"name\": \"\",\n  \"type\": \"\",\n  \"content\": \"\",\n  \"ttl\": 0,\n  \"priority\": 0,\n  \"regions\": [],\n  \"integrated_zones\": []\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/:account/zones/:zone/records') do |req|
  req.body = "{\n  \"name\": \"\",\n  \"type\": \"\",\n  \"content\": \"\",\n  \"ttl\": 0,\n  \"priority\": 0,\n  \"regions\": [],\n  \"integrated_zones\": []\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:account/zones/:zone/records";

    let payload = json!({
        "name": "",
        "type": "",
        "content": "",
        "ttl": 0,
        "priority": 0,
        "regions": (),
        "integrated_zones": ()
    });

    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}}/:account/zones/:zone/records \
  --header 'content-type: application/json' \
  --data '{
  "name": "",
  "type": "",
  "content": "",
  "ttl": 0,
  "priority": 0,
  "regions": [],
  "integrated_zones": []
}'
echo '{
  "name": "",
  "type": "",
  "content": "",
  "ttl": 0,
  "priority": 0,
  "regions": [],
  "integrated_zones": []
}' |  \
  http POST {{baseUrl}}/:account/zones/:zone/records \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "name": "",\n  "type": "",\n  "content": "",\n  "ttl": 0,\n  "priority": 0,\n  "regions": [],\n  "integrated_zones": []\n}' \
  --output-document \
  - {{baseUrl}}/:account/zones/:zone/records
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [
  "name": "",
  "type": "",
  "content": "",
  "ttl": 0,
  "priority": 0,
  "regions": [],
  "integrated_zones": []
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/zones/:zone/records")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "id": 1,
    "zone_id": "example.com",
    "parent_id": null,
    "name": "",
    "content": "ns1.dnsimple.com admin.dnsimple.com 1458642070 86400 7200 604800 300",
    "ttl": 3600,
    "priority": null,
    "type": "SOA",
    "regions": [
      "global"
    ],
    "system_record": true,
    "created_at": "2016-03-22T10:20:53Z",
    "updated_at": "2016-10-05T09:26:38Z"
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "string",
  "errors": {
    "property1": {
      "field": "string",
      "errors": [
        "string"
      ]
    },
    "property2": {
      "field": "string",
      "errors": [
        "string"
      ]
    }
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Validation failed",
  "errors": {
    "address1": [
      "can't be blank"
    ],
    "city": [
      "can't be blank"
    ],
    "country": [
      "can't be blank"
    ],
    "email": [
      "can't be blank",
      "is an invalid email address"
    ],
    "first_name": [
      "can't be blank"
    ],
    "last_name": [
      "can't be blank"
    ],
    "phone": [
      "can't be blank",
      "is probably not a phone number"
    ],
    "postal_code": [
      "can't be blank"
    ],
    "state_province": [
      "can't be blank"
    ]
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Not Found"
}
DELETE Deactivate a zone DNS service
{{baseUrl}}/:account/zones/:zone/activation
QUERY PARAMS

account
zone
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/zones/:zone/activation");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/delete "{{baseUrl}}/:account/zones/:zone/activation")
require "http/client"

url = "{{baseUrl}}/:account/zones/:zone/activation"

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}}/:account/zones/:zone/activation"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/:account/zones/:zone/activation");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/zones/:zone/activation"

	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/:account/zones/:zone/activation HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/:account/zones/:zone/activation")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/zones/:zone/activation"))
    .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}}/:account/zones/:zone/activation")
  .delete(null)
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/:account/zones/:zone/activation")
  .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}}/:account/zones/:zone/activation');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'DELETE',
  url: '{{baseUrl}}/:account/zones/:zone/activation'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/zones/:zone/activation';
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}}/:account/zones/:zone/activation',
  method: 'DELETE',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/:account/zones/:zone/activation")
  .delete(null)
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'DELETE',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/:account/zones/:zone/activation',
  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}}/:account/zones/:zone/activation'
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('DELETE', '{{baseUrl}}/:account/zones/:zone/activation');

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}}/:account/zones/:zone/activation'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/zones/:zone/activation';
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}}/:account/zones/:zone/activation"]
                                                       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}}/:account/zones/:zone/activation" in

Client.call `DELETE uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/zones/:zone/activation",
  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}}/:account/zones/:zone/activation');

echo $response->getBody();
setUrl('{{baseUrl}}/:account/zones/:zone/activation');
$request->setMethod(HTTP_METH_DELETE);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/:account/zones/:zone/activation');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/:account/zones/:zone/activation' -Method DELETE 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/zones/:zone/activation' -Method DELETE 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("DELETE", "/baseUrl/:account/zones/:zone/activation")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/zones/:zone/activation"

response = requests.delete(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/zones/:zone/activation"

response <- VERB("DELETE", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/:account/zones/:zone/activation")

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/:account/zones/:zone/activation') do |req|
end

puts response.status
puts response.body
use std::str::FromStr;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:account/zones/:zone/activation";

    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}}/:account/zones/:zone/activation
http DELETE {{baseUrl}}/:account/zones/:zone/activation
wget --quiet \
  --method DELETE \
  --output-document \
  - {{baseUrl}}/:account/zones/:zone/activation
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/zones/:zone/activation")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "id": 1,
    "account_id": 1010,
    "name": "example-alpha.com",
    "reverse": false,
    "secondary": false,
    "last_transferred_at": null,
    "active": true,
    "created_at": "2015-04-23T07:40:03Z",
    "updated_at": "2015-04-23T07:40:03Z"
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Not Found"
}
DELETE Delete a zone record
{{baseUrl}}/:account/zones/:zone/records/:zonerecord
QUERY PARAMS

account
zone
zonerecord
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/zones/:zone/records/:zonerecord");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/delete "{{baseUrl}}/:account/zones/:zone/records/:zonerecord")
require "http/client"

url = "{{baseUrl}}/:account/zones/:zone/records/:zonerecord"

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}}/:account/zones/:zone/records/:zonerecord"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/:account/zones/:zone/records/:zonerecord");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/zones/:zone/records/:zonerecord"

	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/:account/zones/:zone/records/:zonerecord HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/:account/zones/:zone/records/:zonerecord")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/zones/:zone/records/:zonerecord"))
    .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}}/:account/zones/:zone/records/:zonerecord")
  .delete(null)
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/:account/zones/:zone/records/:zonerecord")
  .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}}/:account/zones/:zone/records/:zonerecord');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'DELETE',
  url: '{{baseUrl}}/:account/zones/:zone/records/:zonerecord'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/zones/:zone/records/:zonerecord';
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}}/:account/zones/:zone/records/:zonerecord',
  method: 'DELETE',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/:account/zones/:zone/records/:zonerecord")
  .delete(null)
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'DELETE',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/:account/zones/:zone/records/:zonerecord',
  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}}/:account/zones/:zone/records/:zonerecord'
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('DELETE', '{{baseUrl}}/:account/zones/:zone/records/:zonerecord');

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}}/:account/zones/:zone/records/:zonerecord'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/zones/:zone/records/:zonerecord';
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}}/:account/zones/:zone/records/:zonerecord"]
                                                       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}}/:account/zones/:zone/records/:zonerecord" in

Client.call `DELETE uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/zones/:zone/records/:zonerecord",
  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}}/:account/zones/:zone/records/:zonerecord');

echo $response->getBody();
setUrl('{{baseUrl}}/:account/zones/:zone/records/:zonerecord');
$request->setMethod(HTTP_METH_DELETE);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/:account/zones/:zone/records/:zonerecord');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/:account/zones/:zone/records/:zonerecord' -Method DELETE 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/zones/:zone/records/:zonerecord' -Method DELETE 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("DELETE", "/baseUrl/:account/zones/:zone/records/:zonerecord")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/zones/:zone/records/:zonerecord"

response = requests.delete(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/zones/:zone/records/:zonerecord"

response <- VERB("DELETE", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/:account/zones/:zone/records/:zonerecord")

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/:account/zones/:zone/records/:zonerecord') do |req|
end

puts response.status
puts response.body
use std::str::FromStr;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:account/zones/:zone/records/:zonerecord";

    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}}/:account/zones/:zone/records/:zonerecord
http DELETE {{baseUrl}}/:account/zones/:zone/records/:zonerecord
wget --quiet \
  --method DELETE \
  --output-document \
  - {{baseUrl}}/:account/zones/:zone/records/:zonerecord
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/zones/:zone/records/:zonerecord")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Not Found"
}
GET Download a zone file
{{baseUrl}}/:account/zones/:zone/file
QUERY PARAMS

account
zone
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/zones/:zone/file");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/:account/zones/:zone/file")
require "http/client"

url = "{{baseUrl}}/:account/zones/:zone/file"

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}}/:account/zones/:zone/file"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/:account/zones/:zone/file");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/zones/:zone/file"

	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/:account/zones/:zone/file HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/:account/zones/:zone/file")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/zones/:zone/file"))
    .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}}/:account/zones/:zone/file")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/:account/zones/:zone/file")
  .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}}/:account/zones/:zone/file');

xhr.send(data);
import axios from 'axios';

const options = {method: 'GET', url: '{{baseUrl}}/:account/zones/:zone/file'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/zones/:zone/file';
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}}/:account/zones/:zone/file',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/:account/zones/:zone/file")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/:account/zones/:zone/file',
  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}}/:account/zones/:zone/file'};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/:account/zones/:zone/file');

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}}/:account/zones/:zone/file'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/zones/:zone/file';
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}}/:account/zones/:zone/file"]
                                                       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}}/:account/zones/:zone/file" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/zones/:zone/file",
  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}}/:account/zones/:zone/file');

echo $response->getBody();
setUrl('{{baseUrl}}/:account/zones/:zone/file');
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/:account/zones/:zone/file');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/:account/zones/:zone/file' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/zones/:zone/file' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/:account/zones/:zone/file")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/zones/:zone/file"

response = requests.get(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/zones/:zone/file"

response <- VERB("GET", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/:account/zones/:zone/file")

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/:account/zones/:zone/file') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:account/zones/:zone/file";

    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}}/:account/zones/:zone/file
http GET {{baseUrl}}/:account/zones/:zone/file
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/:account/zones/:zone/file
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/zones/:zone/file")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "zone": "$ORIGIN example.com.\n$TTL 1h\nexample.com. 3600 IN SOA ns1.dnsimple.com. admin.dnsimple.com. 1453132552 86400 7200 604800 300\nexample.com. 3600 IN NS ns1.dnsimple.com.\nexample.com. 3600 IN NS ns2.dnsimple.com.\nexample.com. 3600 IN NS ns3.dnsimple.com.\nexample.com. 3600 IN NS ns4.dnsimple.com.\n"
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Not Found"
}
GET List zone records
{{baseUrl}}/:account/zones/:zone/records
QUERY PARAMS

account
zone
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/zones/:zone/records");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/:account/zones/:zone/records")
require "http/client"

url = "{{baseUrl}}/:account/zones/:zone/records"

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}}/:account/zones/:zone/records"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/:account/zones/:zone/records");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/zones/:zone/records"

	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/:account/zones/:zone/records HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/:account/zones/:zone/records")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/zones/:zone/records"))
    .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}}/:account/zones/:zone/records")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/:account/zones/:zone/records")
  .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}}/:account/zones/:zone/records');

xhr.send(data);
import axios from 'axios';

const options = {method: 'GET', url: '{{baseUrl}}/:account/zones/:zone/records'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/zones/:zone/records';
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}}/:account/zones/:zone/records',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/:account/zones/:zone/records")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/:account/zones/:zone/records',
  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}}/:account/zones/:zone/records'};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/:account/zones/:zone/records');

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}}/:account/zones/:zone/records'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/zones/:zone/records';
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}}/:account/zones/:zone/records"]
                                                       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}}/:account/zones/:zone/records" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/zones/:zone/records",
  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}}/:account/zones/:zone/records');

echo $response->getBody();
setUrl('{{baseUrl}}/:account/zones/:zone/records');
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/:account/zones/:zone/records');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/:account/zones/:zone/records' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/zones/:zone/records' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/:account/zones/:zone/records")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/zones/:zone/records"

response = requests.get(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/zones/:zone/records"

response <- VERB("GET", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/:account/zones/:zone/records")

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/:account/zones/:zone/records') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:account/zones/:zone/records";

    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}}/:account/zones/:zone/records
http GET {{baseUrl}}/:account/zones/:zone/records
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/:account/zones/:zone/records
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/zones/:zone/records")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": [
    {
      "id": 1,
      "zone_id": "example.com",
      "parent_id": null,
      "name": "",
      "content": "ns1.dnsimple.com admin.dnsimple.com 1458642070 86400 7200 604800 300",
      "ttl": 3600,
      "priority": null,
      "type": "SOA",
      "regions": [
        "global"
      ],
      "system_record": true,
      "created_at": "2016-03-22T10:20:53Z",
      "updated_at": "2016-10-05T09:26:38Z"
    }
  ],
  "pagination": {
    "current_page": 1,
    "per_page": 30,
    "total_entries": 2,
    "total_pages": 1
  }
}
GET List zones
{{baseUrl}}/:account/zones
QUERY PARAMS

account
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/zones");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/:account/zones")
require "http/client"

url = "{{baseUrl}}/:account/zones"

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}}/:account/zones"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/:account/zones");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/zones"

	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/:account/zones HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/:account/zones")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/zones"))
    .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}}/:account/zones")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/:account/zones")
  .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}}/:account/zones');

xhr.send(data);
import axios from 'axios';

const options = {method: 'GET', url: '{{baseUrl}}/:account/zones'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/zones';
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}}/:account/zones',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/:account/zones")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/:account/zones',
  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}}/:account/zones'};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/:account/zones');

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}}/:account/zones'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/zones';
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}}/:account/zones"]
                                                       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}}/:account/zones" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/zones",
  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}}/:account/zones');

echo $response->getBody();
setUrl('{{baseUrl}}/:account/zones');
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/:account/zones');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/:account/zones' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/zones' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/:account/zones")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/zones"

response = requests.get(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/zones"

response <- VERB("GET", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/:account/zones")

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/:account/zones') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:account/zones";

    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}}/:account/zones
http GET {{baseUrl}}/:account/zones
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/:account/zones
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/zones")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": [
    {
      "id": 1,
      "account_id": 1010,
      "name": "example-alpha.com",
      "reverse": false,
      "secondary": false,
      "last_transferred_at": null,
      "active": true,
      "created_at": "2015-04-23T07:40:03Z",
      "updated_at": "2015-04-23T07:40:03Z"
    }
  ],
  "pagination": {
    "current_page": 1,
    "per_page": 30,
    "total_entries": 2,
    "total_pages": 1
  }
}
GET Retrieve a zone record
{{baseUrl}}/:account/zones/:zone/records/:zonerecord
QUERY PARAMS

account
zone
zonerecord
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/zones/:zone/records/:zonerecord");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/:account/zones/:zone/records/:zonerecord")
require "http/client"

url = "{{baseUrl}}/:account/zones/:zone/records/:zonerecord"

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}}/:account/zones/:zone/records/:zonerecord"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/:account/zones/:zone/records/:zonerecord");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/zones/:zone/records/:zonerecord"

	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/:account/zones/:zone/records/:zonerecord HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/:account/zones/:zone/records/:zonerecord")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/zones/:zone/records/:zonerecord"))
    .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}}/:account/zones/:zone/records/:zonerecord")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/:account/zones/:zone/records/:zonerecord")
  .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}}/:account/zones/:zone/records/:zonerecord');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'GET',
  url: '{{baseUrl}}/:account/zones/:zone/records/:zonerecord'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/zones/:zone/records/:zonerecord';
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}}/:account/zones/:zone/records/:zonerecord',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/:account/zones/:zone/records/:zonerecord")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/:account/zones/:zone/records/:zonerecord',
  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}}/:account/zones/:zone/records/:zonerecord'
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/:account/zones/:zone/records/:zonerecord');

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}}/:account/zones/:zone/records/:zonerecord'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/zones/:zone/records/:zonerecord';
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}}/:account/zones/:zone/records/:zonerecord"]
                                                       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}}/:account/zones/:zone/records/:zonerecord" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/zones/:zone/records/:zonerecord",
  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}}/:account/zones/:zone/records/:zonerecord');

echo $response->getBody();
setUrl('{{baseUrl}}/:account/zones/:zone/records/:zonerecord');
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/:account/zones/:zone/records/:zonerecord');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/:account/zones/:zone/records/:zonerecord' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/zones/:zone/records/:zonerecord' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/:account/zones/:zone/records/:zonerecord")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/zones/:zone/records/:zonerecord"

response = requests.get(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/zones/:zone/records/:zonerecord"

response <- VERB("GET", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/:account/zones/:zone/records/:zonerecord")

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/:account/zones/:zone/records/:zonerecord') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:account/zones/:zone/records/:zonerecord";

    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}}/:account/zones/:zone/records/:zonerecord
http GET {{baseUrl}}/:account/zones/:zone/records/:zonerecord
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/:account/zones/:zone/records/:zonerecord
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/zones/:zone/records/:zonerecord")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "id": 1,
    "zone_id": "example.com",
    "parent_id": null,
    "name": "",
    "content": "ns1.dnsimple.com admin.dnsimple.com 1458642070 86400 7200 604800 300",
    "ttl": 3600,
    "priority": null,
    "type": "SOA",
    "regions": [
      "global"
    ],
    "system_record": true,
    "created_at": "2016-03-22T10:20:53Z",
    "updated_at": "2016-10-05T09:26:38Z"
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Not Found"
}
GET Retrieve a zone
{{baseUrl}}/:account/zones/:zone
QUERY PARAMS

account
zone
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/zones/:zone");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/:account/zones/:zone")
require "http/client"

url = "{{baseUrl}}/:account/zones/:zone"

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}}/:account/zones/:zone"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/:account/zones/:zone");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/zones/:zone"

	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/:account/zones/:zone HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/:account/zones/:zone")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/zones/:zone"))
    .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}}/:account/zones/:zone")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/:account/zones/:zone")
  .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}}/:account/zones/:zone');

xhr.send(data);
import axios from 'axios';

const options = {method: 'GET', url: '{{baseUrl}}/:account/zones/:zone'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/zones/:zone';
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}}/:account/zones/:zone',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/:account/zones/:zone")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/:account/zones/:zone',
  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}}/:account/zones/:zone'};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/:account/zones/:zone');

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}}/:account/zones/:zone'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/zones/:zone';
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}}/:account/zones/:zone"]
                                                       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}}/:account/zones/:zone" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/zones/:zone",
  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}}/:account/zones/:zone');

echo $response->getBody();
setUrl('{{baseUrl}}/:account/zones/:zone');
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/:account/zones/:zone');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/:account/zones/:zone' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/zones/:zone' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/:account/zones/:zone")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/zones/:zone"

response = requests.get(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/zones/:zone"

response <- VERB("GET", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/:account/zones/:zone")

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/:account/zones/:zone') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:account/zones/:zone";

    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}}/:account/zones/:zone
http GET {{baseUrl}}/:account/zones/:zone
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/:account/zones/:zone
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/zones/:zone")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "id": 1,
    "account_id": 1010,
    "name": "example-alpha.com",
    "reverse": false,
    "secondary": false,
    "last_transferred_at": null,
    "active": true,
    "created_at": "2015-04-23T07:40:03Z",
    "updated_at": "2015-04-23T07:40:03Z"
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Not Found"
}
PATCH Update a zone record
{{baseUrl}}/:account/zones/:zone/records/:zonerecord
QUERY PARAMS

account
zone
zonerecord
BODY json

{
  "name": "",
  "content": "",
  "ttl": 0,
  "priority": 0,
  "regions": [],
  "integrated_zones": []
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/zones/:zone/records/:zonerecord");

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  \"name\": \"\",\n  \"content\": \"\",\n  \"ttl\": 0,\n  \"priority\": 0,\n  \"regions\": [],\n  \"integrated_zones\": []\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/patch "{{baseUrl}}/:account/zones/:zone/records/:zonerecord" {:content-type :json
                                                                                      :form-params {:name ""
                                                                                                    :content ""
                                                                                                    :ttl 0
                                                                                                    :priority 0
                                                                                                    :regions []
                                                                                                    :integrated_zones []}})
require "http/client"

url = "{{baseUrl}}/:account/zones/:zone/records/:zonerecord"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"name\": \"\",\n  \"content\": \"\",\n  \"ttl\": 0,\n  \"priority\": 0,\n  \"regions\": [],\n  \"integrated_zones\": []\n}"

response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Patch,
    RequestUri = new Uri("{{baseUrl}}/:account/zones/:zone/records/:zonerecord"),
    Content = new StringContent("{\n  \"name\": \"\",\n  \"content\": \"\",\n  \"ttl\": 0,\n  \"priority\": 0,\n  \"regions\": [],\n  \"integrated_zones\": []\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}}/:account/zones/:zone/records/:zonerecord");
var request = new RestRequest("", Method.Patch);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"name\": \"\",\n  \"content\": \"\",\n  \"ttl\": 0,\n  \"priority\": 0,\n  \"regions\": [],\n  \"integrated_zones\": []\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/zones/:zone/records/:zonerecord"

	payload := strings.NewReader("{\n  \"name\": \"\",\n  \"content\": \"\",\n  \"ttl\": 0,\n  \"priority\": 0,\n  \"regions\": [],\n  \"integrated_zones\": []\n}")

	req, _ := http.NewRequest("PATCH", 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))

}
PATCH /baseUrl/:account/zones/:zone/records/:zonerecord HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 105

{
  "name": "",
  "content": "",
  "ttl": 0,
  "priority": 0,
  "regions": [],
  "integrated_zones": []
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/:account/zones/:zone/records/:zonerecord")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"name\": \"\",\n  \"content\": \"\",\n  \"ttl\": 0,\n  \"priority\": 0,\n  \"regions\": [],\n  \"integrated_zones\": []\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/zones/:zone/records/:zonerecord"))
    .header("content-type", "application/json")
    .method("PATCH", HttpRequest.BodyPublishers.ofString("{\n  \"name\": \"\",\n  \"content\": \"\",\n  \"ttl\": 0,\n  \"priority\": 0,\n  \"regions\": [],\n  \"integrated_zones\": []\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  \"name\": \"\",\n  \"content\": \"\",\n  \"ttl\": 0,\n  \"priority\": 0,\n  \"regions\": [],\n  \"integrated_zones\": []\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/:account/zones/:zone/records/:zonerecord")
  .patch(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/:account/zones/:zone/records/:zonerecord")
  .header("content-type", "application/json")
  .body("{\n  \"name\": \"\",\n  \"content\": \"\",\n  \"ttl\": 0,\n  \"priority\": 0,\n  \"regions\": [],\n  \"integrated_zones\": []\n}")
  .asString();
const data = JSON.stringify({
  name: '',
  content: '',
  ttl: 0,
  priority: 0,
  regions: [],
  integrated_zones: []
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('PATCH', '{{baseUrl}}/:account/zones/:zone/records/:zonerecord');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'PATCH',
  url: '{{baseUrl}}/:account/zones/:zone/records/:zonerecord',
  headers: {'content-type': 'application/json'},
  data: {name: '', content: '', ttl: 0, priority: 0, regions: [], integrated_zones: []}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/zones/:zone/records/:zonerecord';
const options = {
  method: 'PATCH',
  headers: {'content-type': 'application/json'},
  body: '{"name":"","content":"","ttl":0,"priority":0,"regions":[],"integrated_zones":[]}'
};

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}}/:account/zones/:zone/records/:zonerecord',
  method: 'PATCH',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "name": "",\n  "content": "",\n  "ttl": 0,\n  "priority": 0,\n  "regions": [],\n  "integrated_zones": []\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"name\": \"\",\n  \"content\": \"\",\n  \"ttl\": 0,\n  \"priority\": 0,\n  \"regions\": [],\n  \"integrated_zones\": []\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/:account/zones/:zone/records/:zonerecord")
  .patch(body)
  .addHeader("content-type", "application/json")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'PATCH',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/:account/zones/:zone/records/:zonerecord',
  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({name: '', content: '', ttl: 0, priority: 0, regions: [], integrated_zones: []}));
req.end();
const request = require('request');

const options = {
  method: 'PATCH',
  url: '{{baseUrl}}/:account/zones/:zone/records/:zonerecord',
  headers: {'content-type': 'application/json'},
  body: {name: '', content: '', ttl: 0, priority: 0, regions: [], integrated_zones: []},
  json: true
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('PATCH', '{{baseUrl}}/:account/zones/:zone/records/:zonerecord');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  name: '',
  content: '',
  ttl: 0,
  priority: 0,
  regions: [],
  integrated_zones: []
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'PATCH',
  url: '{{baseUrl}}/:account/zones/:zone/records/:zonerecord',
  headers: {'content-type': 'application/json'},
  data: {name: '', content: '', ttl: 0, priority: 0, regions: [], integrated_zones: []}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/zones/:zone/records/:zonerecord';
const options = {
  method: 'PATCH',
  headers: {'content-type': 'application/json'},
  body: '{"name":"","content":"","ttl":0,"priority":0,"regions":[],"integrated_zones":[]}'
};

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 = @{ @"name": @"",
                              @"content": @"",
                              @"ttl": @0,
                              @"priority": @0,
                              @"regions": @[  ],
                              @"integrated_zones": @[  ] };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/:account/zones/:zone/records/:zonerecord"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[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}}/:account/zones/:zone/records/:zonerecord" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"name\": \"\",\n  \"content\": \"\",\n  \"ttl\": 0,\n  \"priority\": 0,\n  \"regions\": [],\n  \"integrated_zones\": []\n}" in

Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/zones/:zone/records/:zonerecord",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PATCH",
  CURLOPT_POSTFIELDS => json_encode([
    'name' => '',
    'content' => '',
    'ttl' => 0,
    'priority' => 0,
    'regions' => [
        
    ],
    'integrated_zones' => [
        
    ]
  ]),
  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('PATCH', '{{baseUrl}}/:account/zones/:zone/records/:zonerecord', [
  'body' => '{
  "name": "",
  "content": "",
  "ttl": 0,
  "priority": 0,
  "regions": [],
  "integrated_zones": []
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/:account/zones/:zone/records/:zonerecord');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'name' => '',
  'content' => '',
  'ttl' => 0,
  'priority' => 0,
  'regions' => [
    
  ],
  'integrated_zones' => [
    
  ]
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'name' => '',
  'content' => '',
  'ttl' => 0,
  'priority' => 0,
  'regions' => [
    
  ],
  'integrated_zones' => [
    
  ]
]));
$request->setRequestUrl('{{baseUrl}}/:account/zones/:zone/records/:zonerecord');
$request->setRequestMethod('PATCH');
$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}}/:account/zones/:zone/records/:zonerecord' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
  "name": "",
  "content": "",
  "ttl": 0,
  "priority": 0,
  "regions": [],
  "integrated_zones": []
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/zones/:zone/records/:zonerecord' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
  "name": "",
  "content": "",
  "ttl": 0,
  "priority": 0,
  "regions": [],
  "integrated_zones": []
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"name\": \"\",\n  \"content\": \"\",\n  \"ttl\": 0,\n  \"priority\": 0,\n  \"regions\": [],\n  \"integrated_zones\": []\n}"

headers = { 'content-type': "application/json" }

conn.request("PATCH", "/baseUrl/:account/zones/:zone/records/:zonerecord", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/zones/:zone/records/:zonerecord"

payload = {
    "name": "",
    "content": "",
    "ttl": 0,
    "priority": 0,
    "regions": [],
    "integrated_zones": []
}
headers = {"content-type": "application/json"}

response = requests.patch(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/zones/:zone/records/:zonerecord"

payload <- "{\n  \"name\": \"\",\n  \"content\": \"\",\n  \"ttl\": 0,\n  \"priority\": 0,\n  \"regions\": [],\n  \"integrated_zones\": []\n}"

encode <- "json"

response <- VERB("PATCH", url, body = payload, content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/:account/zones/:zone/records/:zonerecord")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["content-type"] = 'application/json'
request.body = "{\n  \"name\": \"\",\n  \"content\": \"\",\n  \"ttl\": 0,\n  \"priority\": 0,\n  \"regions\": [],\n  \"integrated_zones\": []\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.patch('/baseUrl/:account/zones/:zone/records/:zonerecord') do |req|
  req.body = "{\n  \"name\": \"\",\n  \"content\": \"\",\n  \"ttl\": 0,\n  \"priority\": 0,\n  \"regions\": [],\n  \"integrated_zones\": []\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}}/:account/zones/:zone/records/:zonerecord";

    let payload = json!({
        "name": "",
        "content": "",
        "ttl": 0,
        "priority": 0,
        "regions": (),
        "integrated_zones": ()
    });

    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("PATCH").unwrap(), url)
        .headers(headers)
        .json(&payload)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request PATCH \
  --url {{baseUrl}}/:account/zones/:zone/records/:zonerecord \
  --header 'content-type: application/json' \
  --data '{
  "name": "",
  "content": "",
  "ttl": 0,
  "priority": 0,
  "regions": [],
  "integrated_zones": []
}'
echo '{
  "name": "",
  "content": "",
  "ttl": 0,
  "priority": 0,
  "regions": [],
  "integrated_zones": []
}' |  \
  http PATCH {{baseUrl}}/:account/zones/:zone/records/:zonerecord \
  content-type:application/json
wget --quiet \
  --method PATCH \
  --header 'content-type: application/json' \
  --body-data '{\n  "name": "",\n  "content": "",\n  "ttl": 0,\n  "priority": 0,\n  "regions": [],\n  "integrated_zones": []\n}' \
  --output-document \
  - {{baseUrl}}/:account/zones/:zone/records/:zonerecord
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [
  "name": "",
  "content": "",
  "ttl": 0,
  "priority": 0,
  "regions": [],
  "integrated_zones": []
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/zones/:zone/records/:zonerecord")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": {
    "id": 1,
    "zone_id": "example.com",
    "parent_id": null,
    "name": "",
    "content": "ns1.dnsimple.com admin.dnsimple.com 1458642070 86400 7200 604800 300",
    "ttl": 3600,
    "priority": null,
    "type": "SOA",
    "regions": [
      "global"
    ],
    "system_record": true,
    "created_at": "2016-03-22T10:20:53Z",
    "updated_at": "2016-10-05T09:26:38Z"
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "string",
  "errors": {
    "property1": {
      "field": "string",
      "errors": [
        "string"
      ]
    },
    "property2": {
      "field": "string",
      "errors": [
        "string"
      ]
    }
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Validation failed",
  "errors": {
    "address1": [
      "can't be blank"
    ],
    "city": [
      "can't be blank"
    ],
    "country": [
      "can't be blank"
    ],
    "email": [
      "can't be blank",
      "is an invalid email address"
    ],
    "first_name": [
      "can't be blank"
    ],
    "last_name": [
      "can't be blank"
    ],
    "phone": [
      "can't be blank",
      "is probably not a phone number"
    ],
    "postal_code": [
      "can't be blank"
    ],
    "state_province": [
      "can't be blank"
    ]
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Not Found"
}
PUT Update a zone's NS records
{{baseUrl}}/:account/zones/:zone/ns_records
QUERY PARAMS

account
zone
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:account/zones/:zone/ns_records");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/put "{{baseUrl}}/:account/zones/:zone/ns_records")
require "http/client"

url = "{{baseUrl}}/:account/zones/:zone/ns_records"

response = HTTP::Client.put url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Put,
    RequestUri = new Uri("{{baseUrl}}/:account/zones/:zone/ns_records"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/:account/zones/:zone/ns_records");
var request = new RestRequest("", Method.Put);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:account/zones/:zone/ns_records"

	req, _ := http.NewRequest("PUT", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
PUT /baseUrl/:account/zones/:zone/ns_records HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/:account/zones/:zone/ns_records")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:account/zones/:zone/ns_records"))
    .method("PUT", 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}}/:account/zones/:zone/ns_records")
  .put(null)
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/:account/zones/:zone/ns_records")
  .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('PUT', '{{baseUrl}}/:account/zones/:zone/ns_records');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'PUT',
  url: '{{baseUrl}}/:account/zones/:zone/ns_records'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:account/zones/:zone/ns_records';
const options = {method: 'PUT'};

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}}/:account/zones/:zone/ns_records',
  method: 'PUT',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/:account/zones/:zone/ns_records")
  .put(null)
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'PUT',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/:account/zones/:zone/ns_records',
  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: 'PUT',
  url: '{{baseUrl}}/:account/zones/:zone/ns_records'
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('PUT', '{{baseUrl}}/:account/zones/:zone/ns_records');

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}}/:account/zones/:zone/ns_records'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/:account/zones/:zone/ns_records';
const options = {method: 'PUT'};

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}}/:account/zones/:zone/ns_records"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];

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}}/:account/zones/:zone/ns_records" in

Client.call `PUT uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:account/zones/:zone/ns_records",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PUT",
  CURLOPT_POSTFIELDS => "",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('PUT', '{{baseUrl}}/:account/zones/:zone/ns_records');

echo $response->getBody();
setUrl('{{baseUrl}}/:account/zones/:zone/ns_records');
$request->setMethod(HTTP_METH_PUT);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/:account/zones/:zone/ns_records');
$request->setRequestMethod('PUT');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/:account/zones/:zone/ns_records' -Method PUT 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:account/zones/:zone/ns_records' -Method PUT 
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = ""

conn.request("PUT", "/baseUrl/:account/zones/:zone/ns_records", payload)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:account/zones/:zone/ns_records"

payload = ""

response = requests.put(url, data=payload)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:account/zones/:zone/ns_records"

payload <- ""

response <- VERB("PUT", url, body = payload, content_type(""))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/:account/zones/:zone/ns_records")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.put('/baseUrl/:account/zones/:zone/ns_records') do |req|
end

puts response.status
puts response.body
use std::str::FromStr;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:account/zones/:zone/ns_records";

    let client = reqwest::Client::new();
    let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request PUT \
  --url {{baseUrl}}/:account/zones/:zone/ns_records
http PUT {{baseUrl}}/:account/zones/:zone/ns_records
wget --quiet \
  --method PUT \
  --output-document \
  - {{baseUrl}}/:account/zones/:zone/ns_records
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:account/zones/:zone/ns_records")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"

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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": [
    {
      "id": 1,
      "zone_id": "example.com",
      "parent_id": null,
      "name": "",
      "content": "ns1.dnsimple.com admin.dnsimple.com 1458642070 86400 7200 604800 300",
      "ttl": 3600,
      "priority": null,
      "type": "SOA",
      "regions": [
        "global"
      ],
      "system_record": true,
      "created_at": "2016-03-22T10:20:53Z",
      "updated_at": "2016-10-05T09:26:38Z"
    }
  ]
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "message": "Not Found"
}