API reference
//
Onboard a new staff membe...
🔐 Required role:
API_ADMIN📖 Data dictionary: Staff
Create a new staff member, optionally assigning them to a rate card
Creates a staff record and, when rateCardAssignment is provided, atomically creates the corresponding billing rate and average cost records in the same transaction.
Required fields:
firstName— staff member's first namelastName— staff member's last namepmsRef— practice management system referenceref— unique staff reference code
Rate card assignment (rateCardAssignment): When provided, the rate card must already exist. Each entry in billingRates requires a valid rateTypeId. All three records (staff, billing rates, average cost) are created atomically — if any write fails the entire request is rolled back.
rateCardId— ID of an existing rate card (validated before any writes)billingRates— one record per rate type; each requires arateTypeIdaverageCost— single average hourly cost for this staff member (optional)
Security
(BearerAuth and CfAccessClientId and CfAccessClientSecret) or BearerAuth
ID of the partner staff member assigned to this person
Example:50
- Sandbox (requires Cloudflare Access headers)https://api.sandbox.aiwyn.app/api/v1/staff
- Staging (requires Cloudflare Access headers)https://api.staging.aiwyn.app/api/v1/staff
- Production (your live firm data; no Cloudflare Access headers)https://api.aiwyn.ai/api/v1/staff
curl -i -X POST \
https://api.sandbox.aiwyn.app/api/v1/staff \
-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 '{
"firstName": "Jane",
"lastName": "Doe",
"pmsRef": "EMP-1042",
"ref": "doe-j"
}'Response
{ "data": { "id": 312, "pmsRef": "EMP-1042", "ref": "doe-j", "firstName": "Jane", "lastName": "Doe", "fullName": "Jane Doe", "email": "jane.doe@firm.com", "active": true, "version": 0, "createdAt": "2024-03-15T10:00:00Z", "updatedAt": "2024-03-15T10:00:00Z", "rateCardAssignment": null }, "meta": { "success": true, "message": "Staff member created successfully", "timestamp": "2024-03-15T10:00:00Z", "version": "v1" } }