Custom Domain Management
4 API calls in this section.
Tenant-facing APIs for connecting, verifying, viewing, and disconnecting a storefront custom domain.
Get Current Custom Domain
Storefront & Commerce / Custom Domain Management
GET
/storefront/custom-domainReturns the active or pending custom domain for the authenticated tenant storefront.
Headers
| Parameter | Type | Description |
|---|---|---|
Authorization | string | Example: |
Request
curl
1curl --globoff --request GET "https://staging-api.ondi.io/functions/v1/storefront/custom-domain" \2 --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}"Response examples
200Success
Response body
json
1{2 "success": true,3 "message": "market_custom_domain_retrieved_successfully",4 "data": {5 "custom_domain": {6 "id": "domain-uuid",7 "market_id": "market-uuid",8 "tenant_id": "tenant-uuid",9 "custom_domain": "shop.example.com",10 "status": "pending_dns",11 "dns_records": [12 {13 "type": "CNAME",14 "name": "shop",15 "value": "cname.vercel-dns.com",16 "purpose": "verification"17 }18 ],19 "dns_verified_at": null,20 "created_at": "2026-03-27T12:00:00Z",21 "updated_at": "2026-03-27T12:00:00Z"22 }23 }24}Connect Custom Domain
Storefront & Commerce / Custom Domain Management
POST
/storefront/custom-domain/connectCreates a new custom domain connection for the authenticated tenant market and returns the DNS records the frontend should show to the user.
Headers
| Parameter | Type | Description |
|---|---|---|
Authorization | string | Example: |
Content-Type | string | Example: |
Body parameters
| Parameter | Type | Description |
|---|---|---|
custom_domain | string | — |
Request
curl
1curl --globoff --request POST "https://staging-api.ondi.io/functions/v1/storefront/custom-domain/connect" \2 --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}" \3 --header "Content-Type: application/json" \4 --data-raw '{5 "custom_domain": "shop.example.com"6}'Response examples
201Success
Response body
json
1{2 "success": true,3 "message": "market_custom_domain_connected_successfully",4 "data": {5 "custom_domain": {6 "id": "domain-uuid",7 "market_id": "market-uuid",8 "tenant_id": "tenant-uuid",9 "custom_domain": "shop.example.com",10 "status": "pending_dns",11 "dns_records": [12 {13 "type": "CNAME",14 "name": "shop",15 "value": "cname.vercel-dns.com",16 "purpose": "verification"17 }18 ],19 "dns_verified_at": null,20 "created_at": "2026-03-27T12:00:00Z",21 "updated_at": "2026-03-27T12:00:00Z"22 }23 }24}Verify Custom Domain
Storefront & Commerce / Custom Domain Management
POST
/storefront/custom-domain/verifyChecks the current tenant domain against Vercel and activates it once DNS verification is complete.
Headers
| Parameter | Type | Description |
|---|---|---|
Authorization | string | Example: |
Request
curl
1curl --globoff --request POST "https://staging-api.ondi.io/functions/v1/storefront/custom-domain/verify" \2 --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}"Response examples
200Success - Verified
Response body
json
1{2 "success": true,3 "message": "market_custom_domain_verified_successfully",4 "data": {5 "verified": true,6 "custom_domain": {7 "id": "domain-uuid",8 "custom_domain": "shop.example.com",9 "status": "active",10 "dns_verified_at": "2026-03-27T12:30:00Z"11 }12 }13}Disconnect Custom Domain
Storefront & Commerce / Custom Domain Management
DELETE
/storefront/custom-domainDisconnects the current tenant custom domain and archives the connection record.
Headers
| Parameter | Type | Description |
|---|---|---|
Authorization | string | Example: |
Request
curl
1curl --globoff --request DELETE "https://staging-api.ondi.io/functions/v1/storefront/custom-domain" \2 --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}"Response examples
200Success
Response body
json
1{2 "success": true,3 "message": "market_custom_domain_disconnected_successfully",4 "data": {5 "custom_domain": {6 "id": "domain-uuid",7 "custom_domain": "shop.example.com",8 "status": "archived",9 "disconnected_at": "2026-03-27T12:45:00Z"10 }11 }12}