Skip to content

Create a single engagement

Request

Create a single engagement letter

Creates an engagement letter for a specific client. The engagement letter will be associated with the specified client, fiscal year, and assigned staff.

Required fields:

  • clientId — the client for whom the engagement is being created
  • fiscalYear — the fiscal year of the engagement
  • partnerStaffId — the partner staff member assigned to the engagement
  • managerStaffId — the manager staff member assigned to the engagement
  • primaryContactId — the primary client contact

Optional fields:

  • engagementLetterTemplateId / documentTemplateId — which template to use
  • engagementNameTemplate — override the firm's default naming template
  • startDate / endDate — engagement date range
  • billingContactId — contact responsible for billing
  • secondaryContactId — secondary client contact
  • ccStaffIds — additional staff members to CC on the engagement
  • additionalClientIds — additional clients to associate with the engagement
  • jobIds — jobs/projects to link to the engagement
  • additionalDocuments — extra documents to attach to the engagement, each requiring a documentTemplateId and a documentType

Real Example:

curl --location 'https://{{host}}/api/v1/engagements/create' \
--header 'Authorization: Bearer {{token}}' \
--header 'Content-Type: application/json' \
--data '{
  "clientId": 420,
  "fiscalYear": 2024,
  "partnerStaffId": 53,
  "managerStaffId": 15,
  "primaryContactId": 101
}'
Security
BearerAuth
Bodyapplication/jsonrequired
clientIdinteger, (int64)required

Unique identifier of the client for this engagement

Example:420
fiscalYearintegerrequired

Fiscal year of the engagement

Example:2024
partnerStaffIdinteger, (int64)required

Unique identifier of the partner staff member

Example:53
managerStaffIdinteger, (int64)required

Unique identifier of the manager staff member

Example:15
primaryContactIdinteger, (int64)required

Unique identifier of the primary client contact

Example:101
secondaryContactIdinteger or null, (int64)

Unique identifier of the secondary client contact

Example:102
billingContactIdinteger or null, (int64)

Unique identifier of the billing contact

Example:103
engagementLetterTemplateIdinteger or null, (int64)

Unique identifier of the engagement letter template to use

Example:5
documentTemplateIdinteger or null, (int64)

Unique identifier of the document template to use

Example:7
engagementNameTemplatestring or null

Template string used to generate the engagement name. Overrides the firm's default naming template.

Example:"{{fiscal_year.year}} {{letter_template.name}} {{client.number}}"
startDatestring or null, (date)

Engagement start date (YYYY-MM-DD)

Example:"2024-01-01"
endDatestring or null, (date)

Engagement end date (YYYY-MM-DD)

Example:"2024-12-31"
ccStaffIdsArray of integers or null, (int64)

List of staff member IDs to CC on the engagement

Example:
[ 20, 21 ]
additionalClientIdsArray of integers or null, (int64)

IDs of additional clients to associate with the engagement

Example:
[ 790, 791 ]
jobIdsArray of integers or null, (int64)

IDs of jobs (projects) to link to this engagement

Example:
[ 101, 102 ]
additionalDocumentsArray of objects or null

Extra documents to attach to the engagement

curl -i -X POST \
  https://api.doc.aiwyn.ai/_mock/bundle/api/v1/engagements/create \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "clientId": 420,
    "fiscalYear": 2024,
    "partnerStaffId": 53,
    "managerStaffId": 15,
    "primaryContactId": 101
  }'

Responses

Engagement letter created successfully

Bodyapplication/json
idinteger, (int64)

Unique identifier of the newly created engagement

Example:34567
Response
{ "id": 34567 }