Skip to main content

Initiate Domain Verification

Starts the domain verification process. The dock must have a domain configured before verification can begin.
POST /v1/docks/:id/domain/verify/initiate

Path Parameters

ParameterTypeDescription
idstringThe dock ID

Request Body

ParameterTypeRequiredDescription
methodstringRequiredVerification method: dns or email
emailAddressstringConditionalRequired when method is email. Must be an address at the dock’s domain.

Example Request (DNS)

curl -X POST https://api.docyard.io/v1/docks/dock_01HQ3K.../domain/verify/initiate \
  -H "Authorization: Bearer dk_live_a1b2c3d4..." \
  -H "Content-Type: application/json" \
  -d '{ "method": "dns" }'
Response
{
  "success": true,
  "method": "dns",
  "domain": "acme-insurance.com",
  "status": "PENDING",
  "dnsInstructions": {
    "type": "TXT",
    "name": "_docyard-verification",
    "value": "docyard-verify=dk_abc123def456..."
  }
}

Example Request (Email)

curl -X POST https://api.docyard.io/v1/docks/dock_01HQ3K.../domain/verify/initiate \
  -H "Authorization: Bearer dk_live_a1b2c3d4..." \
  -H "Content-Type: application/json" \
  -d '{
    "method": "email",
    "emailAddress": "[email protected]"
  }'
Response
{
  "success": true,
  "method": "email",
  "domain": "acme-insurance.com",
  "status": "PENDING",
  "token": "sent to [email protected]"
}

Error Handling

StatusCondition
400No domain configured on the dock
400method is email but emailAddress is missing
401Missing or invalid API key
404Dock not found
DNS propagation can take up to 48 hours. After adding the TXT record, use the Verify Domain (DNS) endpoint to complete verification.