Skip to main content
PUT
Create or update a user

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

User external ID

environmentId
string
required

Environment ID

projectId
string
required

Project ID

Body

application/json
attributes
object

Custom attributes to write on the user (merged into existing attributes). Each value is a literal, null (remove), or one operation object — {set}, {set_once}, {add}, {union}, {remove}. Values are coerced losslessly to the definition type; a value that does not fit is rejected. Attributes with an unknown codeName AUTO-CREATE a definition (type inferred from the value, or pinned with data_type) — a mistyped key silently creates a new attribute instead of updating the real one. Each key must be a valid codeName: start with a letter, then letters/digits/underscores, 2–100 chars.

Response

User created or updated

id
string
required

External user id — the id your app supplied at identify/upsert.

object
enum<string>
required
Available options:
user
attributes
object
required
createdAt
string<date-time>
required
companies
object[] | null
required

null = not expanded (pass expand: ["companies"]); [] = expanded, none.

memberships
object[] | null
required

null = not expanded (pass expand: ["memberships"]); [] = expanded, none.