APG PayAPG Paydocs

Customers

Update delegate

PATCH/delegates/{delegateId}

Change a delegate's contact details, link it to or unlink it from a customer, or change what it is to one. Selected by the body's type.

7 actionsCustdUpdateEmailAddressCustdUpdateLinkCustomerCustdUpdateLoanRoleCustdUpdateNameCustdUpdatePhoneNumberCustdUpdatePositionCustdUpdateUnlinkCustomer

Permissions

Required permission

Required action depends on the request variant. Select a variant in the request body below to see the permission it requires.

Path parameters

delegateIdstring
required

Request body

This body is a typed union. Pick a variant to see its fields, the permission it requires, and a matching example.

Discriminated by type
type = "CustdUpdateEmailAddress"
Required permission
customerDelegates:update

Change the email address

emailAddressstringrequired

Example ada@example.com

curl -X PATCH https://api.tst.au.apgpay.dev/delegates/{delegateId} \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "type": "CustdUpdateEmailAddress",
  "emailAddress": "ada@example.com"
}'

Responses

The response is a tagged shape: type is always "CustdUpdateRspAttributes". Switch on it; subtypes can be added, and a client that already reads it will not break.

Discriminated by type
type = "CustdUpdateRspAttributes"

The resource as it stands after the change.

Example
{
  "type": "CustdUpdateRspAttributes",
  "updated": {
    "type": "CustdViewAttributes",
    "delegateId": "custd_9f2Kd8QpLzXw",
    "displayName": "Ada Lovelace",
    "emailAddress": "ada@example.com",
    "phoneNumber": "+61400000000",
    "status": "Enabled",
    "customers": [
      {
        "type": "CustdCustomerRefAttributes",
        "customerId": "cust_9f2Kd8QpLzXw",
        "position": "string",
        "loanRole": {
          "type": "CustdLoanRoleCardUser",
          "viewAllTransactions": true,
          "canCreateCards": true,
          "loanIds": [
            "loan_9f2Kd8QpLzXw"
          ]
        }
      }
    ],
    "createdAt": "2026-08-19T04:21:07Z",
    "updatedAt": "2026-08-19T04:21:07Z"
  }
}

Error responses