Skip to main content

Update Storefront Domain Verification Token (v1)

Method & Path

PATCH /api/v1/workspace/:workspaceId/storefront/domain/:domainId/verification-token

Description

Update the Google Search Console verification token for a domain.

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

Request Body

{
"verificationToken": "google-site-verification=abc123xyz"
}

Request Body Schema

FieldTypeRequiredDescription
verificationTokenstringYesVerification token from Google Search Console (min: 1, max: 500 characters)

Response 200 OK

{
"domain": {
"id": "507f1f77bcf86cd799439011",
"domain": "example.com",
"verificationToken": "google-site-verification=abc123xyz",
"status": "pending"
},
"message": "تم تحديث رمز التحقق بنجاح"
}

Common Errors

400 Bad Request: Invalid verification token format

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

  • Token is automatically normalized to google-site-verification=... format
  • Updating the token resets domain verification status to pending
  • After updating, use Verify Domain endpoint to check verification