API reference
//
Create a batch of engagem...
🔐 Required role:
ENG_C📖 Data dictionary: Engagement
Create a batch of engagement letters asynchronously
Submits a batch of engagement letter creation requests. The batch is processed asynchronously — use the returned batch ID with the GET /api/v1/engagements/batch/{batchId}/status endpoint to poll for completion and retrieve the IDs of the created engagements.
Batch-level options:
name— optional label for the batchprojectTemplateId— apply a single project template to every engagement in the batchincludeAdditionalClients— include additional clients when creating engagementsbatchEngagements— array of individual engagement records (required)
Constraint: You may provide either projectTemplateId (top-level) or projectIds on individual engagements — not both.
Security
(BearerAuth and CfAccessClientId and CfAccessClientSecret) or BearerAuth
Project template ID to apply to every engagement in the batch. Cannot be combined with per-engagement projectIds.
Example:10
Whether to include additional clients when creating engagements
Default:false
Example:false
- Sandbox (requires Cloudflare Access headers)https://api.sandbox.aiwyn.app/api/v1/engagements/batch/create
- Staging (requires Cloudflare Access headers)https://api.staging.aiwyn.app/api/v1/engagements/batch/create
- Production (your live firm data; no Cloudflare Access headers)https://api.aiwyn.ai/api/v1/engagements/batch/create
curl -i -X POST \
https://api.sandbox.aiwyn.app/api/v1/engagements/batch/create \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'CF-Access-Client-Id: YOUR_API_KEY_HERE' \
-H 'CF-Access-Client-Secret: YOUR_API_KEY_HERE' \
-H 'Content-Type: application/json' \
-d '{
"batchEngagements": [
{
"clientId": 420,
"fiscalYear": 2024,
"partnerStaffId": 53,
"managerStaffId": 15,
"primaryContactId": 101
},
{
"clientId": 421,
"fiscalYear": 2024,
"partnerStaffId": 53,
"managerStaffId": 15,
"primaryContactId": 201
}
]
}'Response
{ "id": 9001 }