Skip to main content
POST
/
2
/
abtests
/
schedule
curl
curl --request POST \
  --url https://analytics.us.algolia.com/2/abtests/schedule \
  --header 'accept: application/json' \
  --header 'content-type: application/json' \
  --header 'x-algolia-api-key: ALGOLIA_API_KEY' \
  --header 'x-algolia-application-id: ALGOLIA_APPLICATION_ID' \
  --data '{"name":"Custom ranking sales rank test","variants":[{"index":"delcourt_production","trafficPercentage":60,"description":"Current production index"},{"index":"delcourt_production","trafficPercentage":60,"description":"Current production index"}],"scheduledAt":"2023-06-15T15:06:44.400601Z","endAt":"2023-06-17T00:00:00Z"}'
{
  "abTestScheduleID": 224
}
Required ACL: editSettings

Authorizations

x-algolia-application-id
string
header
required

Your Algolia application ID.

x-algolia-api-key
string
header
required

Your Algolia API key with the necessary permissions to make the request. Permissions are controlled through access control lists (ACL) and access restrictions. The required ACL to make a request is listed in each endpoint's reference.

Body

application/json
name
string
required

A/B test name.

Example:

"Custom ranking sales rank test"

variants
object[]
required

A/B test variants.

Required array length: 2 elements
  • Option 1
  • Option 2
scheduledAt
string
required

Date and time when the A/B test is scheduled to start, in RFC 3339 format.

Example:

"2023-06-15T15:06:44.400601Z"

endAt
string
required

End date and time of the A/B test, in RFC 3339 format.

Example:

"2023-06-17T00:00:00Z"

Response

OK

abTestScheduleID
integer
required

Unique scheduled A/B test identifier.

Example:

224

I