# Update a staff member

> 🔐 **Required role:** `API_ADMIN`
📖 **Data dictionary:** [Staff](/reference/data-dictionary/staff)

**Update an existing staff member's profile and optionally replace their rate card assignment**
All fields are optional — only the fields you include will be updated. Omitted fields
retain their current values.
**Rate card assignment replacement** (`rateCardAssignment`):
When provided, this operation atomically:
1. Deactivates
**all**
 active
`rate_card_staff_billing_rate`
 and

`rate_card_staff_average_cost`
 records currently linked to this staff member

(across any rate card).
2. Creates new records for the specified
`rateCardId`
.

Omitting `rateCardAssignment` entirely leaves existing rate card records untouched.
Pre-write validation ensures `rateCardId` and all `rateTypeId` values reference
existing records — if any are invalid the entire request is rejected with HTTP 400
and no changes are written.

Endpoint: PUT /api/v1/staff/{staffId}
Version: 1.0.0
Security: BearerAuth, CfAccessClientId, CfAccessClientSecret

## Security:

  - `BearerAuth` (unknown)
    http bearer JWT

  - `CfAccessClientId` (unknown)
    apiKey in header CF-Access-Client-Id

  - `CfAccessClientSecret` (unknown)
    apiKey in header CF-Access-Client-Secret

## Path parameters:

  - `staffId` (integer, required)
    Unique identifier of the staff member to update

## Request fields (application/json):

  - `firstName` (string | null)
    Updated first name
    Example: Jane

  - `lastName` (string | null)
    Updated last name
    Example: Doe

  - `email` (string | null)
    Updated primary email address
    Example: jane.doe@firm.com

  - `jobTitle` (string | null)
    Updated job title (free-text)
    Example: Manager

  - `jobTitleId` (integer | null)
    Updated job title lookup record ID
    Example: 8

  - `departmentId` (integer | null)
    Updated department ID
    Example: 3

  - `officeId` (integer | null)
    Updated office ID
    Example: 2

  - `orgId` (integer | null)
    Updated organization ID
    Example: 1

  - `serviceLineId` (integer | null)
    Updated service line ID
    Example: 4

  - `staffTypeId` (integer | null)
    Updated staff type ID (e.g. Partner, Manager, Associate)
    Example: 3

  - `partnerStaffId` (integer | null)
    Updated partner staff member ID
    Example: 50

  - `managerStaffId` (integer | null)
    Updated manager staff member ID
    Example: 31

  - `supervisorStaffId` (integer | null)
    Updated supervisor staff member ID
    Example: null

  - `prefix` (string | null)
    Updated name prefix
    Example: Dr.

  - `startDate` (string | null)
    Updated employment start date
    Example: 2023-06-01T00:00:00

  - `endDate` (string | null)
    Updated employment end date
    Example: null

  - `active` (boolean | null)
    Updated active status
    Example: true

  - `rateCardAssignment` (object | null)
    When provided, replaces the staff member's entire rate card assignment.
All current active billing rate and average cost records are deactivated
and new records are created for the specified rate card. Validated before
any writes — invalid `rateCardId` or `rateTypeId` values return HTTP 400.

  - `rateCardAssignment.rateCardId` (integer, required)
    ID of the rate card to assign
    Example: 6

  - `rateCardAssignment.billingRates` (array, required)
    New billing rate records to create, one per rate type. Can be an empty array if only the average cost is being updated.

  - `rateCardAssignment.billingRates.rateTypeId` (integer, required)
    ID of an existing rate type
    Example: 12

  - `rateCardAssignment.billingRates.hourlyBillingRate` (number | null)
    Hourly billing rate. Defaults to 0 when omitted.
    Example: 200

  - `rateCardAssignment.averageCost` (number | null)
    New average hourly cost. Omit to leave the average cost unset.
    Example: 95

## Request examples:

  - `Update staff fields only (no rate card change)` (unknown)

  - `Replace rate card assignment` (unknown)

  - `Update fields and replace rate card in one request` (unknown)

## Response 200:

  - `200` (unknown)
    Staff member updated successfully

## Response 200 fields (application/json):

  - `data` (object)

  - `data.id` (integer)
    Staff member identifier
    Example: 312

  - `data.pmsRef` (string)
    Example: EMP-1042

  - `data.ref` (string)
    Example: doe-j

  - `data.firstName` (string)
    Example: Jane

  - `data.lastName` (string)
    Example: Doe

  - `data.fullName` (string | null)
    Example: Jane Doe

  - `data.email` (string | null)
    Example: jane.doe@firm.com

  - `data.jobTitle` (string | null)
    Example: Manager

  - `data.active` (boolean)
    Example: true

  - `data.version` (integer)
    Record version. A newly onboarded staff member has version 0; updates through this API do not change it.
    Example: 0

  - `data.createdAt` (string | null)
    Example: 2024-03-15T10:00:00Z

  - `data.updatedAt` (string | null)
    Example: 2024-06-01T09:00:00Z

  - `data.rateCardAssignment` (object | null)
    Present only when `rateCardAssignment` was provided in the request. Contains the IDs of the newly created records.

  - `data.rateCardAssignment.rateCardId` (integer)
    Example: 6

  - `data.rateCardAssignment.billingRateIds` (array)
    IDs of the newly created rate_card_staff_billing_rate records
    Example: [205]

  - `data.rateCardAssignment.averageCostId` (integer | null)
    ID of the newly created rate_card_staff_average_cost record, or null if averageCost was not provided
    Example: 301

  - `meta` (object)

  - `meta.success` (boolean)
    Example: true

  - `meta.message` (string)
    Example: Staff member updated successfully

  - `meta.timestamp` (string)
    Example: 2024-06-01T09:00:00Z

  - `meta.version` (string)
    Example: v1

## Response 400:

  - `400` (unknown)
    Invalid request. Common causes:
- `rateCardAssignment.rateCardId`
 does not reference an existing rate card
- One or more
`rateTypeId`
 values in
`billingRates`
 do not exist

## Response 401:

  - `401` (unknown)
    Unauthorized — missing or invalid bearer token

## Response 403:

  - `403` (unknown)
    Forbidden — token does not have the `ROLE_API_ADMIN` role

## Response 404:

  - `404` (unknown)
    Staff member not found for the given `staffId`

## Response 500:

  - `500` (unknown)
    Internal server error

## Response 200 examples:

  - `Fields updated, no rate card change` (unknown)

  - `Rate card assignment replaced` (unknown)

