Update account domain
curl --request PATCH \
--url https://api.interchange.io/api/v2/accounts/{customerId}/domain \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"customerDomain": "nike.com"
}
'import requests
url = "https://api.interchange.io/api/v2/accounts/{customerId}/domain"
payload = { "customerDomain": "nike.com" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({customerDomain: 'nike.com'})
};
fetch('https://api.interchange.io/api/v2/accounts/{customerId}/domain', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": 200,
"customerDomain": "nike.com",
"customerDomainApproved": true
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}Account
Update account domain
Update an account’s registered domain. Requires ADMIN role on the target account (direct membership, organization admin through the hierarchy, or SuperAdmin).
PATCH
/
accounts
/
{customerId}
/
domain
Update account domain
curl --request PATCH \
--url https://api.interchange.io/api/v2/accounts/{customerId}/domain \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"customerDomain": "nike.com"
}
'import requests
url = "https://api.interchange.io/api/v2/accounts/{customerId}/domain"
payload = { "customerDomain": "nike.com" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({customerDomain: 'nike.com'})
};
fetch('https://api.interchange.io/api/v2/accounts/{customerId}/domain', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": 200,
"customerDomain": "nike.com",
"customerDomainApproved": true
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}Authorizations
API key or access token
Path Parameters
Customer ID
Minimum string length:
1Example:
"200"
Body
application/json
Request body for updating an account's registered domain
Registered domain to set on the account.
Maximum string length:
255Pattern:
^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)+$Example:
"nike.com"
Response
Update account domain
Updated customer domain
Customer ID
Required range:
-9007199254740991 <= x <= 9007199254740991Example:
200
Registered domain on the account
Example:
"nike.com"
Whether the current domain is verified by an active member email or Scope3 administrator attestation.