Custom Domain Management
4 API calls in this section.
Get Current Custom Domain
Storefront & Commerce / Custom Domain Management
GET
/storefront/custom-domainReturns the active or pending custom domain for the authenticated tenant storefront.
Send a bearer token in the Authorization header for an authenticated OnDi user session.
Request
curl
1curl --request GET "$ONDI_BASE_URL/storefront/custom-domain" \2 --header "Authorization: Bearer {{access_token}}"Headers
AuthorizationOptionalheader string
Bearer {{access_token}}
Responses
Success200
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.
Send a bearer token in the Authorization header for an authenticated OnDi user session.
Request
curl
1curl --request POST "$ONDI_BASE_URL/storefront/custom-domain/connect" \2 --header "Authorization: Bearer {{access_token}}" \3 --header "Content-Type: application/json" \4 --header "Content-Type: application/json" \5 --data '{6 "custom_domain": "shop.example.com"7}'Request body
json
1{2 "custom_domain": "shop.example.com"3}Request body fields
custom_domainExamplestring
Example field from the request body.
Headers
AuthorizationOptionalheader string
Bearer {{access_token}}
Content-TypeOptionalheader string
application/json
Responses
Success201
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}Error - Domain Already In Use409
Response body
json
1{2 "success": false,3 "message": "custom_domain_already_in_use",4 "data": null5}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.
Send a bearer token in the Authorization header for an authenticated OnDi user session.
Request
curl
1curl --request POST "$ONDI_BASE_URL/storefront/custom-domain/verify" \2 --header "Authorization: Bearer {{access_token}}"Headers
AuthorizationOptionalheader string
Bearer {{access_token}}
Responses
Success - Verified200
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}Success - Still Pending200
Response body
json
1{2 "success": true,3 "message": "market_custom_domain_dns_pending",4 "data": {5 "verified": false,6 "custom_domain": {7 "id": "domain-uuid",8 "custom_domain": "shop.example.com",9 "status": "pending_dns",10 "dns_verified_at": null11 }12 }13}Disconnect Custom Domain
Storefront & Commerce / Custom Domain Management
DELETE
/storefront/custom-domainDisconnects the current tenant custom domain and archives the connection record.
Send a bearer token in the Authorization header for an authenticated OnDi user session.
Request
curl
1curl --request DELETE "$ONDI_BASE_URL/storefront/custom-domain" \2 --header "Authorization: Bearer {{access_token}}"Headers
AuthorizationOptionalheader string
Bearer {{access_token}}
Responses
Success200
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}