GamebeastDocs
Dashboard
Project APIExperiments (V2)

Unenroll member

POST
/application/{applicationId}/v2/experiments/{experimentId}/assignments/unenroll

Explicitly unenroll a unit from an experiment. If a divergence row exists it is updated to unenrolled status; otherwise a new row is inserted. Unlike clearing an override, this unenrolls even members with an automatic group assignment.

Authorization

personalAccessTokenAuth
AuthorizationBearer <token>

Personal access token (prefixed gb_pat_). Acts on behalf of its owner and can never exceed the owner's own permissions. Send it as Authorization: Bearer <token>.

In: header

Path Parameters

applicationId*integer
Range0 < value <= 9007199254740991
experimentId*integer
Range0 < value <= 9007199254740991

Header Parameters

environment_id*number

Gamebeast environment ID

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/application/1/v2/experiments/1/assignments/unenroll" \  -H "environment_id: 0" \  -H "Content-Type: application/json" \  -d '{    "unitType": "user",    "distinctId": "string"  }'
{  "assignment": {    "experimentId": 1,    "unitType": "user",    "distinctId": "string",    "automaticGroupId": 1,    "automaticSource": "weightedHash",    "automaticAssignedAt": "2019-08-24T14:15:22Z",    "overrideGroupId": 1,    "overrideSetAt": "2019-08-24T14:15:22Z",    "overrideSetBy": "4ade4f38-35c9-4cac-ac9d-5256213fb60b",    "overrideReason": "string",    "status": "active",    "effectiveGroupId": 1,    "effectiveSource": "weightedHash",    "version": 2,    "statusChangedAt": "2019-08-24T14:15:22Z",    "statusChangedBy": "d504620c-9af0-4af0-b2c2-f855ca6ca92e",    "statusReason": "string",    "createdAt": "2019-08-24T14:15:22Z",    "updatedAt": "2019-08-24T14:15:22Z"  }}