ドメインを作成する
curl --request POST \
--url https://{tenantDomain}/my-org/v1/domains \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"domain": "acme.com"
}
'import requests
url = "https://{tenantDomain}/my-org/v1/domains"
payload = { "domain": "acme.com" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({domain: 'acme.com'})
};
fetch('https://{tenantDomain}/my-org/v1/domains', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{tenantDomain}/my-org/v1/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([
'domain' => 'acme.com'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{tenantDomain}/my-org/v1/domains"
payload := strings.NewReader("{\n \"domain\": \"acme.com\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{tenantDomain}/my-org/v1/domains")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"domain\": \"acme.com\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenantDomain}/my-org/v1/domains")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"domain\": \"acme.com\"\n}"
response = http.request(request)
puts response.read_body{
"domain": "acme.com",
"id": "ord_aW1UHetvkBWSWdCCe8DWq7",
"org_id": "org_zW1UHutvkVWSWdCC",
"status": "pending",
"verification_host": "_ss-verification.org_zW1UHutvkVWSWdCC.acme.com",
"verification_txt": "dove_text=asdfpiujnlewp-23849jdkfjzxcfpiawer"
}組織のドメインを作成
この組織に新しいドメインを作成します。
POST
/
domains
ドメインを作成する
curl --request POST \
--url https://{tenantDomain}/my-org/v1/domains \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"domain": "acme.com"
}
'import requests
url = "https://{tenantDomain}/my-org/v1/domains"
payload = { "domain": "acme.com" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({domain: 'acme.com'})
};
fetch('https://{tenantDomain}/my-org/v1/domains', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{tenantDomain}/my-org/v1/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([
'domain' => 'acme.com'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{tenantDomain}/my-org/v1/domains"
payload := strings.NewReader("{\n \"domain\": \"acme.com\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{tenantDomain}/my-org/v1/domains")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"domain\": \"acme.com\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenantDomain}/my-org/v1/domains")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"domain\": \"acme.com\"\n}"
response = http.request(request)
puts response.read_body{
"domain": "acme.com",
"id": "ord_aW1UHetvkBWSWdCCe8DWq7",
"org_id": "org_zW1UHutvkVWSWdCC",
"status": "pending",
"verification_host": "_ss-verification.org_zW1UHutvkVWSWdCC.acme.com",
"verification_txt": "dove_text=asdfpiujnlewp-23849jdkfjzxcfpiawer"
}承認
OAuth2ClientCredentialsOAuth2AuthCode
The access token received from the authorization server in the OAuth 2.0 flow.
ボディ
application/json
ドメイン名。
Pattern:
^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9-]*[A-Za-z0-9])$レスポンス
組織のドメインが正常に作成されました。
ドメイン名。
Pattern:
^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9-]*[A-Za-z0-9])$組織ドメインの識別子。
Pattern:
^ord_[A-Za-z0-9]{22}$組織の識別子。
Pattern:
^org_[A-Za-z0-9]{16}$組織ドメインのステータス。
利用可能なオプション:
failed, pending, verified TXT レコードを追加する完全なドメインを保存します。
ドメインの検証に使用する値。
⌘I