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

# Disconnect a managed organisation

> POST /organisations/{organisation_id}/disconnect
> 
> **Partner organisations only.** A Payroll organisation calling this
> endpoint receives `405 Method Not Allowed`. An employer-scoped access
> token receives `403 Forbidden`.
> 
> Hands a managed organisation back to Penfold, for example when the
> customer leaves you but stays with Penfold. The organisation and its
> employers stay on Penfold.
> 
> This ends your access to the organisation and its employers. Requests
> for them return `404 Not Found` and you receive no more webhooks about
> them, unless an employer is also in another organisation you manage.
> 
> Returns `404 Not Found` when the organisation does not exist, is not
> managed by your Partner organisation, or has already been disconnected.



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




## Responses
### 200
Organisation disconnected.

### 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, not managed by your Partner organisation, or already disconnected.

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


### 405
Method not allowed

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



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