Skip to content

Create a batch of engagements

Request

🔐 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 batch
  • projectTemplateId — apply a single project template to every engagement in the batch
  • includeAdditionalClients — include additional clients when creating engagements
  • batchEngagements — 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
Bodyapplication/jsonrequired
namestring or null

Optional label for the batch

Example:"2024 Annual Batch"
projectTemplateIdinteger or null, (int64)

Project template ID to apply to every engagement in the batch. Cannot be combined with per-engagement projectIds.

Example:10
includeAdditionalClientsboolean

Whether to include additional clients when creating engagements

Default:false
Example:false
batchEngagementsArray of objectsrequired

List of engagement records to 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
      }
    ]
  }'

Responses

Batch created successfully — process is asynchronous

Bodyapplication/json
idinteger, (int64)

Unique identifier of the created engagement batch

Example:9001
Response
{ "id": 9001 }