Remove a workplace admin

Add MCP server to your AI tool

Allow AI tools and LLMs to interact with the API documentation portal through MCP.

MCP server URL

https://docs.getpenfold.dev/mcp

Standard setup for AI tools providing an mcp.json file

mcp.json
{
  "Penfold Payroll API v4 MCP server": {
    "url": "https://docs.getpenfold.dev/mcp"
  }
}

Close
DELETE /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.

Removes a person’s Workplace Platform access to a managed organisation, for example when they leave the customer’s company. Once removed they can no longer sign in through your platform or with a password, and they no longer appear in the list of workplace admins.

Removal is idempotent: repeating the call for an admin who has already been removed returns 200 and changes nothing. The same person can be registered again later, including with the same external_id.

Path parameters

  • organisation_id string Required

    Unique identifier for the managed organisation.

  • workplace_admin_id string Required

    Penfold’s identifier for the workplace admin, as returned when they were registered.

Responses

  • 200

    Workplace admin removed, or was already removed.

  • 401 application/json

    Unauthorized

    Hide response attribute Show response attribute object
    • error string

      A descriptive error message.

  • 403 application/json

    Forbidden, the access token is scoped to an employer.

    Hide response attribute Show response attribute object
    • error string

      A descriptive error message.

  • 404 application/json

    Organisation not found or not managed by your Partner organisation, or the workplace admin was never a member of it.

    Hide response attribute Show response attribute object
    • error string

      A descriptive error message.

  • 405 application/json

    Method not allowed

    Hide response attribute Show response attribute object
    • error string

      A descriptive error message.

  • 500 application/json

    Internal server error. The admin may be partially removed; retry the request.

    Hide response attribute Show response attribute object
    • error string

      A descriptive error message.

DELETE /organisations/{organisation_id}/workplace_admins/{workplace_admin_id}
curl \
 --request DELETE 'https://payroll-api.getpenfold.dev/v4/organisations/{organisation_id}/workplace_admins/{workplace_admin_id}' \
 --header "Authorization: Bearer $ACCESS_TOKEN"
Response examples (401)
{
  "error": "Bad request: invalid data provided."
}
Response examples (403)
{
  "error": "Bad request: invalid data provided."
}
Response examples (404)
{
  "error": "Bad request: invalid data provided."
}
Response examples (405)
{
  "error": "Bad request: invalid data provided."
}
Response examples (500)
{
  "error": "Bad request: invalid data provided."
}