latestOpenAPI 3.0.02026-08-1092038.0 KB

c0dcbcafc495

Upsert up to 50 users at a time based on nectar_id (recommended), email, or employee_id

Creates or updates users. Supports inviting users via the user_invited field and send_invites query parameter.

Invite behavior:

  • Setting user_invited: true on a user in the request body will mark that user as invited in the database.

  • Invite emails are only sent when send_invites=true is passed as a query parameter.

  • When send_invites=true, invite emails are sent to all users that have user_invited: true in the current request body, including users that were already invited previously.

  • When send_invites=false or omitted, user_invited: true still updates the database, but no emails are sent.

  • user_invited can only be set to true. Setting it to false is not allowed and will return an error.

  • The response includes an invite_email_sent field for each user indicating whether an invite email was sent during this request.

Duplicate identifiers:

  • When multiple users in the request share the same email, employee_id, or phone_number, the request still returns 200 but the response warnings array describes which duplicates were detected and how they were handled.

  • Duplicate email or employee_id: all users sharing that value are skipped (not created or updated).

  • Duplicate phone_number: if the user has another identifier (email, employee_id, nectar_id), the phone number is stripped and the user is still processed; otherwise the user is skipped.

  • Callers should inspect warnings after every upsert to reconcile their source data.

put/v1/users

Query parameters

expandstring[]

Returns the created/updated users base or expanded data

lookup_keysstring[]

The keys to use to lookup users. If none are provided, defaults to the behavior below.

send_invitesboolean

When set to true, invite emails will be sent to all users with user_invited: true in the request body, including users that were already invited previously. When set to false or omitted, user_invited: true will still update the user in the database but no invite emails will be sent.

Request body

emailstring email
nectar_idstring
first_namestring
last_namestring
employee_idstring
departmentstring nullable
office_locationstring nullable
job_titlestring nullable
activeboolean
phone_numberstring nullable
inactive_datestring date nullable
hire_datestring date nullable
birth_datestring date nullable
preferred_namestring nullable
manager_emailstring email nullable
languagestring nullable
role'Administrator' | 'Manager' | 'Employee'

Nectar platform permission role. This controls access permissions within Nectar, not the user's company or HRIS role. Administrator: full admin access (also grants Manager permissions). Manager: receives a manager-level point allowance and can access analytics for direct reports. Employee: standard user with an employee-level point allowance. Warning: sending this field on an update will overwrite the user's existing role. Omit this field to preserve the current role.

custom_propertiesobject
user_invitedboolean

Set to true to mark the user as invited. Can only be set to true (setting to false will return an error). When combined with the send_invites query parameter, an invite email will be sent to the user. Without send_invites, the user will be marked as invited in the database but no email will be sent.

Example request

[
  {
    "phone_number": "123-456-7890",
    "custom_properties": {
      "custom_property_1": "string",
      "custom_property_2": 1,
      "custom_property_3": true,
      "custom_property_4": null
    }
  }
]

Response

OK

status'success'

Example response

{
  "data": {
    "users": [
      {
        "phone_number": "123-456-7890"
      }
    ]
  }
}