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
| Parameter | Type | Required | Description |
|---|---|---|---|
workspaceId | string | Yes | Workspace identifier |
domainId | string | Yes | Domain 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 verifiedshowModal(boolean): Whether frontend should display a modal with instructionsmessage(string): Verification status messagemodalTitle(string | null): Modal title in Arabic (ifshowModalis true)modalTitleEn(string | null): Modal title in English (ifshowModalis true)modalMessage(string | null): Modal message in Arabic (ifshowModalis true)modalMessageEn(string | null): Modal message in English (ifshowModalis true)modalType(string | null): Modal type (info,warning,error)verificationToken(string | null): Verification token to add to DNSdnsInstructions(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