Step 2: create a person

To create a person, you need to provide your account ID, the person's first and last name, their role, and their email address.

info

There are a number of additional optional parameters that you can provide, such as the person's date of birth. For more information, see the API reference.

Before you create a person, you'll want to decide which role to give them. Their determines their permissions, i.e., what information they can see and which actions they can perform. Learn more about roles and permissions.

You can find out which roles are currently enabled on your account using the following request.

SandboxProduction
Copy
Copied
curl -i -X GET \
  'https://api-sandbox.equalsmoney.com/v2/roles' \
  -H 'Authorization: ApiKey {apiKey}'
Copy
Copied
curl -i -X GET \
  'https://api.equalsmoney.com/v2/roles' \
  -H 'Authorization: ApiKey {apiKey}'

If your request is successful, you'll receive a 200 response containing a list of the roles that are enabled on your account. Your list might be slightly different from the example below.

Copy
Copied
{
  "count": 6,
  "limit": 100,
  "offset": 0,
  "rows": [
    {
      "id": "892706be-190c-4bc4-857c-673a3d3f7394",
      "name": "Accountant",
      "accountId": "F12345",
      "type": "core",
      "createdAt": "2022-11-14T10:38:23.000Z",
      "updatedAt": "2022-11-14T10:38:23.000Z"
    },
    {
      "id": "03dc3674-d5ed-4bc0-89a7-b0fbaa78fa22",
      "name": "Admin",
      "accountId": "F12345",
      "type": null,
      "createdAt": "2022-07-19T11:49:47.000Z",
      "updatedAt": "2022-07-19T11:49:47.000Z"
    },
    {
      "id": "49c37297-9466-4f67-8a62-a34e55558fba",
      "name": "Owner",
      "accountId": "F12345",
      "type": null,
      "createdAt": "2022-07-19T11:49:47.000Z",
      "updatedAt": "2022-07-19T11:49:47.000Z"
    },
    {
      "id": "a300107e-8b7d-41be-bbd1-b1fd1921352c",
      "name": "Payer",
      "accountId": "F12345",
      "type": null,
      "createdAt": "2022-07-19T11:49:48.000Z",
      "updatedAt": "2022-07-19T11:49:48.000Z"
    },
    {
      "id": "0b2fe98d-b225-46e2-b688-bae3eae8a828",
      "name": "User",
      "accountId": "F12345",
      "type": null,
      "createdAt": "2022-07-19T11:49:47.000Z",
      "updatedAt": "2022-07-19T11:49:47.000Z"
    },
    {
      "id": "c3b4caa8-0feb-4cb5-8855-07eb6026791a",
      "name": "Viewer",
      "accountId": "F12345",
      "type": null,
      "createdAt": "2022-07-19T11:49:47.000Z",
      "updatedAt": "2022-07-19T11:49:47.000Z"
    }
  ]
}

In this example, we're creating an account for Alison Abraham and granting her persona the Viewer role. This means she can view all activity on the account, but not edit anything regarding transactions, people, settings, etc.

SandboxProduction
Copy
Copied
curl -i -X POST \
  'https://api-sandbox.equalsmoney.com/v2/people' \
  -H 'Authorization: ApiKey {apiKey}' \
  -H 'Content-Type: application/json' \
  -d '{
    "accountId": "F12345",
    "firstName": "Alison",
    "lastName": "Abraham",
    "roleName": "Viewer",
    "emailAddress": "a.abraham@acme.com"
  }'
Copy
Copied
curl -i -X POST \
  'https://api.equalsmoney.com/v2/people' \
  -H 'Authorization: ApiKey {apiKey}' \
  -H 'Content-Type: application/json' \
  -d '{
    "accountId": "F12345",
    "firstName": "Alison",
    "lastName": "Abraham",
    "roleName": "Viewer",
    "emailAddress": "a.abraham@acme.com"
  }'

If your request is successful, you'll receive a 201 response containing details about the person, such as their id.

Copy
Copied
{
  "avatar": {
    "url": "",
    "fileName": ""
  },
  "id": "ef6d922f-70d5-4433-835c-8c77fa40d814", # The newly-created personId
  "productId": "d926625b-5e11-4ec1-b4cd-0af2a8021efc",
  "sub": "2a5a39cf-fda0-4901-9372-3f9039a2ee94",
  "firstName": "Alison",
  "lastName": "Abraham",
  "title": null,
  "middleInitials": null,
  "dob": null,
  "gender": null,
  "nationality": null,
  "countryOfResidence": null,
  "status": "active",
  "primaryMobileNumber": null,
  "primaryEmailAddress": "a.abraham@acme.com",
  "createdAt": "2024-01-02T13:47:01.000Z",
  "updatedAt": "2024-01-02T13:47:02.000Z",
  "emailTheme": "em-light",
  "persona": {
    "id": "32684fcd-b4be-438a-88d2-ee9b5f3eecd3",
    "emailAddress": "a.abraham@acme.com",
    "employeeNumber": null,
    "workNumber": null,
    "status": "invited",
    "jobTitle": null,
    "createdByPersonaId": null,
    "transactionalEmailPreference": true,
    "cardTransactionPushNotificationPreference": false,
    "createdAt": "2024-01-02T13:47:02.000Z",
    "updatedAt": "2024-01-02T13:47:02.000Z",
    "inviteSentDate": "2024-01-02T13:47:02.000Z"
  }
}

Next