Replace a user's traits
PUT
Replaces every trait of the user's profile (a null value drops that key), creating the profile when there is none; the traits take 4 KB of JSON at most (400 past it).
Requires users:write on the site (an API key, or a signed-in member's role). Share links: 401.
header
x-api-key<token>An organization API key (ak_…), with the permissions and the sites it was created with. For servers and scripts: no cookie and no Origin check. Also accepted as Authorization: Bearer ak_… (apiKeyBearer). A request carries one credential: a key sent with a share token or a live session cookie is 400 (details.reason: ambiguous_credentials).
Scope: users:write
siteId*stringuserId*stringLength
1 <= length <= 255application/json- body
traits*OK
application/json- response
data*curl -X PUT 'https://pilotfox.app/api/v1/sites/string/users/string/traits' \ -H 'Content-Type: application/json' \ -d '{ "traits": { "property1": "string", "property2": "string" }}'Example Response200
{ "data": { "user_id": "string", "traits": { "property1": "string", "property2": "string" }, "first_seen_at": "string", "updated_at": "string" }}