Client API – Create or Identify User

Modified on Thu, Oct 23 at 7:42 AM

Creates or identifies a user within the specified environment. If the user already exists, this marks them as identified and may update attributes. If they don’t exist, a new user is created.


Endpoint

POST /api/v1/client/{environmentId}/user

Path Parameters

NameTypeRequiredDescription
environmentIdstringEnvironment ID from the Project’s config

Request Body

application/json · object

Response – 200 OK

{
  "data": {
    "state": {
      "data": {
        "displays": [
          {
            "createdAt": "2025-02-03T11:23:13.050Z",
            "surveyId": "cm6orqtdd000a19wjhnbces5s"
          }
        ],
        "lastDisplayAt": "2025-02-03T11:23:13.050Z",
        "responses": [
          "cm6orqtdd000a19wjhnbces5s"
        ],
        "segments": [
          "cm6onrezn000hw2ahcokiz41v"
        ],
        "userId": "hello-user"
      },
      "expiresAt": "2025-02-03T11:23:13.050Z"
    }
  }
}


Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article