curl --request POST \
--url https://api.storiza.store/apps/{id}/exposures \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"hostname": "<string>",
"containerPort": 80
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({hostname: '<string>', containerPort: 80})
};
fetch('https://api.storiza.store/apps/{id}/exposures', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.storiza.store/apps/{id}/exposures"
payload = {
"hostname": "<string>",
"containerPort": 80
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"message": "Domain added",
"data": {
"appId": "<string>",
"name": "<string>",
"protocol": "http",
"type": "domain",
"containerPort": 123,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"id": "<string>",
"externalPort": 123,
"hostname": "<string>",
"isDomainVerificationRequired": false,
"isDomainVerified": false,
"verificationTarget": "<string>",
"verifiedAt": "2023-11-07T05:31:56Z",
"verificationError": "<string>",
"lastCheckedAt": "2023-11-07T05:31:56Z",
"isManaged": false,
"isEnabled": true
}
}Add a custom domain
Point a domain you own at this app.
CNAME it at the app’s managed hostname first — that record is what makes traffic arrive at all, so proving control costs no extra step. The target is returned as verificationTarget. A zone apex cannot hold a CNAME, so an A record resolving to the same addresses is accepted too.
The domain is created pending and is NOT routed until it verifies; routing on request would let anyone point a record at us and have the node answer for their hostname. Verification is re-checked every five minutes, and you can force a check with POST /apps/{id}/exposures/{exposureId}/verify.
Hostnames under storiza.app are refused — those are ours, and the app already has one.
Required API key permission: null
curl --request POST \
--url https://api.storiza.store/apps/{id}/exposures \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"hostname": "<string>",
"containerPort": 80
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({hostname: '<string>', containerPort: 80})
};
fetch('https://api.storiza.store/apps/{id}/exposures', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.storiza.store/apps/{id}/exposures"
payload = {
"hostname": "<string>",
"containerPort": 80
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"message": "Domain added",
"data": {
"appId": "<string>",
"name": "<string>",
"protocol": "http",
"type": "domain",
"containerPort": 123,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"id": "<string>",
"externalPort": 123,
"hostname": "<string>",
"isDomainVerificationRequired": false,
"isDomainVerified": false,
"verificationTarget": "<string>",
"verifiedAt": "2023-11-07T05:31:56Z",
"verificationError": "<string>",
"lastCheckedAt": "2023-11-07T05:31:56Z",
"isManaged": false,
"isEnabled": true
}
}Authorizations
An API key from the Storiza dashboard (API & Integrations), sent as Authorization: Bearer stz_….
Path Parameters
Body
Was this page helpful?