Skip to main content

Quickstart

Get started with Docyard in 5 minutes. This guide covers both distributor and collector flows.

Option 1: Become a Distributor

Distributors upload documents to the lake.

Step 1: Sign Up

curl -X POST https://api.docyard.io/v1/auth/signup/distributor \
  -H "Content-Type: application/json" \
  -d '{
    "organization_name": "Acme Insurance",
    "business_email": "[email protected]",
    "industry": "insurance",
    "password": "your-secure-password"
  }'
Response:
{
  "distributor_id": "dist-abc123",
  "status": "pending_verification",
  "message": "Please submit verification documents"
}

Step 2: Submit Verification Documents

curl -X POST https://api.docyard.io/v1/distributors/dist-abc123/verify \
  -H "Content-Type: application/json" \
  -d '{
    "business_license": "<base64-encoded-document>",
    "tax_id": "12-3456789",
    "proof_of_address": "<base64-encoded-document>"
  }'

Step 3: Create Your Ramp

Once verified, create your upload endpoint:
curl -X POST https://api.docyard.io/v1/ramps \
  -H "X-API-Key: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Production Ramp",
    "description": "Main upload endpoint"
  }'
Response:
{
  "ramp_id": "ramp-xyz789",
  "api_key": "dk_live_xxxxxxxxxxxx",
  "api_secret": "dk_secret_xxxxxxxxxxxx"
}

Step 4: Create an Artifact Type Template

Before uploading, define your document type:
curl -X POST https://api.docyard.io/v1/templates \
  -H "X-API-Key: dk_live_xxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Insurance Declaration Page",
    "description": "Standard insurance declaration document",
    "locks": [
      {
        "name": "policy_number",
        "data_type": "string",
        "description": "Insurance policy number",
        "weight": 20,
        "required": true
      },
      {
        "name": "effective_date",
        "data_type": "date",
        "description": "Policy effective date",
        "weight": 10,
        "required": true
      },
      {
        "name": "mortgagee_name",
        "data_type": "string",
        "description": "Name of mortgagee/lender",
        "weight": 5,
        "required": false
      }
    ]
  }'
Response:
{
  "template_id": "tmpl-abc123",
  "status": "pending_approval",
  "message": "Template submitted for admin review"
}

Step 5: Upload Your First Artifact

Once your template is approved, upload a document:
curl -X POST https://api.docyard.io/v1/ramp/artifacts \
  -H "X-API-Key: dk_live_xxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "template_id": "tmpl-abc123",
    "locks": {
      "policy_number": { "value": "POL-12345678" },
      "effective_date": { "value": "2026-03-15" },
      "mortgagee_name": { "value": "FirstCity Bank" }
    },
    "threshold": 20,
    "content": "<base64-encoded-pdf>"
  }'
Response:
{
  "id": "art-abc123",
  "status": "active",
  "message": "Artifact uploaded successfully"
}

Option 2: Become a Collector

Collectors retrieve documents from the lake.

Step 1: Sign Up

curl -X POST https://api.docyard.io/v1/auth/signup/collector \
  -H "Content-Type: application/json" \
  -d '{
    "organization_name": "FirstCity Bank",
    "business_email": "[email protected]",
    "industry": "mortgage_lending",
    "password": "your-secure-password"
  }'
Response:
{
  "collector_id": "coll-xyz789",
  "status": "pending_kyc",
  "message": "Please complete KYC verification"
}

Step 2: Complete KYC Verification

curl -X POST https://api.docyard.io/v1/collectors/coll-xyz789/kyc \
  -H "Content-Type: application/json" \
  -d '{
    "business_license": "<base64-encoded-document>",
    "tax_id": "98-7654321",
    "nmls_id": "123456",
    "proof_of_address": "<base64-encoded-document>"
  }'

Step 3: Declare Your Keys

curl -X POST https://api.docyard.io/v1/collectors/coll-xyz789/declare-keys \
  -H "Content-Type: application/json" \
  -d '{
    "declared_locks": [
      "policy_number",
      "loan_number",
      "mortgagee_name",
      "effective_date"
    ],
    "declaration_notes": "We receive policy numbers from carriers via nightly feeds"
  }'

Step 4: Wait for Approval

KYC is manually reviewed. You’ll receive an email when approved.

Step 5: Create Your Dock

Once approved, create your retrieval endpoint:
curl -X POST https://api.docyard.io/v1/docks \
  -H "X-API-Key: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Production Dock",
    "description": "Main retrieval endpoint"
  }'
Response:
{
  "dock_id": "dock-abc123",
  "api_key": "dk_live_collector_aaaaaaaa",
  "api_secret": "dk_secret_collector_bbbbbbbb"
}

Step 6: Retrieve Documents

Search for artifacts:
curl -X POST https://api.docyard.io/v1/dock/search \
  -H "X-API-Key: dk_live_collector_aaaaaaaa" \
  -H "Content-Type: application/json" \
  -d '{
    "filters": {
      "document_type": "declaration_page",
      "mortgagee_name": "FirstCity Bank"
    }
  }'
Response:
{
  "results": [
    {
      "id": "art-abc123",
      "document_type": "declaration_page",
      "locks": {
        "policy_number": "POL-12345678",
        "effective_date": "2026-03-15"
      }
    }
  ]
}
Retrieve with your keys:
curl -X POST https://api.docyard.io/v1/dock/retrieve/art-abc123 \
  -H "X-API-Key: dk_live_collector_aaaaaaaa" \
  -H "Content-Type: application/json" \
  -d '{
    "keys": {
      "policy_number": "POL-12345678"
    }
  }'
Response:
{
  "status": "granted",
  "content": "<pdf-data>",
  "content_type": "application/pdf"
}

Next Steps