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

# Request to manage an existing client

> POST /partner_management_requests
> 
> **Partner organisations only.** A Payroll organisation calling this
> endpoint receives `405 Method Not Allowed`. An employer-scoped access
> token receives `403 Forbidden`.
> 
> Asks Penfold to let your Partner organisation manage a client that is
> already on Penfold. Name the client by its employers’ Penfold
> references. A Penfold account manager checks the request with the
> client, then approves or rejects it.
> 
> The response is the same whether or not the references match a Penfold
> employer, so it tells you nothing about the client before approval.
> Read the request with
> `GET /partner_management_requests/{partner_management_request_id}` to
> see the decision.



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


## Authentication methods
- O auth2 client credentials


## Parameters



### Body: application/json (object)

- **external_id** (string)
  Your platform’s identifier for the client. Must not be blank. Maximum 255 characters.

- **name** (string)
  The client’s name, as you know it. Penfold checks it against the client the employers belong to. Must not be blank. Maximum 255 characters.

- **employer_external_references** (array[string])
  The Penfold references of the client’s employers, as used in the
  EmployerId column of payroll files. Name every employer the client
  has on Penfold: a client moves to you as a whole. Between 1 and 50,
  with no duplicates.



## Responses
### 202
Request received and waiting for approval.

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

- **status** (string)
  Where a partner management request has got to.
  - `PendingApproval`: A Penfold account manager has not decided yet.
  - `Approved`: You took over the client’s organisation, `organisation_id`. Read it with the organisation endpoints, then link its people with `POST /partner_management_requests/{partner_management_request_id}/sso_identity_links`.
  - `Rejected`: Penfold did not approve the request. `rejection_reason` says what to do next.
  - `Reverted`: The request was approved, then Penfold returned the organisation to the client. You no longer manage it.

- **external_id** (string)
  Your platform’s identifier for the client, as you sent it.

- **name** (string)
  The client’s name, as you sent it.

- **employer_external_references** (array[string])
  The employers’ Penfold references, as you sent them.

- **organisation_id** (string | null)
  The managed organisation the client moved into. `null` unless `status` is `Approved`.

- **rejection_reason** (string)
  Why Penfold rejected the request. `null` unless `status` is `Rejected`.

- **created_at** (string(date-time))
  The date and time the request was received, in ISO 8601 format.


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


### 405
Method not allowed

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


### 409
You already have an open request for this client. Nothing was created. Use `code`, not `error`, to detect this case; `error` is a human-readable message and its wording may change.

#### Body: application/json (object)
- **code** (string)
  You already have a request with this `external_id` that is pending approval or approved. Nothing was created.

- **error** (string)



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