Update a subdomain (tenant)
curl --request PATCH \
--url https://clarus-api.com/api/subdomains/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Clarus-Subdomain: <api-key>' \
--data '
{
"data": {
"type": "subdomains",
"attributes": {
"company_name": "Acme Logistics (UK) Ltd",
"import_timezone": "Europe/London",
"is_live": true
}
}
}
'import requests
url = "https://clarus-api.com/api/subdomains/{id}"
payload = { "data": {
"type": "subdomains",
"attributes": {
"company_name": "Acme Logistics (UK) Ltd",
"import_timezone": "Europe/London",
"is_live": True
}
} }
headers = {
"Authorization": "Bearer <token>",
"X-Clarus-Subdomain": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
Authorization: 'Bearer <token>',
'X-Clarus-Subdomain': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
data: {
type: 'subdomains',
attributes: {
company_name: 'Acme Logistics (UK) Ltd',
import_timezone: 'Europe/London',
is_live: true
}
}
})
};
fetch('https://clarus-api.com/api/subdomains/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"id": "57",
"type": "subdomains",
"attributes": {
"subdomain": "acme-logistics",
"company_name": "Acme Logistics (UK) Ltd",
"is_active": true,
"is_live": true
}
}
}{
"error": "<string>"
}{
"errors": [
{
"code": 123,
"symbol": "<string>",
"details": "<string>",
"source": "<string>",
"context": {}
}
]
}{
"errors": [
{
"code": 123,
"symbol": "<string>",
"details": "<string>",
"source": "<string>",
"context": {}
}
]
}Subdomains
Update a subdomain (tenant)
Update an existing tenant’s company details and settings. The subdomain slug itself cannot be changed. Restricted to the admin tenant or to editing your own current subdomain.
PATCH
/
api
/
subdomains
/
{id}
Update a subdomain (tenant)
curl --request PATCH \
--url https://clarus-api.com/api/subdomains/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Clarus-Subdomain: <api-key>' \
--data '
{
"data": {
"type": "subdomains",
"attributes": {
"company_name": "Acme Logistics (UK) Ltd",
"import_timezone": "Europe/London",
"is_live": true
}
}
}
'import requests
url = "https://clarus-api.com/api/subdomains/{id}"
payload = { "data": {
"type": "subdomains",
"attributes": {
"company_name": "Acme Logistics (UK) Ltd",
"import_timezone": "Europe/London",
"is_live": True
}
} }
headers = {
"Authorization": "Bearer <token>",
"X-Clarus-Subdomain": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
Authorization: 'Bearer <token>',
'X-Clarus-Subdomain': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
data: {
type: 'subdomains',
attributes: {
company_name: 'Acme Logistics (UK) Ltd',
import_timezone: 'Europe/London',
is_live: true
}
}
})
};
fetch('https://clarus-api.com/api/subdomains/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"id": "57",
"type": "subdomains",
"attributes": {
"subdomain": "acme-logistics",
"company_name": "Acme Logistics (UK) Ltd",
"is_active": true,
"is_live": true
}
}
}{
"error": "<string>"
}{
"errors": [
{
"code": 123,
"symbol": "<string>",
"details": "<string>",
"source": "<string>",
"context": {}
}
]
}{
"errors": [
{
"code": 123,
"symbol": "<string>",
"details": "<string>",
"source": "<string>",
"context": {}
}
]
}Authorizations
OAuth 2.0 authentication. Use the client credentials or authorization code flow to obtain an access token.
FlowAuthorization Code
- Authorization URL
- https://clarus-api.com/oauth/authorize
- Token URL
- https://clarus-api.com/oauth/token
FlowClient Credentials
- Token URL
- https://clarus-api.com/oauth/token
The subdomain/tenant name identifying which tenant's data to access. Required for all API requests.
Path Parameters
The unique identifier of the subdomain to update
Body
application/json
Show child attributes
Show child attributes
Response
Updated successfully
Show child attributes
Show child attributes

