Skip to main content
POST
/
experiments
/
{experiment_id}
/
users
/
{user_id}
Attach a user to an experiment group
curl --request POST \
  --url https://api.qonversion.io/v4/experiments/{experiment_id}/users/{user_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "group_id": "<string>"
}
'
{
  "error": {
    "type": "request",
    "code": "<string>",
    "message": "<string>",
    "details": [
      {
        "field": "<string>",
        "message": "<string>"
      }
    ]
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication using the project Secret Key (prefixed with sk_, or test_sk_ for sandbox). All v4 public endpoints require the Secret Key — see Authentication. Never expose the Secret Key in client-side code.

Path Parameters

experiment_id
string
required

Experiment identifier.

Maximum string length: 256
Pattern: ^[a-zA-Z0-9._-]+$
user_id
string
required

User identifier.

Maximum string length: 256
Pattern: ^[a-zA-Z0-9._-]+$

Body

application/json
group_id
string
required

ID of the experiment group to assign the user to.

Maximum string length: 256
Pattern: ^[a-zA-Z0-9._-]+$

Response

User attached to experiment group