APIs
...
Detected API
Profiles
Create a new profile domain
code examples curl location globoff 'https //profile backend detected app/api/v2/public/profiles/{uuid}/domain' \\ \ header 'accept application/json' \\ \ header 'content type application/json' \\ \ data '{ "domain" "subdomain example com" }'var myheaders = new headers(); myheaders append("accept", "application/json"); myheaders append("content type", "application/json"); var raw = json stringify({ "domain" "subdomain example com" }); var requestoptions = { method 'post', headers myheaders, body raw, redirect 'follow' }; fetch("https //profile backend detected app/api/v2/public/profiles/{uuid}/domain", requestoptions) then(response => response text()) then(result => console log(result)) catch(error => console log('error', error));require "uri" require "json" require "net/http" url = uri("https //profile backend detected app/api/v2/public/profiles/{uuid}/domain") https = net http new(url host, url port) https use ssl = true request = net http post new(url) request\["accept"] = "application/json" request\["content type"] = "application/json" request body = json dump({ "domain" "subdomain example com" }) response = https request(request) puts response read body import requests import json url = "https //profile backend detected app/api/v2/public/profiles/{uuid}/domain" payload = json dumps({ "domain" "subdomain example com" }) headers = { 'accept' 'application/json', 'content type' 'application/json' } response = requests request("post", url, headers=headers, data=payload) print(response text) responses // accepted for processing // unauthorized { "message" "unauthenticated " }// unprocessable content { "message" "the example field code is required ", "example field" \[ "the example field has already been taken " ] }// too many requests { "message" "too many attempts " }