Import Users
POST /api/import/users
Section titled “POST /api/import/users”Bulk create or update users. The unique identifier is uber_id — if a user with that uber_id already exists it will be updated, otherwise a new user is created.
Headers
Section titled “Headers”| Header | Value |
|---|---|
api-key | Import API key |
Content-Type | application/json |
Request body
Section titled “Request body”{ "users": [ { "email": "john.doe@example.com", "uber_id": 12345, "first_name": "John", "last_name": "Doe", "partner_name": "Adecco", "active": 1 } ]}Fields
Section titled “Fields”| Field | Type | Required | Description |
|---|---|---|---|
email | string | yes | Email address — must be unique per uber_id |
uber_id | numeric | yes | Unique identifier used for matching existing users |
first_name | string | yes | First name |
last_name | string | yes | Last name |
partner_name | string | yes | Partner name (must exactly match the name stored in the database, e.g. Adecco or Randstad) |
active | boolean | yes | 1 = active, 0 = inactive |
Success response
Section titled “Success response”{ "success": true, "results": { "created": 2, "updated": 1, "failed": [] }}Partial success response
Section titled “Partial success response”{ "success": true, "results": { "created": 1, "updated": 0, "failed": [ { "index": 1, "uber_id": 99999, "email": "john.doe@example.com", "error": "Partner not found: \"Unknown Partner\"." } ] }}HTTP error codes
Section titled “HTTP error codes”| Status | Description |
|---|---|
401 | Missing api-key header |
403 | Invalid api-key |
422 | Validation error (missing or invalid field) |
Record-level errors
Section titled “Record-level errors”| Error | Description |
|---|---|
Partner not found: "..." | The given partner name does not exist in the database |
Email already belongs to a different user. | The email is already associated with a different uber_id |
Business logic
Section titled “Business logic”- New user (
uber_iddoes not exist yet): creates the user and sends a welcome email - Existing user (
uber_idalready exists): updates the record; ifactivechanges from0to1, a reactivation email is sent - Records listed in
failedare not saved; all other records in the batch are processed independently