Administrators

Administrators are users who perform actions via the dashboard. An organization has one administrator of type super and zero or more of type standard (also known as dispatchers in the dashboard). Administrators manage workers based on membership in the organization’s teams.

Create administrator

Creates a new administrator in your organization. An email will be sent for this administrator to confirm and configure their account.

To establish which teams an administrator can manage, see Teams.

Body parameters

NameTypeDescription
namestringThe administrator’s complete name.
emailstringThe administrator’s email address.
phonestringOptional. The administrator's phone number.
isReadOnlybooleanOptional. Whether this administrator can perform write operations.
curl -X POST "https://store.bponi.com/api/v2/admins" \
       -u "cd3b3de84cc1ee040bf06512d233719c:" \
       -d '{"name":"Chelsea M","email":"cm@bponi.com"}'
1
2
3
{
  "id": "8AxaiKwMd~np7I*YP2NfukBE",
  "timeCreated": 1455156651000,
  "timeLastModified": 1455156651779,
  "organization": "yAM*fDkztrT3gUcz9mNDgNOL",
  "email": "cm@bponi.com",
  "type": "standard",
  "name": "Chelsea M",
  "isActive": false,
  "metadata": []
}
1
2
3
4
5
6
7
8
9
10
11

isActive denotes whether the administrator has completed their account registration, whereas type indicates if this administrator is the organization's creator (super) or a dispatcher (standard).

When a duplicate email is used in creating an administrator, it will break the uniqueness constraint of the database and throw a duplicateKey error.

List administrators

To view all the administrators within an organization, including super admins and standard dispatchers. Returns a collection of admins.

curl -X GET "https://store.bponi.com/api/v2/admins" \
       -u "cd3b3de84cc1ee040bf06512d233719c:"
1
2
[
    // ...
  {
    "id": "tbVmEoNQwN9K92bsITQNUtWY",
    "timeCreated": 1455048957000,
    "timeLastModified": 1455048957461,
    "organization": "yAM*fDkztrT3gUcz9mNDgNOL",
    "email": "st@bponi.com",
    "type": "super",
    "name": "Sergey Tupolev",
    "isActive": true,
    "isReadOnly": false,
    "phone": "+16505557710",
    "teams": ["Q4Ay4XaJ77rvYtrxQ2WJmqh~"],
    "metadata": []
  },
  {
    "id": "jBOlwJTkN0JzfE9Rj5vEL~UT",
    "timeCreated": 1455048990000,
    "timeLastModified": 1455048990578,
    "organization": "yAM*fDkztrT3gUcz9mNDgNOL",
    "email": "is@bponi.com",
    "type": "standard",
    "name": "Iñaki Smith",
    "isActive": false,
    "isReadOnly" : false,
    "phone": "+14155556327",
    "teams": [],
    "metadata": []
  },
  {
    "id": "8AxaiKwMd~np7I*YP2NfukBE",
    "timeCreated": 1455156651000,
    "timeLastModified": 1455156651779,
    "organization": "yAM*fDkztrT3gUcz9mNDgNOL",
    "email": "cm@bponi.com",
    "type": "standard",
    "name": "Chelsea M",
    "isActive": false,
    "isReadOnly": true,
    "teams": ["Q4Ay4XaJ77rvYtrxQ2WJmqh~", "JDu~fDkztr*6fUcz9mNDgNOL"],   
    "metadata": []
  },
  // ...
]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45

Update administrator

The adminID has to be formatted correctly and exist in your organization, otherwise, errors will be thrown.

curl -X PUT "https://store.bponi.com/api/v2/admins/8AxaiKwMd~np7I*YP2NfukBE" \
       -u "cd3b3de84cc1ee040bf06512d233719c:" \
       -d '{"name":"C Manning"}'
1
2
3
{
  "id": "8AxaiKwMd~np7I*YP2NfukBE",
  "timeCreated": 1455156651000,
  "timeLastModified": 1455156652494,
  "organization": "yAM*fDkztrT3gUcz9mNDgNOL",
  "email": "cm@bponi.com",
  "type": "standard",
  "name": "C Manning",
  "isActive": false,
  "metadata": []
}
1
2
3
4
5
6
7
8
9
10
11
{
  "code": "InvalidContent",
  "message": {
    "error": 1005,
    "message": "The data types of one or more parameters are invalid.",
    "cause": "PuLjIsI8nF1xGU3vRWn2XA~Ta must be of type ObjectId",
    "request": "aa7d0676-5f2d-4baa-aa38-4285c2bdb438"
  }
}
1
2
3
4
5
6
7
8
9
{
  "code": "ResourceNotFound",
  "message": {
    "error": 1402,
    "message": "The requested resource does not exist.",
    "request": "a9212a19-73f9-461a-ae76-cfa1da474d4e"
  }
}
1
2
3
4
5
6
7
8

Delete administrator

The super administrator cannot be deleted. standard administrators can be deleted so long as they are not a team's sole manager, as teams must always have at least one managing administrator.

curl -X DELETE "https://store.bponi.com/api/v2/admins/8AxaiKwMd~np7I*YP2NfukBE" \
       -u "cd3b3de84cc1ee040bf06512d233719c:"
1
2
HTTP/1.1 200 OK
1
Last Updated: 11/29/2021, 10:25:26 PM