Produktly docs
UsersUserid

Merge attributes into an identified user

PATCH
/users/{userId}

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
AuthorizationBearer <token>

Use an API key from the Produktly dashboard → Settings → API keys.

In: header

Path Parameters

userId*string

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

Length1 <= length

Request 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"}