Documentation / API reference / Domains / Website domains
API reference
Disconnect domain from site Copy as Markdown
domains.DisconnectDomainFromSiteWrite API key
Remove a hosted domain's connection to its Brigg website.
POST /v1/operations/domains.DisconnectDomainFromSiteCopy URL
On this page Access & visibility Request fields Response Errors & retries Next steps JSON schemas
Request fields Expand all fields Send a JSON object with the following fields. Required fields must be included; omit optional fields you do not need.
idstring Required
Use the hosted domain's id for the connection being removed. domains.ListHostedDomains .
At least 1 character. At most 80 characters.
Response Expand all fields Returns 200 OK with a JSON body.
hostsarray of string Required
The apex and www hosts the site now answers (or no longer answers) on.
Errors & retries Set BRIGG_REQUEST_ID once for each logical action. The samples send it as Idempotency-Key. Reuse the same value and body on retries, including after a timeout; a missing response does not prove the action failed.
For rate limits, follow the server’s retry guidance and back off. See HTTP errors and safe retries and limits .
JSON schemas Use the complete schemas for validation or client generation.
Full request JSON schema {
"type" : "object" ,
"properties" : {
"id" : {
"type" : "string" ,
"minLength" : 1 ,
"maxLength" : 80 ,
"description" : "Use the hosted domain's id for the connection being removed. [domains.ListHostedDomains](/developers/reference/domains/ListHostedDomains)."
}
} ,
"required" : [
"id"
] ,
"additionalProperties" : false ,
"examples" : [
{
"id" : "e_example"
}
]
} Full response JSON schema {
"type" : "object" ,
"properties" : {
"hosts" : {
"type" : "array" ,
"items" : {
"type" : "string"
} ,
"description" : "The apex and www hosts the site now answers (or no longer answers) on."
}
} ,
"required" : [
"hosts"
] ,
"additionalProperties" : false ,
"examples" : [
{
"hosts" : [
"example.com" ,
"www.example.com"
]
}
]
} Try the request Use your API key in a server environment.
Act as a memberRequires administrator-approved delegation. cURL TypeScript Python
Fictional values. Replace IDs and business details with values from your workspace.
Request cURL curl 'https://api.brigg.app/v1/operations/domains.DisconnectDomainFromSite' \
-H "Authorization: Bearer $BRIGG_API_KEY " \
-H 'Content-Type: application/json' \
-H "Idempotency-Key: $BRIGG_REQUEST_ID " \
--data-raw '{
"id": "e_example"
}' TypeScript const requestId = process. env. BRIGG_REQUEST_ID ;
if ( ! requestId) throw new Error ( "Set BRIGG_REQUEST_ID once per action and reuse it on retries." ) ;
const response = await fetch ( "https://api.brigg.app/v1/operations/domains.DisconnectDomainFromSite" , {
method: "POST" ,
headers: {
Authorization: ` Bearer ${ process. env. BRIGG_API_KEY } ` ,
"Content-Type" : "application/json" ,
"Idempotency-Key" : requestId,
} ,
body: JSON . stringify ( {
"id" : "e_example"
} ) ,
} ) ;
const result = await response. json ( ) ;
if ( ! response. ok) throw new Error ( ` ${ response. status} : ${ result. error} — ${ result. message} ` ) ;
console . log ( result) ; Python import json
import os
from urllib. request import Request, urlopen
from urllib. error import HTTPError
request_id = os. environ[ "BRIGG_REQUEST_ID" ]
payload = {
"id" : "e_example"
}
request = Request(
"https://api.brigg.app/v1/operations/domains.DisconnectDomainFromSite" ,
data= json. dumps( payload) . encode( "utf-8" ) ,
headers= {
"Authorization" : f"Bearer { os. environ[ 'BRIGG_API_KEY' ] } " ,
"Content-Type" : "application/json" ,
"Idempotency-Key" : request_id,
} ,
method= "POST" ,
)
try :
with urlopen( request) as response:
print ( json. load( response) )
except HTTPError as error:
print ( error. code, json. load( error) )
raise cURL curl 'https://api.brigg.app/v1/operations/domains.DisconnectDomainFromSite' \
-H "Authorization: Bearer $BRIGG_API_KEY " \
-H 'Content-Type: application/json' \
-H "Brigg-Act-As: $BRIGG_ACT_AS " \
-H "Idempotency-Key: $BRIGG_REQUEST_ID " \
--data-raw '{
"id": "e_example"
}' TypeScript const actAs = process. env. BRIGG_ACT_AS ;
if ( ! actAs) throw new Error ( "Set BRIGG_ACT_AS to an approved member account ID." ) ;
const requestId = process. env. BRIGG_REQUEST_ID ;
if ( ! requestId) throw new Error ( "Set BRIGG_REQUEST_ID once per action and reuse it on retries." ) ;
const response = await fetch ( "https://api.brigg.app/v1/operations/domains.DisconnectDomainFromSite" , {
method: "POST" ,
headers: {
Authorization: ` Bearer ${ process. env. BRIGG_API_KEY } ` ,
"Content-Type" : "application/json" ,
"Brigg-Act-As" : actAs,
"Idempotency-Key" : requestId,
} ,
body: JSON . stringify ( {
"id" : "e_example"
} ) ,
} ) ;
const result = await response. json ( ) ;
if ( ! response. ok) throw new Error ( ` ${ response. status} : ${ result. error} — ${ result. message} ` ) ;
console . log ( result) ; Python import json
import os
from urllib. request import Request, urlopen
from urllib. error import HTTPError
request_id = os. environ[ "BRIGG_REQUEST_ID" ]
payload = {
"id" : "e_example"
}
request = Request(
"https://api.brigg.app/v1/operations/domains.DisconnectDomainFromSite" ,
data= json. dumps( payload) . encode( "utf-8" ) ,
headers= {
"Authorization" : f"Bearer { os. environ[ 'BRIGG_API_KEY' ] } " ,
"Content-Type" : "application/json" ,
"Brigg-Act-As" : os. environ[ "BRIGG_ACT_AS" ] ,
"Idempotency-Key" : request_id,
} ,
method= "POST" ,
)
try :
with urlopen( request) as response:
print ( json. load( response) )
except HTTPError as error:
print ( error. code, json. load( error) )
raise 200 OK Response example {
"hosts" : [
"example.com" ,
"www.example.com"
]
} Illustrative values, not a live response.