---
title: "Activate selected features and experiments for the given user."
method: POST
path: "/v1/activate"
---

# Activate selected features and experiments for the given user.

`POST /v1/activate`

Returns Optimizely's decision about which features and experiments a given user is exposed to. Optionally sends an impression event to the Optimizely analytics backend for any decision made for an experiment. This endpoint consolidates key functionality from the Feature Experimentation SDKs into one convenient call.

## Query parameters

- `featureKey` string[]
- `experimentKey` string[]
- `disableTracking` boolean
- `type` 'feature' | 'experiment' | '' — Limit the decisions to either experiment or features
- `enabled` boolean

## Request body

- ActivateContext
  - `userId` string
  - `userAttributes` object

## Response `200`

Valid response

- Decision[]
  - `featureKey` string
  - `experimentKey` string
  - `variationKey` string
  - `type` 'feature' | 'experiment' | ''
  - `enabled` boolean
  - `variables` object
  - `error` string

## Other responses

- `400` — Bad request, invalid parameters
- `401` — Unauthorized, invalid JWT
- `403` — You do not have necessary permissions for the resource

## Changes

- **2023-05-22** `b03cfe30eb69` — 3 breaking, 1 warning, 7 info
  - the request's body type/format changed from ``/`` to `object`/``
  - the response body contentMediaType changed from `` to `application/json` for the status `200`
  - the `items/` response's property type/format changed from ``/`` to `object`/`` for status `200`
  - removed the optional property `error` from the response with the `403` status
  - …7 more
- **2020-08-03** `32f6750ffa48` — 1 warning
  - added the new `` enum value to the `items/type` response property for the response status `200`
- **2020-03-11** `e703799d1cb0` — 1 info
  - added the optional property `items/error` to the response with the `200` status
- **2020-03-05** `cb780f560047` — 1 info
  - added the non-success response with the status `401`
- **2020-02-25** `551bc5b71295` — 1 info
  - added the non-success response with the status `400`

[Full history](https://skmtc.dev/optimizely/apis/optimizely-agent-api/changes/v1/activate/post.md)

---

[API](https://skmtc.dev/optimizely/apis/optimizely-agent-api.md) · [All operations](https://skmtc.dev/optimizely/apis/optimizely-agent-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/optimizely/optimizely-agent-api/revisions/8aa6750d4b77/schema)
