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

# Register a workplace admin

> POST /organisations/{organisation_id}/workplace_admins
> 
> **Partner organisations only.** A Payroll organisation calling this
> endpoint receives `405 Method Not Allowed`. An employer-scoped access
> token receives `403 Forbidden`.
> 
> Registers a person as a workplace admin of a managed organisation.
> Penfold creates their Workplace Platform account and emails them an
> invitation to set a password.



## 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.



### Body: application/json (object)

- **email** (string(email))
  The admin’s email address. Penfold sends the invitation to set a password here.

- **first_name** (string)

- **last_name** (string)

- **external_id** (string)
  Your platform’s unique identifier for this admin. Penfold stores it
  to link the admin back to your platform, for example when the admin
  signs in to Penfold through your platform. Required for Partner
  organisations that use single sign-on with Penfold; omit it
  otherwise. Must not be blank. Maximum 255 characters.



## Responses
### 201
Workplace admin registered and invitation sent

#### 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.

#### 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 admin cannot be registered. Nothing is created and no invitation is sent. Use `code`, not `error`, to tell the cases apart. `error` is a human-readable message and its wording may change.

#### Body: application/json (object)
- **code** (string)
  The organisation has no employer yet. Add one with `POST /employers` before registering its admins.

- **error** (string)


### 500
Internal server error. Nothing is created and no invitation is sent, so you can retry.

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



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