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.

Lists the organisation's active workplace admins. Removed admins are not listed.

Pass external_id to look an admin up by your own identifier rather than storing Penfold's id. That returns at most one admin, or an empty list when no active admin has that external_id.

Path parameters

  • organisation_id string Required

    Penfold organisation id.

Query parameters

  • external_id string

    Return only the active admin with this external_id. Only for organisations that use single sign-on with Penfold; otherwise 400.

Responses

  • 200 application/json

    Workplace admins retrieved

    Hide response attribute Show response attribute object
    • items array[object] Required

      The organisation's active workplace admins.

      Hide items attributes Show items attributes object
      • id string Required

        Penfold workplace admin id.

      • email string(email) Required

        The admin's Penfold email address.

      • first_name string Required
      • last_name string Required
      • external_id string | null Required

        Your identifier for this person: the subject id your identity provider puts in its sign-in token. null if your organisation does not use single sign-on with Penfold.

  • 400 application/json

    Bad request, including external_id sent by an organisation that does not use single sign-on with Penfold.

    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

    Missing or invalid authentication token

    Hide response attribute Show response attribute object
    • error string

      A descriptive error message.

  • 404 application/json

    Organisation not found, or not one you manage.

    Hide response attribute Show response attribute object
    • error string

      A descriptive error message.

  • 405 application/json

    Method not allowed. Partner organisations only.

    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)
{
  "items": [
    {
      "id": "cmo1adm000001abcd",
      "email": "sam@harbourgroup.example",
      "first_name": "Sam",
      "last_name": "Taylor",
      "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 (404)
{
  "error": "Bad request: invalid data provided."
}
Response examples (405)
{
  "error": "Bad request: invalid data provided."
}