Skip to main content

Setting Up Your First Dock

A dock is your isolated workspace in Docyard. This guide walks through the full setup: creation, domain verification, KYC, and branding.

1. Create the Dock

Start by creating a dock with your company details:
curl -X POST https://api.docyard.io/v1/docks \
  -H "Authorization: Bearer dk_live_a1b2c3d4..." \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Acme Insurance",
    "domain": "acme-insurance.com",
    "legalName": "Acme Insurance Co.",
    "businessType": "corporation",
    "taxId": "12-3456789",
    "businessEmail": "[email protected]"
  }'
Save the returned id — every subsequent operation references it.

2. Verify Your Domain

Domain verification proves you own the domain associated with your dock. Choose DNS or email verification.

Option A: DNS Verification

Initiate DNS verification:
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" }'
The response includes dnsInstructions — add the TXT record to your DNS provider:
Type:  TXT
Name:  _docyard-verification
Value: docyard-verify=dk_abc123def456...
After DNS propagation (typically 5–60 minutes, up to 48 hours), complete verification:
curl -X POST https://api.docyard.io/v1/docks/dock_01HQ3K.../domain/verify/dns \
  -H "Authorization: Bearer dk_live_a1b2c3d4..." \
  -H "Content-Type: application/json" \
  -d '{ "domain": "acme-insurance.com" }'

Option B: Email Verification

Send a verification email to an address at your domain:
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]"
  }'
Click the link in the verification email to complete the process.

3. Complete KYC

KYC verifies the identity of the organization operating the dock. Required for production use.
curl -X POST https://api.docyard.io/v1/docks/dock_01HQ3K.../kyc/initiate \
  -H "Authorization: Bearer dk_live_a1b2c3d4..." \
  -H "Content-Type: application/json" \
  -d '{
    "businessName": "Acme Insurance Co.",
    "businessType": "corporation",
    "taxId": "12-3456789",
    "address": {
      "street": "100 Main St",
      "city": "Hartford",
      "state": "CT",
      "postalCode": "06103",
      "country": "US"
    },
    "contactInfo": {
      "email": "[email protected]",
      "phone": "+1-860-555-0100"
    }
  }'
Check KYC status at any time:
curl https://api.docyard.io/v1/docks/dock_01HQ3K.../kyc/status \
  -H "Authorization: Bearer dk_live_a1b2c3d4..."

4. Configure Branding

Customize the recipient portal to match your brand:
curl -X PATCH https://api.docyard.io/v1/docks/dock_01HQ3K.../branding \
  -H "Authorization: Bearer dk_live_a1b2c3d4..." \
  -H "Content-Type: application/json" \
  -d '{
    "primaryColor": "#003366",
    "secondaryColor": "#e6f0ff",
    "customCss": ".portal-header { font-weight: 600; }"
  }'
Recipients accessing your dock’s portal see your colors, logo, and custom styling — powered by Docyard infrastructure.

5. Verify Everything

Check the dock is fully configured:
curl https://api.docyard.io/v1/docks/dock_01HQ3K... \
  -H "Authorization: Bearer dk_live_a1b2c3d4..."
Confirm:
  • domainVerificationStatus is VERIFIED
  • kycStatus is APPROVED
  • Branding fields are populated

Next Steps

Your dock is ready. Now: