Skip to content

Commit

Permalink
docs: Fix POST /identities curl snippet (#3786)
Browse files Browse the repository at this point in the history
  • Loading branch information
rolodato authored Apr 17, 2024
1 parent ec9e8ab commit ff2ce2e
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions frontend/common/code-help/traits/traits-curl.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,15 @@ module.exports = (
envId,
{ TRAIT_NAME, USER_ID },
userId,
) => `# This will create a user in the dashboard if they don't already exist
curl -i -X POST 'https://edge.api.flagsmith.com/api/v1/identities/' \\
) => `curl -i -X POST 'https://edge.api.flagsmith.com/api/v1/identities/' \\
-H 'x-environment-key: ${envId}' \\
-H 'Content-Type: application/json; charset=utf-8' \\
-d $'{
"traits": [
{
"trait_key": "${TRAIT_NAME}",
"trait_value": 42
},
}
],
"identifier": "${userId || USER_ID}"
}'
Expand Down

0 comments on commit ff2ce2e

Please sign in to comment.