Skip to main content

Remote Config - AB Enrollment

Endpoint

/o/sdk?method=ab

Overview

Enrolls a device into active A/B-tested remote config parameters for the specified parameter keys.

Authentication

SDK authentication is used.

Required SDK identity parameters:

  • app_key
  • device_id

Permissions

No dashboard permission check is applied. Access is determined by SDK app/device context.

Request Parameters

ParameterTypeRequiredDescription
methodStringYesMust be ab.
app_keyStringYesApp key used by SDK endpoints.
device_idStringYesDevice/user identifier for enrollment.
keysString (JSON Array)YesArray of remote config parameter keys to enroll.
metricsString (JSON Object) or ObjectNoUser properties used when evaluating conditions.
timestampNumberNoOptional event timestamp context.
cityStringNoOptional location context.
country_codeStringNoOptional location context.
locationStringNoOptional location context.
tzStringNoOptional timezone context.
ip_addressStringNoOptional IP override for geo-derived properties.

Response

Success Response

{
"result": "Successfully enrolled in ab tests"
}

Response Fields

FieldTypeDescription
resultStringEnrollment status message.

Error Responses

  • 400
{
"result": "Missing Keys"
}
  • 400
{
"result": "Error while fetching remote config data."
}

Behavior/Processing

  • keys is parsed from JSON string; if parsing fails or list is empty, request returns Missing Keys.
  • Only parameters that are eligible through A/B logic are processed for enrollment.
  • Endpoint returns a success message, not enrolled parameter values.

Database Collections

This endpoint does not directly query database collections.

Enrollment candidates are resolved via the /ab/parameters integration hook.


Examples

Enroll for two parameter keys

/o/sdk?method=ab&app_key=YOUR_APP_KEY&device_id=device-123&keys=["button_color","price_plan"]

Enroll with metrics for targeting

/o/sdk?method=ab&app_key=YOUR_APP_KEY&device_id=device-123&keys=["welcome_message"]&metrics={"platform":"iOS","country":"US"}

Limitations

  • Requires non-empty keys array.
  • Response does not include resolved config values.

Last Updated

2026-03-05