Skip to main content

Verify Storefront Domain (v1)

Method & Path

POST /api/v1/workspace/:workspaceId/storefront/domain/:domainId/verify

Description

Verify domain ownership by checking DNS TXT record. This endpoint checks if the verification token has been added to the domain's DNS records.

Authentication

Required: Workspace authentication. User must be authenticated as Workspace Owner or Staff with store.manage permission.

Headers

Authorization: Bearer <workspace_token>
Content-Type: application/json

Path Parameters

ParameterTypeRequiredDescription
workspaceIdstringYesWorkspace identifier
domainIdstringYesDomain identifier

Response 200 OK

{
"verified": true,
"showModal": false,
"message": "Domain verified successfully"
}

Response when verification fails (shows modal)

{
"verified": false,
"showModal": true,
"modalTitle": "تحقق من النطاق",
"modalTitleEn": "Verify Domain",
"modalMessage": "لم يتم العثور على سجل TXT في DNS. يرجى إضافة السجل التالي:",
"modalMessageEn": "TXT record not found in DNS. Please add the following record:",
"modalType": "info",
"verificationToken": "google-site-verification=abc123",
"dnsInstructions": {
"recordType": "TXT",
"name": "@",
"value": "google-site-verification=abc123",
"ttl": 3600
}
}

Response Fields

  • verified (boolean): Whether domain ownership is verified
  • showModal (boolean): Whether frontend should display a modal with instructions
  • message (string): Verification status message
  • modalTitle (string | null): Modal title in Arabic (if showModal is true)
  • modalTitleEn (string | null): Modal title in English (if showModal is true)
  • modalMessage (string | null): Modal message in Arabic (if showModal is true)
  • modalMessageEn (string | null): Modal message in English (if showModal is true)
  • modalType (string | null): Modal type (info, warning, error)
  • verificationToken (string | null): Verification token to add to DNS
  • dnsInstructions (object | null): DNS configuration instructions

Common Errors

401 Unauthorized: Missing or invalid authentication token

403 Forbidden: User does not have store.manage permission

404 Not Found: Workspace or domain not found

500 Internal Server Error: Server error occurred while processing the request

Notes

  • DNS propagation can take up to 48 hours
  • Use Check TXT Record endpoint for polling verification status
  • After verification, SSL certificate can be issued