provider experiments POST /api/projects/{project_id}/experiments/{id}/archive/
@utdk/posthog /api/projects/{project_id}/experiments/{id}/archive/
experiments_archive_create
Archive an ended experiment. Hides the experiment from the default list view. The experiment can be restored at any time by updating archived=false. When the linked feature flag is still enabled, pass disable_feature_flag=true to also disable and archive it. Returns 400 if the experiment is already archived or has not ended yet.
id path required
A unique integer value identifying this experiment.
integer
project_id path required
Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.
string

Try it

Authentication
Configure credentials for PostHog API
experimentsArchiveCreate
POST/api/projects/{project_id}/experiments/{id}/archive/
Archive an ended experiment. Hides the experiment from the default list view. The experiment can be restored at any time by updating archived=false. When the linked feature flag is still enabled, pass disable_feature_flag=true to also disable and archive it. Returns 400 if the experiment is already archived or has not ended yet.

Parameters

required

A unique integer value identifying this experiment.

required

Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.

Input

When the linked feature flag is still enabled, also disable and archive it along with the experiment. Has no effect if the flag is already disabled (it is archived either way).

Configure credentials above to enable sending.

Code snippet
Updates live as you fill in the form above.

TypeScript

import posthog from '@utdk/posthog';

await posthog.experimentsArchiveCreate({
  "disable_feature_flag": false
})