Request to manage an existing client

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

application/json

Body Required

  • external_id string Required

    Your platform’s identifier for the client. Must not be blank. Maximum 255 characters.

    Minimum length is 1, maximum length is 255.

  • name string Required

    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.

    Minimum length is 1, maximum length is 255.

  • employer_external_references array[string] Required

    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.

    At least 1 but not more than 50 elements. Minimum length of each is 1.

Responses

  • 202 application/json

    Request received and waiting for approval.

    Hide response attributes Show response attributes object
    • id string Required

      Penfold’s identifier for the request.

    • status string Required

      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.

      Values are PendingApproval, Approved, Rejected, or Reverted.

    • external_id string Required

      Your platform’s identifier for the client, as you sent it.

    • name string Required

      The client’s name, as you sent it.

    • employer_external_references array[string] Required

      The employers’ Penfold references, as you sent them.

    • organisation_id string | null Required

      The managed organisation the client moved into. null unless status is Approved.

    • rejection_reason string Required

      Why Penfold rejected the request. null unless status is Rejected.

      Values are ClientNotConfirmed, ClientDeclined, WithdrawnByPartner, EmployersNotRecognised, NameDoesNotMatch, EmployersInDifferentOrganisations, NotAllEmployersMoving, ClientNotSetUp, AlreadyManaged, DuplicateRequest, ClientNotEligible, or PayrollSoftwareConnected.

    • created_at string(date-time) Required

      The date and time the request was received, in ISO 8601 format.

  • 400 application/json

    Bad request, the request is malformed or contains invalid data.

    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.

  • 405 application/json

    Method not allowed

    Hide response attribute Show response attribute object
    • error string

      A descriptive error message.

  • 409 application/json

    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.

    Hide response attributes Show response attributes object
    • code string Required

      You already have a request with this external_id that is pending approval or approved. Nothing was created.

      Value is PartnerManagementAlreadyRequested.

    • error string Required
POST /partner_management_requests
curl \
 --request POST 'https://payroll-api.getpenfold.dev/v4/partner_management_requests' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{
  "external_id": "client_01HXYZ",
  "name": "Acme Ltd",
  "employer_external_references": [
    "PEN12345678",
    "PEN87654321"
  ]
}'
Request examples
{
  "external_id": "client_01HXYZ",
  "name": "Acme Ltd",
  "employer_external_references": [
    "PEN12345678",
    "PEN87654321"
  ]
}
Response examples (202)
{
  "id": "cm1pmrq2e0000abc123456789",
  "status": "PendingApproval",
  "external_id": "client_01HXYZ",
  "name": "Acme Ltd",
  "employer_external_references": [
    "PEN12345678",
    "PEN87654321"
  ],
  "organisation_id": "string",
  "rejection_reason": "ClientNotConfirmed",
  "created_at": "2026-11-05T12:00:00.000Z"
}
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 (405)
{
  "error": "Bad request: invalid data provided."
}
Response examples (409)
{
  "code": "PartnerManagementAlreadyRequested",
  "error": "partner management already requested"
}