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).
Authorization
BearerAuth Use an API key from the Produktly dashboard → Settings → API keys.
In: header
Path Parameters
The user's external ID — the same value you pass to window.Produktly.identifyUser(). URL-encode it.
1 <= lengthRequest Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X PATCH "https://example.com/users/string" \ -H "Content-Type: application/json" \ -d '{ "metadata": { "plan": "pro", "seats": 12, "signedUpAt": "2026-02-14" } }'{ "userId": "user_123", "metadata": { "plan": "enterprise", "seats": 12 }, "createdAt": "2026-07-01T09:00:00.000Z", "updatedAt": "2026-07-15T09:00:00.000Z"}Get an identified user GET
Returns the user's attributes and timestamps. metadata can be null for users identified client-side without attributes.
Create or replace an identified user PUT
Server-side equivalent of identifyUser() with replace semantics: creates the user if it doesn't exist (201), otherwise replaces its entire metadata object (200). Prefer PATCH for scheduled syncs so you don't clobber attributes set client-side.