GamebeastDocs
Dashboard
SDK V1Cohorts

Check cohort membership

POST
/sdk/v1/cohorts/membership

Resolves whether each provided userId is a member of the named cohort for the calling application/environment. Results are served from a per-user Redis cache where possible and computed against ClickHouse otherwise. If the cohort does not exist, returns cohortExists: false with isMember: false for every user. Rate-limited to 60 requests per minute per SDK key.

Authorization

sdkApiKey
authorization<token>

SDK (public) key, prefixed gb_pk_ (older keys: sdk_). Send it as the authorization header value. Scoped to one project, so it is safe to ship in a game build.

In: header

Header Parameters

isstudio?|
Defaulttrue
project-id?integer
Range0 < value <= 9007199254740991

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/sdk/v1/cohorts/membership" \  -H "Content-Type: application/json" \  -d '{    "cohortName": "string",    "userIds": [      "string"    ]  }'
{  "cohortExists": true,  "users": [    {      "userId": "string",      "isMember": true    }  ]}