Skip to main content

Customer Portal Custom Domain

4 API calls in this section.

Tenant-side endpoints to attach a custom domain (e.g. portal.tenant.com) to the delivery customer portal. All endpoints require an authenticated tenant_admin role.

Get Custom Domain​

Delivery & Last-Mile / Customer Portal Custom Domain
GET/delivery/customer-portal/custom-domain

Returns the current customer portal custom domain for the authenticated tenant, or null if none is connected.

Query parameters

ParameterTypeDescription
tenant_idOptionalstring

Tenant ID (optional if in auth token)

languagestring

Example: en

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Staging
Request
curl
1curl --globoff --request GET "https://staging-api.ondi.io/functions/v1/delivery/customer-portal/custom-domain?tenant_id=&language=en" \2  --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}"

Response examples

200OK
Response body
json
1{2  "success": true,3  "message": "Customer portal custom domain retrieved successfully",4  "data": {5    "custom_domain": {6      "id": "uuid",7      "tenant_id": "uuid",8      "custom_domain": "portal.tenant.com",9      "vercel_domain_id": "dom_xxx",10      "status": "active",11      "dns_records": [12        {13          "type": "CNAME",14          "name": "portal",15          "value": "cname.vercel-dns.com",16          "ttl": null,17          "purpose": "required"18        }19      ],20      "dns_verified_at": "2026-04-30T10:00:00Z",21      "connected_by": "uuid",22      "disconnected_by": null,23      "disconnected_at": null,24      "created_at": "2026-04-30T09:55:00Z",25      "updated_at": "2026-04-30T10:00:00Z"26    }27  }28}

Connect Custom Domain​

Delivery & Last-Mile / Customer Portal Custom Domain
POST/delivery/customer-portal/custom-domain/connect

Connects a new custom domain to the customer portal. Adds the domain to Vercel and stores the DNS records the tenant must publish.

Query parameters

ParameterTypeDescription
tenant_idstring—
languagestring

Example: en

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Content-Typestring

Example: application/json

Body parameters

ParameterTypeDescription
custom_domainstring—
Staging
Request
curl
1curl --globoff --request POST "https://staging-api.ondi.io/functions/v1/delivery/customer-portal/custom-domain/connect?tenant_id=&language=en" \2  --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}" \3  --header "Content-Type: application/json" \4  --data-raw '{5  "custom_domain": "portal.tenant.com"6}'

Response examples

201Created
Response body
json
1{2  "success": true,3  "message": "Customer portal custom domain connected successfully",4  "data": {5    "custom_domain": {6      "id": "uuid",7      "tenant_id": "uuid",8      "custom_domain": "portal.tenant.com",9      "vercel_domain_id": "dom_xxx",10      "status": "pending_dns",11      "dns_records": [12        {13          "type": "CNAME",14          "name": "portal",15          "value": "cname.vercel-dns.com",16          "ttl": null,17          "purpose": "required"18        }19      ],20      "dns_verified_at": null,21      "connected_by": "uuid",22      "disconnected_by": null,23      "disconnected_at": null,24      "created_at": "2026-04-30T09:55:00Z",25      "updated_at": "2026-04-30T09:55:00Z"26    }27  }28}

Verify Custom Domain​

Delivery & Last-Mile / Customer Portal Custom Domain
POST/delivery/customer-portal/custom-domain/verify

Asks Vercel to re-check DNS for the connected custom domain. If verified, the record transitions to active.

Query parameters

ParameterTypeDescription
tenant_idstring—
languagestring

Example: en

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Staging
Request
curl
1curl --globoff --request POST "https://staging-api.ondi.io/functions/v1/delivery/customer-portal/custom-domain/verify?tenant_id=&language=en" \2  --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}"

Response examples

200OK
Response body
json
1{2  "success": true,3  "message": "Customer portal custom domain verified successfully",4  "data": {5    "verified": true,6    "custom_domain": {7      "id": "uuid",8      "tenant_id": "uuid",9      "custom_domain": "portal.tenant.com",10      "vercel_domain_id": "dom_xxx",11      "status": "active",12      "dns_verified_at": "2026-04-30T10:00:00Z"13    }14  }15}

Disconnect Custom Domain​

Delivery & Last-Mile / Customer Portal Custom Domain
DELETE/delivery/customer-portal/custom-domain

Removes the custom domain from Vercel and archives the local record. Tenant can connect a new domain afterwards.

Query parameters

ParameterTypeDescription
tenant_idstring—
languagestring

Example: en

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Staging
Request
curl
1curl --globoff --request DELETE "https://staging-api.ondi.io/functions/v1/delivery/customer-portal/custom-domain?tenant_id=&language=en" \2  --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}"

Response examples

200OK
Response body
json
1{2  "success": true,3  "message": "Customer portal custom domain disconnected successfully",4  "data": {5    "custom_domain": {6      "id": "uuid",7      "status": "archived",8      "disconnected_by": "uuid",9      "disconnected_at": "2026-04-30T11:00:00Z"10    }11  }12}