Batch Create Recipients
Creates multiple recipients in a single API call. Each item is processed independently — failures on individual items do not block others. Use this for onboarding mixed persona types together.Copy
Ask AI
POST /v1/docks/:dockId/recipients/batch
Path Parameters
| Parameter | Type | Description |
|---|---|---|
dockId | string | The dock ID |
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
recipients | array | Required | Array of recipient objects |
recipients[].name | string | Required | Recipient display name |
recipients[].email | string | Required | Recipient email (stored lowercase) |
recipients[].stakeholderClass | string | Optional | Persona type: mortgagee, agent, policyholder, auditor |
recipients[].identifiers | object | Optional | Persona-specific key-value identifiers |
Example: Mixed Persona Batch
Onboard all four stakeholder types in one call:- Insurance
- Real Estate
- Healthcare
- Financial Services
Copy
Ask AI
curl -X POST https://api.docyard.io/v1/docks/dock_01HQ3K.../recipients/batch \
-H "Authorization: Bearer dk_live_a1b2c3d4..." \
-H "Content-Type: application/json" \
-d '{
"recipients": [
{
"name": "First National Bank",
"email": "[email protected]",
"stakeholderClass": "mortgagee",
"identifiers": {
"lender_id": "LND-4821",
"policy_number": "POL-2025-88401"
}
},
{
"name": "Citywide Credit Union",
"email": "[email protected]",
"stakeholderClass": "mortgagee",
"identifiers": {
"lender_id": "LND-7733",
"policy_number": "POL-2025-88401"
}
},
{
"name": "Sarah Chen — Apex Insurance Group",
"email": "[email protected]",
"stakeholderClass": "agent",
"identifiers": {
"agency_code": "AGN-1192",
"policy_number": "POL-2025-88401"
}
},
{
"name": "James Whitfield",
"email": "[email protected]",
"stakeholderClass": "policyholder",
"identifiers": {
"phone": "+1-860-555-0147",
"date_of_birth": "1983-06-15",
"policy_number": "POL-2025-88401"
}
},
{
"name": "Deloitte — Maria Gonzalez",
"email": "[email protected]",
"stakeholderClass": "auditor",
"identifiers": {
"badge_id": "AUD-DT-2025-0042",
"nda_hash": "sha256:e3b0c44298fc1c149afbf4c8996fb924..."
}
}
]
}'
Copy
Ask AI
curl -X POST https://api.docyard.io/v1/docks/dock_01HQ3K.../recipients/batch \
-H "Authorization: Bearer dk_live_a1b2c3d4..." \
-H "Content-Type: application/json" \
-d '{
"recipients": [
{
"name": "Pacific West Mortgage",
"email": "[email protected]",
"stakeholderClass": "mortgagee",
"identifiers": {
"lender_id": "PWM-2200",
"file_number": "FILE-2025-10042"
}
},
{
"name": "National Home Lending",
"email": "[email protected]",
"stakeholderClass": "mortgagee",
"identifiers": {
"lender_id": "NHL-3100",
"file_number": "FILE-2025-10042"
}
},
{
"name": "David Park — Pinnacle Title Group",
"email": "[email protected]",
"stakeholderClass": "agent",
"identifiers": {
"agent_license": "TL-CA-88210",
"file_number": "FILE-2025-10042"
}
},
{
"name": "Maria Espinoza",
"email": "[email protected]",
"stakeholderClass": "policyholder",
"identifiers": {
"phone": "+1-213-555-0198",
"date_of_birth": "1990-08-22",
"file_number": "FILE-2025-10042"
}
},
{
"name": "KPMG — Nathan Brooks",
"email": "[email protected]",
"stakeholderClass": "auditor",
"identifiers": {
"badge_id": "AUD-KPMG-2025-0119",
"nda_hash": "sha256:b4f9a2c8d1e7f3a0..."
}
}
]
}'
Copy
Ask AI
curl -X POST https://api.docyard.io/v1/docks/dock_01HQ3K.../recipients/batch \
-H "Authorization: Bearer dk_live_a1b2c3d4..." \
-H "Content-Type: application/json" \
-d '{
"recipients": [
{
"name": "Anthem Blue Cross",
"email": "[email protected]",
"stakeholderClass": "mortgagee",
"identifiers": {
"payer_id": "ANTHEM-00112",
"member_id": "MBR-2025-44210"
}
},
{
"name": "UnitedHealthcare",
"email": "[email protected]",
"stakeholderClass": "mortgagee",
"identifiers": {
"payer_id": "UHC-00445",
"member_id": "MBR-2025-44210"
}
},
{
"name": "Dr. Lisa Tran — Westside Cardiology",
"email": "[email protected]",
"stakeholderClass": "agent",
"identifiers": {
"npi_number": "1234567890",
"member_id": "MBR-2025-44210"
}
},
{
"name": "Robert Kim",
"email": "[email protected]",
"stakeholderClass": "policyholder",
"identifiers": {
"phone": "+1-312-555-0234",
"date_of_birth": "1975-11-03",
"member_id": "MBR-2025-44210"
}
},
{
"name": "HHS OIG — Angela Foster",
"email": "[email protected]",
"stakeholderClass": "auditor",
"identifiers": {
"badge_id": "HHS-OIG-2025-0087",
"nda_hash": "sha256:c7d2e9f1a3b5..."
}
}
]
}'
Copy
Ask AI
curl -X POST https://api.docyard.io/v1/docks/dock_01HQ3K.../recipients/batch \
-H "Authorization: Bearer dk_live_a1b2c3d4..." \
-H "Content-Type: application/json" \
-d '{
"recipients": [
{
"name": "Vanguard Warehouse Lending",
"email": "[email protected]",
"stakeholderClass": "mortgagee",
"identifiers": {
"investor_id": "VWL-5500",
"loan_number": "LN-2025-78300"
}
},
{
"name": "Flagstar Warehouse",
"email": "[email protected]",
"stakeholderClass": "mortgagee",
"identifiers": {
"investor_id": "FSW-8800",
"loan_number": "LN-2025-78300"
}
},
{
"name": "Marcus Johnson — Keystone Mortgage",
"email": "[email protected]",
"stakeholderClass": "agent",
"identifiers": {
"nmls_id": "NMLS-334421",
"loan_number": "LN-2025-78300"
}
},
{
"name": "Jennifer & Thomas Wright",
"email": "[email protected]",
"stakeholderClass": "policyholder",
"identifiers": {
"phone": "+1-704-555-0312",
"date_of_birth": "1988-03-27",
"loan_number": "LN-2025-78300"
}
},
{
"name": "OCC — Sandra Liu",
"email": "[email protected]",
"stakeholderClass": "auditor",
"identifiers": {
"badge_id": "OCC-2025-EX-0204",
"nda_hash": "sha256:a1b2c3d4e5f6..."
}
}
]
}'
Response
- Insurance
- Real Estate
- Healthcare
- Financial Services
Copy
Ask AI
{
"success": 5,
"failed": 0,
"errors": [],
"recipients": [
{
"id": "rcp_01HQ3N...",
"name": "First National Bank",
"email": "[email protected]",
"stakeholderClass": "mortgagee"
},
{
"id": "rcp_01HQ3P...",
"name": "Citywide Credit Union",
"email": "[email protected]",
"stakeholderClass": "mortgagee"
},
{
"id": "rcp_01HQ3Q...",
"name": "Sarah Chen — Apex Insurance Group",
"email": "[email protected]",
"stakeholderClass": "agent"
},
{
"id": "rcp_01HQ3R...",
"name": "James Whitfield",
"email": "[email protected]",
"stakeholderClass": "policyholder"
},
{
"id": "rcp_01HQ3S...",
"name": "Deloitte — Maria Gonzalez",
"email": "[email protected]",
"stakeholderClass": "auditor"
}
]
}
Copy
Ask AI
{
"success": 5,
"failed": 0,
"errors": [],
"recipients": [
{
"id": "rcp_01HQ3N...",
"name": "Pacific West Mortgage",
"email": "[email protected]",
"stakeholderClass": "mortgagee"
},
{
"id": "rcp_01HQ3P...",
"name": "National Home Lending",
"email": "[email protected]",
"stakeholderClass": "mortgagee"
},
{
"id": "rcp_01HQ3Q...",
"name": "David Park — Pinnacle Title Group",
"email": "[email protected]",
"stakeholderClass": "agent"
},
{
"id": "rcp_01HQ3R...",
"name": "Maria Espinoza",
"email": "[email protected]",
"stakeholderClass": "policyholder"
},
{
"id": "rcp_01HQ3S...",
"name": "KPMG — Nathan Brooks",
"email": "[email protected]",
"stakeholderClass": "auditor"
}
]
}
Copy
Ask AI
{
"success": 5,
"failed": 0,
"errors": [],
"recipients": [
{
"id": "rcp_01HQ3N...",
"name": "Anthem Blue Cross",
"email": "[email protected]",
"stakeholderClass": "mortgagee"
},
{
"id": "rcp_01HQ3P...",
"name": "UnitedHealthcare",
"email": "[email protected]",
"stakeholderClass": "mortgagee"
},
{
"id": "rcp_01HQ3Q...",
"name": "Dr. Lisa Tran — Westside Cardiology",
"email": "[email protected]",
"stakeholderClass": "agent"
},
{
"id": "rcp_01HQ3R...",
"name": "Robert Kim",
"email": "[email protected]",
"stakeholderClass": "policyholder"
},
{
"id": "rcp_01HQ3S...",
"name": "HHS OIG — Angela Foster",
"email": "[email protected]",
"stakeholderClass": "auditor"
}
]
}
Copy
Ask AI
{
"success": 5,
"failed": 0,
"errors": [],
"recipients": [
{
"id": "rcp_01HQ3N...",
"name": "Vanguard Warehouse Lending",
"email": "[email protected]",
"stakeholderClass": "mortgagee"
},
{
"id": "rcp_01HQ3P...",
"name": "Flagstar Warehouse",
"email": "[email protected]",
"stakeholderClass": "mortgagee"
},
{
"id": "rcp_01HQ3Q...",
"name": "Marcus Johnson — Keystone Mortgage",
"email": "[email protected]",
"stakeholderClass": "agent"
},
{
"id": "rcp_01HQ3R...",
"name": "Jennifer & Thomas Wright",
"email": "[email protected]",
"stakeholderClass": "policyholder"
},
{
"id": "rcp_01HQ3S...",
"name": "OCC — Sandra Liu",
"email": "[email protected]",
"stakeholderClass": "auditor"
}
]
}
Partial Failure Example
If one item has an invalid email, the rest still succeed:Copy
Ask AI
{
"success": 4,
"failed": 1,
"errors": [
{
"row": 2,
"error": "email must be a valid email address",
"name": "Invalid Recipient"
}
],
"recipients": [ ... ]
}
Error Handling
| Status | Condition |
|---|---|
400 | recipients array is empty |
401 | Missing or invalid API key |
404 | Dock not found |
Per-item errors are returned in the
errors array with their 0-based index. The overall request succeeds even if some items fail. Email addresses are normalized to lowercase — a dock cannot have two recipients with the same email. For auditors, compute the nda_hash by running sha256sum on the signed NDA PDF before registration.