Update personas

Update a persona's details or change their role.

Update a persona

Patch/v2/personas/{personaId}

Request

Use this request to update or add details about a given persona, such as their last name or their phone number. The accountId is required and any other fields are optional, depending on what you want to update.

info

If updating your own persona, you can't change the status to deactivated.

Sample requestRequest structure
Copy
Copied
curl -i -X PATCH \
  'https://api.equalsmoney.com/v2/personas/f52537d5-d7ad-4d74-aa4a-84f28c818124?accountId=F12345' \
  -H 'Authorization: ApiKey YOUR_API_KEY_HERE' \
  -H 'Content-Type: application/json' \
  -d '{
    "emailAddress": "john.doe@example.com",
    "employeeNumber": "948947464",
    "workNumber": "(807) 940-7411 x8855",
    "jobTitle": "Human Division Manager",
    "status": "active",
    "transactionalEmailPreference": true,
    "cardTransactionPushNotificationPreference": false
  }'
Copy
Copied
curl -i -X PATCH \
  'https://api.equalsmoney.com/v2/personas/{personaId}?accountId={accountId}' \
  -H 'Authorization: ApiKey YOUR_API_KEY_HERE' \
  -H 'Content-Type: application/json' \
  -d '{
    "emailAddress": "string",
    "employeeNumber": "string",
    "workNumber": "string",
    "jobTitle": "string",
    "status": "string",
    "transactionalEmailPreference": "true",
    "cardTransactionPushNotificationPreference": boolean
  }'

Path parameters

Parameter Description
personaId
string
required
The ID of the persona that you want to update.

Allowable values:
An existing personaId (<= 36 characters)

Query parameters

Parameter Description
accountId
string
required
The ID of the account that you want to work with.

Allowable values:
An existing accountId (<= 36 characters)

Request body schema

Parameter Description
emailAddress
string
The persona's email address.

Allowable values:
<= 256 characters
employeeNumber
string
The persona's employee number.

Allowable values:
<= 256 characters
workNumber
string
The persona's work phone number.

Allowable values:
<= 50 characters
jobTitle
string
The persona's job title.

Allowable values:
<= 256 characters
status
string
The persona's status.

Allowable values:
active, deactivated
transactionalEmailPreference
boolean or null
Whether or not the persona has opted to receive emails.

Allowable values:
true, false
cardTransactionPushNotificationPreference
boolean
Whether or not the persona has opted to receive push notifications for all card transactions.

Allowable values:
true, false

Response

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

Sample responseResponse structure
Copy
Copied
{
  "id": "96df2fd7-b2fa-4f0c-ba69-502246776f99",
  "emailAddress": "john.doe@example.com",
  "employeeNumber": "948947464",
  "workNumber": "(807) 940-7411 x8855",
  "jobTitle": "Human Division Manager",
  "createdByPersonaId": "1b5c012d-8d3f-404b-8767-22af0004d383",
  "status": "active",
  "transactionalEmailPreference": true,
  "cardTransactionPushNotificationPreference": false,
  "inviteSentDate": "2018-12-01T14:54:30.000Z",
  "createdAt": "2018-12-01T14:54:30.000Z",
  "updatedAt": "2021-07-13T19:30:45.000Z"
}
Copy
Copied
{
  "id": "string",
  "emailAddress": "string",
  "employeeNumber": "string",
  "workNumber": "string",
  "jobTitle": "string",
  "createdByPersonaId": "string",
  "status": "string",
  "transactionalEmailPreference": boolean,
  "cardTransactionPushNotificationPreference": boolean,
  "inviteSentDate": "string",
  "createdAt": "string",
  "updatedAt": "string"
}

For more detailed information about this request and its response, see the API reference.

Update a persona's role

Patch/v2/personas/{personaId}/role

Request

Use this request to update a persona's role on a specified account. Learn more about the different role types.

Sample requestRequest structure
Copy
Copied
curl -i -X PATCH \
  'https://api.equalsmoney.com/v2/personas/ecb5d811-166e-4a84-a593-ded4ef06a106/role?accountId=F12345' \
  -H 'Authorization: ApiKey YOUR_API_KEY_HERE' \
  -H 'Content-Type: application/json' \
  -d '{
    "roleName": "Accountant"
  }'
Copy
Copied
curl -i -X PATCH \
  'https://api.equalsmoney.com/v2/personas/{personaId}/role?accountId={accountId}' \
  -H 'Authorization: ApiKey YOUR_API_KEY_HERE' \
  -H 'Content-Type: application/json' \
  -d '{
    "roleName": "string"
  }'

Path parameters

Parameter Description
personaId
string
required
The ID of the persona that you want to update the role for.

Allowable values:
An existing personaId (<= 36 characters)

Query parameters

Parameter Description
accountId
string
required
The ID of the account that you want to work with.

Allowable values:
An existing accountId (<= 36 characters)

Request body schema

Parameter Description
roleName
string
The name of the new role that you want to assign to the persona.

Allowable values:
Owner, Admin, Payer, Viewer, Accountant, User

Response

If your request is successful, you'll receive a 200 response containing the name of this persona's new role.

Sample responseResponse structure
Copy
Copied
{
  "name": "Accountant"
}
Copy
Copied
{
  "name": "string"
}

For more detailed information about this request and its response, see the API reference.

List roles

Request

Use this request to get a list of all roles that are currently supported.

Sample requestRequest structure
Copy
Copied
curl -i -X GET \
  'https://api.equalsmoney.com/v2/roles' \
  -H 'Authorization: ApiKey YOUR_API_KEY_HERE'
Copy
Copied
curl -i -X GET \
  'https://api.equalsmoney.com/v2/roles' \
  -H 'Authorization: ApiKey YOUR_API_KEY_HERE'

Query parameters

Parameter Description
limit
integer
The maximum amount of results to return. By default, this is set to 100.

Allowable values:
[ 1 .. 1000 ]
offset
integer
The amount of results to skip. By default, this is set to 0.

Allowable values:
A valid integer

Response

If your request is successful, you'll receive a 200 response containing a list of roles.

Sample responseResponse structure
Copy
Copied
{
  "limit": 100,
  "offset": 200,
  "count": 1,
  "rows": [
    {
      "accountId": "F12345",
      "id": "fbc32687-acbf-4a8b-b60e-b93bb75878ca",
      "name": "Owner",
      "type": "core"
    }
  ]
}
Copy
Copied
{
  "limit": integer,
  "offset": integer,
  "count": integer,
  "rows": [
    {
      "accountId": "string",
      "id": "string",
      "name": "string",
      "type": "string"
    }
  ]
}

For more detailed information about this request and its response, see the API reference.