Users

Merge attributes into an identified user

Shallow-merges the given attributes into the user's metadata (RFC 7386 style at the top level): keys overwrite, null removes a key, omitted keys are kept. Creates the user if it doesn't exist (201).

patch/users/{userId}

Request

  • Base URL: https://api.produktly.com/api/v1
  • URL: https://api.produktly.com/api/v1/users/{userId}
  • Auth: HTTP bearer

Path parameters

userIdstring required

The user's external ID — the same value you pass to window.Produktly.identifyUser(). URL-encode it.

Example:user_123

Request body

metadataobject required

Attributes to merge (shallow, top level): keys overwrite, a key set to null is removed, omitted keys are kept, nested objects replace wholesale. Merged result max 32 KB serialized.

Example request

{
  "metadata": {
    "plan": "enterprise",
    "trialEndsAt": null
  }
}

Response

Updated

userIdstring required
metadataobject nullable required
createdAtstring date-time required
updatedAtstring date-time required

Changes

No recorded changes to this operation across all 1 revision of this API.