Step 5: update a persona

The relationship between a person and an account is represented by a persona.

You can update a persona's email address, employee number, work phone number, job title, status, transaction email preference, and card transaction push notification preference.

info

You can also update their role using a separate endpoint. We'll be doing that in the next step.

In this example, we're only updating our persona's email address and job title. Note that the accountId is a required parameter but everything else is optional.

SandboxProduction
Copy
Copied
curl -i -X PATCH \
  'https://api-sandbox.equalsmoney.com/v2/personas/{personaId}?accountId={accountId}' \
  -H 'Authorization: ApiKey {apiKey}' \
  -H 'Content-Type: application/json' \
  -d '{
    "employeeNumber": "321",
    "jobTitle": "Human Division Manager"
  }'
Copy
Copied
curl -i -X PATCH \
  'https://api.equalsmoney.com/v2/personas/{personaId}?accountId={accountId}' \
  -H 'Authorization: ApiKey {apiKey}' \
  -H 'Content-Type: application/json' \
  -d '{
    "employeeNumber": "321",
    "jobTitle": "Human Division Manager"
  }'

If your request is successful, you'll receive a 200 response containing the persona's updated details.

Copy
Copied
{
  "id": "32684fcd-b4be-438a-88d2-ee9b5f3eecd3",
  "emailAddress": "a.abraham@acme.com",
  "employeeNumber": "321", # The updated employee number
  "workNumber": null,
  "status": "invited",
  "jobTitle": "Human Division Manager", # The updated job title
  "createdByPersonaId": null,
  "transactionalEmailPreference": true,
  "cardTransactionPushNotificationPreference": false,
  "createdAt": "2024-01-02T13:47:02.000Z",
  "updatedAt": "2024-01-02T14:09:28.347Z",
  "inviteSentDate": "2024-01-02T13:47:02.000Z"
}

Next