Palbase Flags · API
/flags/users/{user_id}Set a user's values
Gives one user their own values for flags (1000 at most), each checked against its flag's type and choices. The user's readers are told (flags:<ref>:<user_id>).
Called by your server, with the project's secret key.
Path
user_idstring · requiredThe user's id.Request body
valuesobject · optionalEach flag's value, by key.curl -X PUT "https://<your-ref>.palbase.studio/flags/users/<user_id>" \
-H "apikey: $PALBASE_SECRET_KEY" \
-H "content-type: application/json" \
-d '{"values":{}}'Responses
200The values written
400The request is malformed, or a definition or a value breaks a flag's rules (the error names which)
401No key, or not a key of this project, or a token that is not valid (the edge's answer)
403Not the project's secret key
404No flag with this key, no value of the user's own for it, no such template, or no such experiment
429The project's request rate, or its flag reads for the period under its quota, are used up; Retry-After says when to try again
503The platform could not answer now; retrying is safe (Retry-After)
defaultAn error: the envelope names it (`error`) and explains it (`error_description`).
Operation PutUserValues of flags's contract.