1
2
3
4
5
StaffAdd (
    object Staff,
    bool InviteUser,
    bool WebhookEvaluate
)

Edit a staff user.

Note: available since RPM23.

Request

Request Data:

  • (bool) InviteUser (optional, default: false) – whether to send an email to the new user so they can finish setting up their account.
  • (bool) WebhookEvaluate (optional, default: false) – whether RPM should issue webhook requests
  • (object) Staff (required) – the data for the user
    • (int) StaffID (required) – identify the staff user to modify
    • (bool) Enabled (optional, default: false) – whether the user can login
    • (int) RoleID (required) – identify the role to assign to the user
    • (array) Groups (optional) – a list of staff groups following structure:
      • (int) ID (optional) – the group ID.
    • (object) Contact (optional) – contact information to update, if any is left empty the previous value is left untouched:
      • (string) Salutation (optional) – one of “Mr.”, “Ms.” or “Dr.”
      • (string) FirstName (optional) – the person’s name
      • (string) LastName (optional) – the person’s last name
      • (string) Title (optional) – the person’s title
      • (string) Email (optional) – the person’s email
      • (array) PhoneNumbers (optional) – a list of up to 4 phone numbers, each using the following structure:
        • (string) Number (optional) – the phone number.
        • (enum) Type (optional) – number indicating the type phone number it is: 1-Business, 2-Home, 3-Fax, 4-Other. There cannot be repeated types.
    • (array) Fields (optional) – a list of basic fields to fill in, each using the following structure:
      • (string) Field (optional) – the field name.
      • (string) Value (optional) – the field value.
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
{
    "InviteUser": <bool>,
    "WebhookEvaluate": <bool>,
    "Staff": {
        "StaffID": <int>,
        "Enabled": <bool>,
        "RoleID": <int>,
        "Groups": [
            {
                "ID": <int>
            }, // ... more groups
        ],
        "Contact": {
            "Salutation": <string>,
            "FirstName": <string>,
            "LastName": <string>,
            "Title": <string>,
            "Email": <string>,
            "PhoneNumbers": [
                {
                    "PhoneNumberID": <int>,
                    "Type": <enum 1=Business, 2=Home, 3=Fax, 6=Other>,
                    "Number": <string>
                }, // ... 3 more (1 per Type)
            ]
        },
        "Fields": [
            {
                "Field": <string>,
                "Value": <string>
            },  // ... more fields
        ]
    }
}

Response

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
{
    "Result": {
        "Username": <string>,
        "UserID": <int>,
        "Enabled": <bool>,
        "StaffID": <int>,
        "Name": <string>,
        "RoleID": <int>,
        "Role": <string>,
        "Groups": [],
        "Added": <string>,
        "Contact": {
            "ContactID": <int>,
            "Salutation": <string>,
            "FirstName": <string>,
            "LastName": <string>,
            "Title": <string>,
            "Email": <string>,
            "PhoneNumbers": [
                {
                    "PhoneNumberID": <int>,
                    "Type": <int>,
                    "Number": <string>
                }
            ]
        },
        "Fields": []
    }
}

Notes

  • Enabling users will affect costs starting in the current billing cycle.
  • Disabling users will take effect on the next billing cycle.

Errors

  • “Staff not found”
  • “RoleID is required”
  • “Contact.FirstName is required”
  • “Contact.LastName is required”
  • “Invite requires an email address”
  • “Edit super user by API is not allowed”
  • “Edit locked user by API is not allowed”
  • “Edit guest user by API is not allowed”