> For the complete documentation index, see [llms.txt](https://docs.getpenfold.dev/llms.txt)

# Change a workplace admin’s email

> PATCH /organisations/{organisation_id}/workplace_admins/{workplace_admin_id}
> 
> **Partner organisations only.** A Payroll organisation calling this
> endpoint receives `405 Method Not Allowed`. An employer-scoped access
> token receives `403 Forbidden`.
> 
> Changes the email address of a workplace admin on a managed
> organisation. The admin signs in with a password at the new address,
> and Penfold sends their emails there. If you use single sign-on with
> Penfold, the admin can still sign in through your platform, because
> Penfold matches them on their `external_id`, not their email.
> 
> Sending the admin’s current email address, ignoring case, returns
> `200` and changes nothing.
> 
> Returns `404 Not Found` when the organisation does not exist or is not
> managed by your Partner organisation, when the admin is not registered
> on that organisation, or when the admin’s access has been removed.



## Servers
- https://payroll-api.getpenfold.dev/v4: https://payroll-api.getpenfold.dev/v4


## Authentication methods
- O auth2 client credentials


## Parameters

### Path parameters

- **organisation_id** (string)
  Unique identifier for the managed organisation.

- **workplace_admin_id** (string)
  Penfold’s identifier for the workplace admin, as returned when they were registered.



### Body: application/json (object)

- **email** (string(email))
  The admin’s new email address. They sign in with a password at this address, and Penfold sends their emails here.



## Responses
### 200
Email changed, or was already this address.

#### Body: application/json (object)
- **id** (string)
  Penfold’s identifier for the workplace admin.

- **email** (string(email))

- **first_name** (string)

- **last_name** (string)

- **external_id** (string)
  Your platform’s identifier for this admin, as supplied when they
  were registered. Omitted when none was supplied, and for Partner
  organisations that do not use single sign-on.


### 400
Bad request, the request is malformed or contains invalid data.

#### Body: application/json (object)
- **error** (string)
  A descriptive error message.

- **validation_errors** (array[object])


### 401
Unauthorized

#### Body: application/json (object)
- **error** (string)
  A descriptive error message.


### 403
Forbidden, the access token is scoped to an employer.

#### Body: application/json (object)
- **error** (string)
  A descriptive error message.


### 404
Organisation not found or not managed by your Partner organisation, or workplace admin not registered on that organisation (including admins whose access has been removed).

#### Body: application/json (object)
- **error** (string)
  A descriptive error message.


### 405
Method not allowed

#### Body: application/json (object)
- **error** (string)
  A descriptive error message.


### 409
The email address already belongs to another Penfold Workplace Platform account. Nothing is changed.

#### Body: application/json (object)
- **code** (string)
  The email address already belongs to a Penfold Workplace Platform account, on this organisation or another one.

- **error** (string)


### 500
Internal server error. The email is unchanged, so you can retry.

#### Body: application/json (object)
- **error** (string)
  A descriptive error message.



[Powered by Bump.sh](https://bump.sh)
