List workplace admins

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
GET /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.

Returns the people who currently have Workplace Platform access to a managed organisation, newest first. Admins whose access has been removed are not included.

Pass external_id to find a single admin by your platform’s identifier for them, as supplied when they were registered. At most one admin is returned. An unknown identifier, or one belonging to an admin whose access has been removed, returns an empty list rather than 404. external_id is only accepted from Partner organisations that use single sign-on with Penfold; other organisations receive 400.

Path parameters

  • organisation_id string Required

    Unique identifier for the managed organisation.

Query parameters

  • page_size integer

    The maximum number of workplace admins to return per page.

    Minimum value is 1, maximum value is 500. Default value is 200.

  • page_number integer

    The page number to return in the list of workplace admins.

    Minimum value is 1. Default value is 1.

  • external_id string

    Optional filter. Your platform’s identifier for the admin, as supplied when they were registered. Returns at most one admin. Must not be blank. Only accepted from Partner organisations that use single sign-on with Penfold.

    Minimum length is 1.

Responses

  • 200 application/json

    List of workplace admins retrieved successfully.

    Hide response attributes Show response attributes object
    • page_number integer Required

      The current page number.

    • page_size integer Required

      The number of workplace admins per page.

    • total_items integer Required

      The total number of workplace admins available.

    • items array[object] Required

      An array of workplace admin objects on the current page.

      Hide items attributes Show items attributes object

      A workplace admin registered on a managed organisation.

      • id string Required

        Penfold’s identifier for the workplace admin.

      • email string(email) Required
      • first_name string Required
      • last_name string Required
      • 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 application/json

    Bad request. Either page_size or page_number is out of range (no validation_errors), or external_id was supplied by an organisation that does not use single sign-on, or was blank (see validation_errors).

    Hide response attributes Show response attributes object
    • error string

      A descriptive error message.

    • validation_errors array[object]
      Hide validation_errors attributes Show validation_errors attributes object
      • field string Required

        The name of the field that failed validation.

      • message string Required

        A descriptive error message.

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

    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.

GET /organisations/{organisation_id}/workplace_admins
curl \
 --request GET 'https://payroll-api.getpenfold.dev/v4/organisations/{organisation_id}/workplace_admins' \
 --header "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
{
  "page_number": 1,
  "page_size": 200,
  "total_items": 3,
  "items": [
    {
      "id": "cm1wxyz2e0000abc123456789",
      "email": "jane.smith@example.com",
      "first_name": "Jane",
      "last_name": "Smith",
      "external_id": "usr_01HXYZ"
    }
  ]
}
Response examples (400)
{
  "error": "Bad request: invalid data provided.",
  "validation_errors": [
    {
      "field": "email",
      "message": "Email address is invalid."
    }
  ]
}
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."
}