> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/api-reference/more-products-apis/feature-management-and-experimentation/experiments.md).

# Experiments

Manage workspace-scoped Experiments.

## List Experiments

> Returns a paginated list of Experiments in the specified project workspace.\
> Defaults to active experiments (\`status\` defaults to \`\[ACTIVE]\`). Query \`parent\_type\` is\
> required. Optional \`environment\_id\` filters to one environment.\
> Optional \`parent\_name\` filters by parent name for that type (Feature Flag, AI Config,\
> or Config). Unknown or mismatched \`parent\_name\` returns \`404\`. \`name\` is the experiment\
> title. \`parent\_type=CONFIG\` returns \`404\` in v1. Warehouse-native experiments are not\
> returned in v1.<br>

```json
{"openapi":"3.0.3","info":{"title":"Harness Feature Management & Experimentation API","version":"4.0.0"},"tags":[{"name":"Experiments","description":"Manage workspace-scoped Experiments."}],"servers":[{"url":"https://app.harness.io/fme/api","description":"Harness SaaS (production)"},{"url":"https://app3.harness.io/fme/api","description":"Harness SaaS (US-3)"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"Harness Service Account Token (SAT) or Personal Access Token (PAT).\nGenerate tokens in Harness under Account Settings → Access Management.\n"}},"parameters":{"AccountId":{"name":"account_id","in":"query","required":true,"description":"Harness account identifier. Required on all endpoints.","schema":{"type":"string","pattern":"^[-_A-Za-z0-9]+$","maxLength":128}},"OrganizationIdentifier":{"name":"organization_identifier","in":"query","required":true,"description":"Harness organization identifier.","schema":{"type":"string","pattern":"^[-_A-Za-z0-9]+$","maxLength":128}},"ProjectIdentifier":{"name":"project_identifier","in":"query","required":true,"description":"Harness project identifier.","schema":{"type":"string","pattern":"^[-_A-Za-z0-9]+$","maxLength":128}},"ExperimentParentTypeParam":{"name":"parent_type","in":"query","required":true,"description":"Parent kind to list. `FEATURE_FLAG` and `AI_CONFIG` are implemented. `CONFIG` is\nreserved; `parent_type=CONFIG` returns `404` in v1.\n","schema":{"$ref":"#/components/schemas/ExperimentParentType"}},"OptionalEnvironmentIdParam":{"name":"environment_id","in":"query","required":false,"description":"Filter to experiments assigned in this environment.","schema":{"type":"string","format":"uuid","pattern":"^[-_A-Za-z0-9]+$","maxLength":128}},"PaginationLimitParam":{"name":"limit","in":"query","required":false,"description":"Number of items to return per page. Defaults to 100, maximum 100.","schema":{"type":"integer","minimum":1,"maximum":100,"default":100}},"PaginationOffsetParam":{"name":"offset","in":"query","required":false,"description":"Number of items to skip before the first returned result. Defaults to 0.","schema":{"type":"integer","minimum":0,"default":0}}},"schemas":{"ExperimentParentType":{"type":"string","enum":["FEATURE_FLAG","AI_CONFIG","CONFIG"],"description":"Kind of parent the experiment runs on. `CONFIG` and `AI_CONFIG` are separate types.\nWarehouse-native experiments are not a parent type; they use `assignmentSource` on\nthis same resource when implemented.\n"},"ExperimentStatus":{"type":"string","enum":["ACTIVE","PAUSED","ARCHIVED","COMPLETED"],"description":"Experiment lifecycle status. New experiments are `ACTIVE`. `PATCH` can set `PAUSED`,\n`ARCHIVED`, or `COMPLETED`. `DELETE` removes the experiment permanently rather than\nsetting `status: ARCHIVED` (see the delete endpoint).\n"},"ExperimentListResponse":{"type":"object","description":"Paginated list of Experiments matching the query.","required":["data","limit","offset","totalCount"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Experiment"}},"limit":{"type":"integer","description":"The page size used for this response."},"offset":{"type":"integer","description":"The number of items skipped before the first result."},"totalCount":{"type":"integer","description":"Total number of experiments matching the query."}}},"Experiment":{"type":"object","additionalProperties":false,"description":"A workspace-scoped Experiment.","required":["type","id","name","environment","trafficType","startAt","endAt","baselineTreatment","comparisonTreatments","keyMetrics","supportingMetrics","tags","owners","status","createdAt","modifiedAt"],"properties":{"type":{"type":"string","enum":["EXPERIMENT"],"description":"Resource type discriminator. Always `EXPERIMENT`."},"id":{"type":"string","format":"ulid","pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","description":"Unique system-assigned identifier for the experiment. Use this as the path parameter in subsequent requests."},"parent":{"allOf":[{"$ref":"#/components/schemas/ExperimentParent"}],"description":"Present for Feature Flag, AI Config, and Config. Omitted for warehouse-native\nexperiments when that revision ships (those use `assignmentSource` instead).\nA given experiment returns exactly one of `parent` or `assignmentSource`, never both.\nThis revision always returns `parent` and omits `assignmentSource`.\n"},"assignmentSource":{"allOf":[{"$ref":"#/components/schemas/AssignmentSourceReference"}],"description":"Omitted for Feature Flag, AI Config, and Config. Present when warehouse-native\nexperiments are implemented. Mutually exclusive with `parent` (see `parent`).\nNot returned in this revision.\n"},"name":{"type":"string","minLength":2,"maxLength":250,"pattern":"^[a-zA-Z][-_a-zA-Z0-9]+$","description":"Unique experiment name within the project."},"description":{"type":"string","nullable":true,"maxLength":250,"description":"Human-readable description of this experiment."},"hypothesis":{"type":"string","nullable":true,"maxLength":500,"description":"Hypothesis this experiment is testing."},"environment":{"allOf":[{"$ref":"#/components/schemas/NamedReference"}],"description":"Environment this experiment is assigned in."},"trafficType":{"allOf":[{"$ref":"#/components/schemas/NamedReference"}],"description":"Reference to the traffic type used to bucket users."},"startAt":{"type":"string","format":"date-time","description":"ISO-8601 timestamp when the experiment starts."},"endAt":{"type":"string","format":"date-time","description":"ISO-8601 timestamp when the experiment ends."},"baselineTreatment":{"allOf":[{"$ref":"#/components/schemas/TreatmentName"}],"description":"Baseline treatment name."},"comparisonTreatments":{"type":"array","minItems":1,"description":"Comparison treatments (not including `baselineTreatment`).","items":{"$ref":"#/components/schemas/TreatmentName"}},"keyMetrics":{"type":"array","description":"Key metrics on this experiment.","items":{"$ref":"#/components/schemas/NamedReference"}},"supportingMetrics":{"type":"array","description":"Supporting metrics on this experiment.","items":{"$ref":"#/components/schemas/NamedReference"}},"tags":{"type":"array","description":"Tags associated with this experiment (each `type` is `TAG`).","items":{"$ref":"#/components/schemas/ReferenceObject"}},"owners":{"type":"array","description":"Users or teams that own this experiment. Empty if none were set on create.","items":{"$ref":"#/components/schemas/ExperimentOwnerReference"}},"status":{"allOf":[{"$ref":"#/components/schemas/ExperimentStatus"}],"description":"Lifecycle status of the experiment. Get returns the experiment regardless of status (`ACTIVE`, `PAUSED`, `ARCHIVED`, or `COMPLETED`)."},"createdAt":{"type":"string","format":"date-time","description":"ISO-8601 timestamp when the experiment was created."},"modifiedAt":{"type":"string","format":"date-time","description":"ISO-8601 timestamp when the experiment was last modified."},"rule":{"type":"string","nullable":true,"description":"Targeting-rule label this experiment's results are scoped to (e.g. `\"default rule\"` or\na specific targeting rule name on the parent flag). `null` when the experiment was\ncreated without one, in which case results use the experiment's default rule scope.\n"}}},"ExperimentParent":{"type":"object","additionalProperties":false,"description":"Parent Feature Flag, AI Config, or Config (id and name).","required":["type","id","name"],"properties":{"type":{"$ref":"#/components/schemas/ExperimentParentType"},"id":{"type":"string","description":"System-assigned identifier of the parent. Feature Flag ids are UUIDs; Config and\nAI Config ids are the AppConfig metadata id.\n"},"name":{"type":"string","description":"Human-readable parent name.","pattern":"^[A-Za-z][-_A-Za-z0-9]*$","maxLength":100}}},"AssignmentSourceReference":{"type":"object","additionalProperties":false,"description":"Impression assignment source (`type` is `ASSIGNMENT_SOURCE`).","required":["type","id"],"properties":{"type":{"type":"string","enum":["ASSIGNMENT_SOURCE"],"description":"Resource type. Always `ASSIGNMENT_SOURCE`."},"id":{"type":"string","format":"ulid","pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","description":"System-assigned identifier of the assignment source."}}},"NamedReference":{"type":"object","description":"Generic reference to another resource, returned in responses. `id` is the stable\npublic identifier and `name` is the human-readable label.\n","required":["id","name"],"properties":{"id":{"type":"string","description":"Identifier of the referenced resource."},"name":{"type":"string","description":"Human-readable name of the referenced resource."}}},"TreatmentName":{"type":"string","pattern":"^[a-zA-Z0-9][-_\\.a-zA-Z0-9]*$","description":"Treatment name. Must start with a letter or digit; remaining characters may be letters,\ndigits, hyphens, underscores, or periods.\n"},"ReferenceObject":{"type":"object","description":"Generic reference to another resource, returned in responses. `id` is the stable\npublic identifier, `type` disambiguates the referenced entity kind, and `name` is the\nhuman-readable label.\n","required":["id","type","name"],"properties":{"id":{"type":"string","description":"Identifier of the referenced resource."},"type":{"type":"string","description":"The kind of entity this reference points to (for example `TRAFFIC_TYPE`, `TAG`,\n`USER`, `GROUP`, `ROLLOUT_STATUS`, `FEATURE_FLAG`, `ENVIRONMENT`, or `SEGMENT`).\nEach resource API returns only the kinds relevant to that API.\n"},"name":{"type":"string","description":"Human-readable name of the referenced resource."}}},"ExperimentOwnerReference":{"type":"object","additionalProperties":false,"description":"Reference to an owner (user or team) of an experiment.","required":["type","id"],"properties":{"type":{"type":"string","enum":["USER","TEAM"],"description":"Owner kind."},"id":{"type":"string","description":"Identifier of the owner — the Harness user id (for `USER`) or team id (for `TEAM`)."}}},"ErrorResponse":{"type":"object","description":"Standard error response following RFC 7807 Problem Details format (Harness ADR 57).\n","required":["type","status","title","errorType"],"properties":{"type":{"type":"string","format":"uri","description":"URI reference to documentation for this error type."},"status":{"type":"integer","description":"HTTP status code."},"title":{"type":"string","description":"Short human-readable summary of the problem."},"errorType":{"type":"string","description":"Machine-readable error type identifier."},"detail":{"type":"string","description":"Detailed human-readable explanation specific to this occurrence."},"instance":{"type":"string","description":"URI reference identifying the specific occurrence (usually the request path)."},"errors":{"type":"array","description":"List of specific sub-errors (useful for multi-field validation failures). Governance\npolicy failures are also surfaced here — each failing policy is reported as an entry\nwith `errorType: \"governancePolicy\"` — rather than in a separate top-level field.\n","items":{"$ref":"#/components/schemas/ErrorDetail"}}}},"ErrorDetail":{"type":"object","description":"Details about a single sub-error.","required":["errorType","title"],"properties":{"errorType":{"type":"string","description":"Machine-readable error type for this specific error."},"title":{"type":"string","description":"Short summary of this specific error."},"detail":{"type":"string","description":"Detailed explanation of this specific error."},"field":{"type":"string","description":"Name of the request field this error applies to, when the error is field-specific\n(for example a validation failure). Omitted for errors not tied to a single field.\n"}}}},"responses":{"BadRequest":{"description":"Bad Request — validation errors or invalid state transition.\n","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"Unauthorized":{"description":"Unauthorized — the request is missing a valid API key, or the key has expired.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"Forbidden":{"description":"Forbidden — the caller is authenticated but not permitted to perform this operation.\nReturned when the API can deny the operation without leaking whether a resource exists,\nsuch as create, or write operations where the caller can already read the resource. When\nreturning `403` would reveal resource existence, the API returns `404` instead.\n\nEnvironment-scoped mutations that require approval also return `403`.\n","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"NotFound":{"description":"Not Found — the requested resource does not exist. Also returned when the caller lacks\naccess to the resource (to avoid leaking resource existence).\n","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"TooManyRequests":{"description":"Too Many Requests — the caller has exceeded the rate limit for this endpoint.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"InternalServerError":{"description":"Internal Server Error — an unexpected error occurred while processing the request.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"paths":{"/v4/experiments":{"get":{"tags":["Experiments"],"operationId":"listExperiments","summary":"List Experiments","description":"Returns a paginated list of Experiments in the specified project workspace.\nDefaults to active experiments (`status` defaults to `[ACTIVE]`). Query `parent_type` is\nrequired. Optional `environment_id` filters to one environment.\nOptional `parent_name` filters by parent name for that type (Feature Flag, AI Config,\nor Config). Unknown or mismatched `parent_name` returns `404`. `name` is the experiment\ntitle. `parent_type=CONFIG` returns `404` in v1. Warehouse-native experiments are not\nreturned in v1.\n","parameters":[{"$ref":"#/components/parameters/AccountId"},{"$ref":"#/components/parameters/OrganizationIdentifier"},{"$ref":"#/components/parameters/ProjectIdentifier"},{"$ref":"#/components/parameters/ExperimentParentTypeParam"},{"$ref":"#/components/parameters/OptionalEnvironmentIdParam"},{"name":"parent_name","in":"query","required":false,"description":"Filter to this parent name. When `parent_type` is `FEATURE_FLAG`, this is a Feature\nFlag name; when `AI_CONFIG`, an AI Config name; when `CONFIG`, a Config name.\nUnknown name, or a name that is not that parent kind, returns `404`. `name` is\nstill the experiment title.\n","schema":{"type":"string","pattern":"^[A-Za-z][-_A-Za-z0-9]*$","maxLength":100}},{"name":"name","in":"query","required":false,"description":"Filter by experiment name. Used with `match_type`.","schema":{"type":"string","maxLength":250}},{"name":"match_type","in":"query","required":false,"description":"How `name` is matched. Ignored when `name` is omitted.","schema":{"type":"string","enum":["starts_with","contains","exact"],"default":"contains"}},{"name":"status","in":"query","required":false,"description":"Filter by lifecycle status. Defaults to `[ACTIVE]`.","schema":{"type":"array","items":{"$ref":"#/components/schemas/ExperimentStatus"},"default":["ACTIVE"]},"style":"form","explode":true},{"name":"tags","in":"query","required":false,"description":"Filter to experiments that have any of the specified tags (by tag name).","schema":{"type":"array","items":{"type":"string"}},"style":"form","explode":true},{"$ref":"#/components/parameters/PaginationLimitParam"},{"$ref":"#/components/parameters/PaginationOffsetParam"}],"responses":{"200":{"description":"OK — paginated list of experiments returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentListResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}}}
```

## Create an Experiment

> Creates a new Experiment in the specified project workspace. Requires \`environment\_id\`.\
> The parent must exist in that environment (\`404\` if missing). \`parent.type\` \`CONFIG\`\
> returns \`404\` in v1. Duplicate \`name\` returns \`409\`. Do not send \`assignmentSource\`\
> (\`400\` if present). The server infers or creates the cloud assignment source for the\
> project and \`parent.type\`.<br>

```json
{"openapi":"3.0.3","info":{"title":"Harness Feature Management & Experimentation API","version":"4.0.0"},"tags":[{"name":"Experiments","description":"Manage workspace-scoped Experiments."}],"servers":[{"url":"https://app.harness.io/fme/api","description":"Harness SaaS (production)"},{"url":"https://app3.harness.io/fme/api","description":"Harness SaaS (US-3)"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"Harness Service Account Token (SAT) or Personal Access Token (PAT).\nGenerate tokens in Harness under Account Settings → Access Management.\n"}},"parameters":{"AccountId":{"name":"account_id","in":"query","required":true,"description":"Harness account identifier. Required on all endpoints.","schema":{"type":"string","pattern":"^[-_A-Za-z0-9]+$","maxLength":128}},"OrganizationIdentifier":{"name":"organization_identifier","in":"query","required":true,"description":"Harness organization identifier.","schema":{"type":"string","pattern":"^[-_A-Za-z0-9]+$","maxLength":128}},"ProjectIdentifier":{"name":"project_identifier","in":"query","required":true,"description":"Harness project identifier.","schema":{"type":"string","pattern":"^[-_A-Za-z0-9]+$","maxLength":128}},"RequiredEnvironmentIdParam":{"name":"environment_id","in":"query","required":true,"description":"Environment the experiment is assigned in.","schema":{"type":"string","format":"uuid","pattern":"^[-_A-Za-z0-9]+$","maxLength":128}}},"schemas":{"CreateExperimentRequest":{"type":"object","additionalProperties":false,"description":"Request body for creating a new Experiment. `parent.type` plus `parent.id` and/or\n`parent.name` are required. Do not send `assignmentSource` (`400` if present).\n","required":["parent","name","startAt","endAt","baselineTreatment","comparisonTreatments"],"properties":{"parent":{"$ref":"#/components/schemas/ExperimentParentReference"},"name":{"$ref":"#/components/schemas/ExperimentName"},"description":{"type":"string","maxLength":250,"description":"Human-readable description of this experiment."},"hypothesis":{"type":"string","maxLength":500,"description":"Hypothesis this experiment is testing."},"rule":{"type":"string","description":"Targeting-rule label to scope this experiment's results to (e.g. `\"default rule\"` or a\nspecific targeting rule name on the parent flag). Omit to use the experiment's default\nrule scope.\n"},"startAt":{"type":"string","format":"date-time","description":"ISO-8601 timestamp when the experiment starts."},"endAt":{"type":"string","format":"date-time","description":"ISO-8601 timestamp when the experiment ends."},"baselineTreatment":{"$ref":"#/components/schemas/TreatmentName"},"comparisonTreatments":{"type":"array","minItems":1,"description":"Comparison treatments (not including `baselineTreatment`).","items":{"$ref":"#/components/schemas/TreatmentName"}},"keyMetrics":{"type":"array","items":{"type":"string","format":"uuid"},"description":"Metric ids to set as key metrics. Omit for none."},"supportingMetrics":{"type":"array","items":{"type":"string","format":"uuid"},"description":"Metric ids to set as supporting metrics. Omit for none."},"tags":{"type":"array","description":"Initial tags to associate with the experiment. Uses the shared `TagReferenceInput`\n(`{ name }`); tags are returned as full `{ type, id, name }` refs on read.\n","items":{"$ref":"#/components/schemas/TagReferenceInput"}},"owners":{"type":"array","description":"Users or teams that own this experiment. Omit for none.","items":{"$ref":"#/components/schemas/ExperimentOwnerReference"}}}},"ExperimentParentReference":{"type":"object","additionalProperties":false,"description":"Parent to run the experiment on. `type` is required. Supply `id` and/or `name`.\n","required":["type"],"anyOf":[{"required":["id"]},{"required":["name"]}],"properties":{"type":{"$ref":"#/components/schemas/ExperimentParentType"},"id":{"type":"string","description":"Parent id. At least one of `id` or `name` is required."},"name":{"type":"string","description":"Parent name. At least one of `id` or `name` is required.","pattern":"^[A-Za-z][-_A-Za-z0-9]*$","maxLength":100}}},"ExperimentParentType":{"type":"string","enum":["FEATURE_FLAG","AI_CONFIG","CONFIG"],"description":"Kind of parent the experiment runs on. `CONFIG` and `AI_CONFIG` are separate types.\nWarehouse-native experiments are not a parent type; they use `assignmentSource` on\nthis same resource when implemented.\n"},"ExperimentName":{"type":"string","minLength":2,"maxLength":250,"pattern":"^[a-zA-Z][-_a-zA-Z0-9]+$","description":"Unique experiment name within the project."},"TreatmentName":{"type":"string","pattern":"^[a-zA-Z0-9][-_\\.a-zA-Z0-9]*$","description":"Treatment name. Must start with a letter or digit; remaining characters may be letters,\ndigits, hyphens, underscores, or periods.\n"},"TagReferenceInput":{"type":"object","description":"Tag input used in request bodies. Identified by `name`.","required":["name"],"properties":{"name":{"type":"string","description":"Tag name."}}},"ExperimentOwnerReference":{"type":"object","additionalProperties":false,"description":"Reference to an owner (user or team) of an experiment.","required":["type","id"],"properties":{"type":{"type":"string","enum":["USER","TEAM"],"description":"Owner kind."},"id":{"type":"string","description":"Identifier of the owner — the Harness user id (for `USER`) or team id (for `TEAM`)."}}},"ExperimentResponse":{"type":"object","description":"Experiment mutation response envelope. Returned by create and update: the resulting entity\ntogether with the OPA governance result. Experiments are not a governed entity type, so\n`governance` is always present with `status: NONE` and empty `details` (no policy\nevaluation occurs); the envelope is kept for response-shape consistency with other v4\nresources.\n","required":["entity","governance"],"properties":{"entity":{"$ref":"#/components/schemas/Experiment"},"governance":{"allOf":[{"$ref":"#/components/schemas/GovernanceResult"}],"description":"OPA governance result for the mutation. For experiments this is always `{ \"status\": \"NONE\",\n\"details\": [] }` — `EXPERIMENT` is not a governed entity type, so no policy evaluation\noccurs. Present (never `null`) for response-shape consistency with other v4 resources.\n"}}},"Experiment":{"type":"object","additionalProperties":false,"description":"A workspace-scoped Experiment.","required":["type","id","name","environment","trafficType","startAt","endAt","baselineTreatment","comparisonTreatments","keyMetrics","supportingMetrics","tags","owners","status","createdAt","modifiedAt"],"properties":{"type":{"type":"string","enum":["EXPERIMENT"],"description":"Resource type discriminator. Always `EXPERIMENT`."},"id":{"type":"string","format":"ulid","pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","description":"Unique system-assigned identifier for the experiment. Use this as the path parameter in subsequent requests."},"parent":{"allOf":[{"$ref":"#/components/schemas/ExperimentParent"}],"description":"Present for Feature Flag, AI Config, and Config. Omitted for warehouse-native\nexperiments when that revision ships (those use `assignmentSource` instead).\nA given experiment returns exactly one of `parent` or `assignmentSource`, never both.\nThis revision always returns `parent` and omits `assignmentSource`.\n"},"assignmentSource":{"allOf":[{"$ref":"#/components/schemas/AssignmentSourceReference"}],"description":"Omitted for Feature Flag, AI Config, and Config. Present when warehouse-native\nexperiments are implemented. Mutually exclusive with `parent` (see `parent`).\nNot returned in this revision.\n"},"name":{"type":"string","minLength":2,"maxLength":250,"pattern":"^[a-zA-Z][-_a-zA-Z0-9]+$","description":"Unique experiment name within the project."},"description":{"type":"string","nullable":true,"maxLength":250,"description":"Human-readable description of this experiment."},"hypothesis":{"type":"string","nullable":true,"maxLength":500,"description":"Hypothesis this experiment is testing."},"environment":{"allOf":[{"$ref":"#/components/schemas/NamedReference"}],"description":"Environment this experiment is assigned in."},"trafficType":{"allOf":[{"$ref":"#/components/schemas/NamedReference"}],"description":"Reference to the traffic type used to bucket users."},"startAt":{"type":"string","format":"date-time","description":"ISO-8601 timestamp when the experiment starts."},"endAt":{"type":"string","format":"date-time","description":"ISO-8601 timestamp when the experiment ends."},"baselineTreatment":{"allOf":[{"$ref":"#/components/schemas/TreatmentName"}],"description":"Baseline treatment name."},"comparisonTreatments":{"type":"array","minItems":1,"description":"Comparison treatments (not including `baselineTreatment`).","items":{"$ref":"#/components/schemas/TreatmentName"}},"keyMetrics":{"type":"array","description":"Key metrics on this experiment.","items":{"$ref":"#/components/schemas/NamedReference"}},"supportingMetrics":{"type":"array","description":"Supporting metrics on this experiment.","items":{"$ref":"#/components/schemas/NamedReference"}},"tags":{"type":"array","description":"Tags associated with this experiment (each `type` is `TAG`).","items":{"$ref":"#/components/schemas/ReferenceObject"}},"owners":{"type":"array","description":"Users or teams that own this experiment. Empty if none were set on create.","items":{"$ref":"#/components/schemas/ExperimentOwnerReference"}},"status":{"allOf":[{"$ref":"#/components/schemas/ExperimentStatus"}],"description":"Lifecycle status of the experiment. Get returns the experiment regardless of status (`ACTIVE`, `PAUSED`, `ARCHIVED`, or `COMPLETED`)."},"createdAt":{"type":"string","format":"date-time","description":"ISO-8601 timestamp when the experiment was created."},"modifiedAt":{"type":"string","format":"date-time","description":"ISO-8601 timestamp when the experiment was last modified."},"rule":{"type":"string","nullable":true,"description":"Targeting-rule label this experiment's results are scoped to (e.g. `\"default rule\"` or\na specific targeting rule name on the parent flag). `null` when the experiment was\ncreated without one, in which case results use the experiment's default rule scope.\n"}}},"ExperimentParent":{"type":"object","additionalProperties":false,"description":"Parent Feature Flag, AI Config, or Config (id and name).","required":["type","id","name"],"properties":{"type":{"$ref":"#/components/schemas/ExperimentParentType"},"id":{"type":"string","description":"System-assigned identifier of the parent. Feature Flag ids are UUIDs; Config and\nAI Config ids are the AppConfig metadata id.\n"},"name":{"type":"string","description":"Human-readable parent name.","pattern":"^[A-Za-z][-_A-Za-z0-9]*$","maxLength":100}}},"AssignmentSourceReference":{"type":"object","additionalProperties":false,"description":"Impression assignment source (`type` is `ASSIGNMENT_SOURCE`).","required":["type","id"],"properties":{"type":{"type":"string","enum":["ASSIGNMENT_SOURCE"],"description":"Resource type. Always `ASSIGNMENT_SOURCE`."},"id":{"type":"string","format":"ulid","pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","description":"System-assigned identifier of the assignment source."}}},"NamedReference":{"type":"object","description":"Generic reference to another resource, returned in responses. `id` is the stable\npublic identifier and `name` is the human-readable label.\n","required":["id","name"],"properties":{"id":{"type":"string","description":"Identifier of the referenced resource."},"name":{"type":"string","description":"Human-readable name of the referenced resource."}}},"ReferenceObject":{"type":"object","description":"Generic reference to another resource, returned in responses. `id` is the stable\npublic identifier, `type` disambiguates the referenced entity kind, and `name` is the\nhuman-readable label.\n","required":["id","type","name"],"properties":{"id":{"type":"string","description":"Identifier of the referenced resource."},"type":{"type":"string","description":"The kind of entity this reference points to (for example `TRAFFIC_TYPE`, `TAG`,\n`USER`, `GROUP`, `ROLLOUT_STATUS`, `FEATURE_FLAG`, `ENVIRONMENT`, or `SEGMENT`).\nEach resource API returns only the kinds relevant to that API.\n"},"name":{"type":"string","description":"Human-readable name of the referenced resource."}}},"ExperimentStatus":{"type":"string","enum":["ACTIVE","PAUSED","ARCHIVED","COMPLETED"],"description":"Experiment lifecycle status. New experiments are `ACTIVE`. `PATCH` can set `PAUSED`,\n`ARCHIVED`, or `COMPLETED`. `DELETE` removes the experiment permanently rather than\nsetting `status: ARCHIVED` (see the delete endpoint).\n"},"GovernanceResult":{"type":"object","description":"OPA policy evaluation result for the operation. `PASS`, `WARNING`, and `ERROR` mean\ngovernance ran; `NONE` means governance was not evaluated (for example off or not linked).\n","required":["status","details"],"properties":{"status":{"type":"string","enum":["PASS","WARNING","ERROR","NONE"],"description":"Overall governance result. `NONE` when governance did not run; otherwise the aggregate\nacross evaluated policies.\n"},"details":{"type":"array","description":"Per-policy results. Empty array when all policies pass cleanly or when status is `NONE`.","items":{"$ref":"#/components/schemas/GovernancePolicyDetail"}}}},"GovernancePolicyDetail":{"type":"object","description":"Per-policy OPA evaluation result.","required":["policyName","status","message"],"properties":{"policyName":{"type":"string","description":"Name of the OPA policy that was evaluated."},"status":{"type":"string","enum":["PASS","WARNING","ERROR"],"description":"Result of evaluating this specific policy."},"message":{"type":"string","description":"Human-readable explanation of the policy result."}}},"ErrorResponse":{"type":"object","description":"Standard error response following RFC 7807 Problem Details format (Harness ADR 57).\n","required":["type","status","title","errorType"],"properties":{"type":{"type":"string","format":"uri","description":"URI reference to documentation for this error type."},"status":{"type":"integer","description":"HTTP status code."},"title":{"type":"string","description":"Short human-readable summary of the problem."},"errorType":{"type":"string","description":"Machine-readable error type identifier."},"detail":{"type":"string","description":"Detailed human-readable explanation specific to this occurrence."},"instance":{"type":"string","description":"URI reference identifying the specific occurrence (usually the request path)."},"errors":{"type":"array","description":"List of specific sub-errors (useful for multi-field validation failures). Governance\npolicy failures are also surfaced here — each failing policy is reported as an entry\nwith `errorType: \"governancePolicy\"` — rather than in a separate top-level field.\n","items":{"$ref":"#/components/schemas/ErrorDetail"}}}},"ErrorDetail":{"type":"object","description":"Details about a single sub-error.","required":["errorType","title"],"properties":{"errorType":{"type":"string","description":"Machine-readable error type for this specific error."},"title":{"type":"string","description":"Short summary of this specific error."},"detail":{"type":"string","description":"Detailed explanation of this specific error."},"field":{"type":"string","description":"Name of the request field this error applies to, when the error is field-specific\n(for example a validation failure). Omitted for errors not tied to a single field.\n"}}}},"responses":{"BadRequest":{"description":"Bad Request — validation errors or invalid state transition.\n","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"Unauthorized":{"description":"Unauthorized — the request is missing a valid API key, or the key has expired.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"Forbidden":{"description":"Forbidden — the caller is authenticated but not permitted to perform this operation.\nReturned when the API can deny the operation without leaking whether a resource exists,\nsuch as create, or write operations where the caller can already read the resource. When\nreturning `403` would reveal resource existence, the API returns `404` instead.\n\nEnvironment-scoped mutations that require approval also return `403`.\n","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"NotFound":{"description":"Not Found — the requested resource does not exist. Also returned when the caller lacks\naccess to the resource (to avoid leaking resource existence).\n","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"Conflict":{"description":"Conflict — a resource with this identifier already exists, the operation conflicts with an\nopen change request, or the resource cannot be deleted/archived while dependents still\nexist. Discriminate with `errorType`: `resourceAlreadyExists`, `pendingChangeConflict`, or\n`hasDependents`. For `hasDependents`, `detail` is the archiver message when one is\navailable; otherwise `Resource has active dependents`.\n","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"TooManyRequests":{"description":"Too Many Requests — the caller has exceeded the rate limit for this endpoint.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"InternalServerError":{"description":"Internal Server Error — an unexpected error occurred while processing the request.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"paths":{"/v4/experiments":{"post":{"tags":["Experiments"],"operationId":"createExperiment","summary":"Create an Experiment","description":"Creates a new Experiment in the specified project workspace. Requires `environment_id`.\nThe parent must exist in that environment (`404` if missing). `parent.type` `CONFIG`\nreturns `404` in v1. Duplicate `name` returns `409`. Do not send `assignmentSource`\n(`400` if present). The server infers or creates the cloud assignment source for the\nproject and `parent.type`.\n","parameters":[{"$ref":"#/components/parameters/AccountId"},{"$ref":"#/components/parameters/OrganizationIdentifier"},{"$ref":"#/components/parameters/ProjectIdentifier"},{"$ref":"#/components/parameters/RequiredEnvironmentIdParam"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateExperimentRequest"}}}},"responses":{"201":{"description":"Created — the experiment was successfully created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}}}
```

## Get an Experiment

> Returns a single Experiment by its system-assigned identifier. Unlike list, this endpoint\
> returns the experiment regardless of lifecycle status (\`ACTIVE\`, \`PAUSED\`, \`ARCHIVED\`, or\
> \`COMPLETED\`). \`CONFIG\` and warehouse-native experiments return \`404\` in v1.\
> \`assignmentSource\` is omitted.<br>

```json
{"openapi":"3.0.3","info":{"title":"Harness Feature Management & Experimentation API","version":"4.0.0"},"tags":[{"name":"Experiments","description":"Manage workspace-scoped Experiments."}],"servers":[{"url":"https://app.harness.io/fme/api","description":"Harness SaaS (production)"},{"url":"https://app3.harness.io/fme/api","description":"Harness SaaS (US-3)"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"Harness Service Account Token (SAT) or Personal Access Token (PAT).\nGenerate tokens in Harness under Account Settings → Access Management.\n"}},"parameters":{"ExperimentIdPath":{"name":"experiment-id","in":"path","required":true,"description":"The system-assigned identifier (ULID) of the experiment.","schema":{"type":"string","format":"ulid","pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","maxLength":128}},"AccountId":{"name":"account_id","in":"query","required":true,"description":"Harness account identifier. Required on all endpoints.","schema":{"type":"string","pattern":"^[-_A-Za-z0-9]+$","maxLength":128}},"OrganizationIdentifier":{"name":"organization_identifier","in":"query","required":true,"description":"Harness organization identifier.","schema":{"type":"string","pattern":"^[-_A-Za-z0-9]+$","maxLength":128}},"ProjectIdentifier":{"name":"project_identifier","in":"query","required":true,"description":"Harness project identifier.","schema":{"type":"string","pattern":"^[-_A-Za-z0-9]+$","maxLength":128}}},"schemas":{"Experiment":{"type":"object","additionalProperties":false,"description":"A workspace-scoped Experiment.","required":["type","id","name","environment","trafficType","startAt","endAt","baselineTreatment","comparisonTreatments","keyMetrics","supportingMetrics","tags","owners","status","createdAt","modifiedAt"],"properties":{"type":{"type":"string","enum":["EXPERIMENT"],"description":"Resource type discriminator. Always `EXPERIMENT`."},"id":{"type":"string","format":"ulid","pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","description":"Unique system-assigned identifier for the experiment. Use this as the path parameter in subsequent requests."},"parent":{"allOf":[{"$ref":"#/components/schemas/ExperimentParent"}],"description":"Present for Feature Flag, AI Config, and Config. Omitted for warehouse-native\nexperiments when that revision ships (those use `assignmentSource` instead).\nA given experiment returns exactly one of `parent` or `assignmentSource`, never both.\nThis revision always returns `parent` and omits `assignmentSource`.\n"},"assignmentSource":{"allOf":[{"$ref":"#/components/schemas/AssignmentSourceReference"}],"description":"Omitted for Feature Flag, AI Config, and Config. Present when warehouse-native\nexperiments are implemented. Mutually exclusive with `parent` (see `parent`).\nNot returned in this revision.\n"},"name":{"type":"string","minLength":2,"maxLength":250,"pattern":"^[a-zA-Z][-_a-zA-Z0-9]+$","description":"Unique experiment name within the project."},"description":{"type":"string","nullable":true,"maxLength":250,"description":"Human-readable description of this experiment."},"hypothesis":{"type":"string","nullable":true,"maxLength":500,"description":"Hypothesis this experiment is testing."},"environment":{"allOf":[{"$ref":"#/components/schemas/NamedReference"}],"description":"Environment this experiment is assigned in."},"trafficType":{"allOf":[{"$ref":"#/components/schemas/NamedReference"}],"description":"Reference to the traffic type used to bucket users."},"startAt":{"type":"string","format":"date-time","description":"ISO-8601 timestamp when the experiment starts."},"endAt":{"type":"string","format":"date-time","description":"ISO-8601 timestamp when the experiment ends."},"baselineTreatment":{"allOf":[{"$ref":"#/components/schemas/TreatmentName"}],"description":"Baseline treatment name."},"comparisonTreatments":{"type":"array","minItems":1,"description":"Comparison treatments (not including `baselineTreatment`).","items":{"$ref":"#/components/schemas/TreatmentName"}},"keyMetrics":{"type":"array","description":"Key metrics on this experiment.","items":{"$ref":"#/components/schemas/NamedReference"}},"supportingMetrics":{"type":"array","description":"Supporting metrics on this experiment.","items":{"$ref":"#/components/schemas/NamedReference"}},"tags":{"type":"array","description":"Tags associated with this experiment (each `type` is `TAG`).","items":{"$ref":"#/components/schemas/ReferenceObject"}},"owners":{"type":"array","description":"Users or teams that own this experiment. Empty if none were set on create.","items":{"$ref":"#/components/schemas/ExperimentOwnerReference"}},"status":{"allOf":[{"$ref":"#/components/schemas/ExperimentStatus"}],"description":"Lifecycle status of the experiment. Get returns the experiment regardless of status (`ACTIVE`, `PAUSED`, `ARCHIVED`, or `COMPLETED`)."},"createdAt":{"type":"string","format":"date-time","description":"ISO-8601 timestamp when the experiment was created."},"modifiedAt":{"type":"string","format":"date-time","description":"ISO-8601 timestamp when the experiment was last modified."},"rule":{"type":"string","nullable":true,"description":"Targeting-rule label this experiment's results are scoped to (e.g. `\"default rule\"` or\na specific targeting rule name on the parent flag). `null` when the experiment was\ncreated without one, in which case results use the experiment's default rule scope.\n"}}},"ExperimentParent":{"type":"object","additionalProperties":false,"description":"Parent Feature Flag, AI Config, or Config (id and name).","required":["type","id","name"],"properties":{"type":{"$ref":"#/components/schemas/ExperimentParentType"},"id":{"type":"string","description":"System-assigned identifier of the parent. Feature Flag ids are UUIDs; Config and\nAI Config ids are the AppConfig metadata id.\n"},"name":{"type":"string","description":"Human-readable parent name.","pattern":"^[A-Za-z][-_A-Za-z0-9]*$","maxLength":100}}},"ExperimentParentType":{"type":"string","enum":["FEATURE_FLAG","AI_CONFIG","CONFIG"],"description":"Kind of parent the experiment runs on. `CONFIG` and `AI_CONFIG` are separate types.\nWarehouse-native experiments are not a parent type; they use `assignmentSource` on\nthis same resource when implemented.\n"},"AssignmentSourceReference":{"type":"object","additionalProperties":false,"description":"Impression assignment source (`type` is `ASSIGNMENT_SOURCE`).","required":["type","id"],"properties":{"type":{"type":"string","enum":["ASSIGNMENT_SOURCE"],"description":"Resource type. Always `ASSIGNMENT_SOURCE`."},"id":{"type":"string","format":"ulid","pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","description":"System-assigned identifier of the assignment source."}}},"NamedReference":{"type":"object","description":"Generic reference to another resource, returned in responses. `id` is the stable\npublic identifier and `name` is the human-readable label.\n","required":["id","name"],"properties":{"id":{"type":"string","description":"Identifier of the referenced resource."},"name":{"type":"string","description":"Human-readable name of the referenced resource."}}},"TreatmentName":{"type":"string","pattern":"^[a-zA-Z0-9][-_\\.a-zA-Z0-9]*$","description":"Treatment name. Must start with a letter or digit; remaining characters may be letters,\ndigits, hyphens, underscores, or periods.\n"},"ReferenceObject":{"type":"object","description":"Generic reference to another resource, returned in responses. `id` is the stable\npublic identifier, `type` disambiguates the referenced entity kind, and `name` is the\nhuman-readable label.\n","required":["id","type","name"],"properties":{"id":{"type":"string","description":"Identifier of the referenced resource."},"type":{"type":"string","description":"The kind of entity this reference points to (for example `TRAFFIC_TYPE`, `TAG`,\n`USER`, `GROUP`, `ROLLOUT_STATUS`, `FEATURE_FLAG`, `ENVIRONMENT`, or `SEGMENT`).\nEach resource API returns only the kinds relevant to that API.\n"},"name":{"type":"string","description":"Human-readable name of the referenced resource."}}},"ExperimentOwnerReference":{"type":"object","additionalProperties":false,"description":"Reference to an owner (user or team) of an experiment.","required":["type","id"],"properties":{"type":{"type":"string","enum":["USER","TEAM"],"description":"Owner kind."},"id":{"type":"string","description":"Identifier of the owner — the Harness user id (for `USER`) or team id (for `TEAM`)."}}},"ExperimentStatus":{"type":"string","enum":["ACTIVE","PAUSED","ARCHIVED","COMPLETED"],"description":"Experiment lifecycle status. New experiments are `ACTIVE`. `PATCH` can set `PAUSED`,\n`ARCHIVED`, or `COMPLETED`. `DELETE` removes the experiment permanently rather than\nsetting `status: ARCHIVED` (see the delete endpoint).\n"},"ErrorResponse":{"type":"object","description":"Standard error response following RFC 7807 Problem Details format (Harness ADR 57).\n","required":["type","status","title","errorType"],"properties":{"type":{"type":"string","format":"uri","description":"URI reference to documentation for this error type."},"status":{"type":"integer","description":"HTTP status code."},"title":{"type":"string","description":"Short human-readable summary of the problem."},"errorType":{"type":"string","description":"Machine-readable error type identifier."},"detail":{"type":"string","description":"Detailed human-readable explanation specific to this occurrence."},"instance":{"type":"string","description":"URI reference identifying the specific occurrence (usually the request path)."},"errors":{"type":"array","description":"List of specific sub-errors (useful for multi-field validation failures). Governance\npolicy failures are also surfaced here — each failing policy is reported as an entry\nwith `errorType: \"governancePolicy\"` — rather than in a separate top-level field.\n","items":{"$ref":"#/components/schemas/ErrorDetail"}}}},"ErrorDetail":{"type":"object","description":"Details about a single sub-error.","required":["errorType","title"],"properties":{"errorType":{"type":"string","description":"Machine-readable error type for this specific error."},"title":{"type":"string","description":"Short summary of this specific error."},"detail":{"type":"string","description":"Detailed explanation of this specific error."},"field":{"type":"string","description":"Name of the request field this error applies to, when the error is field-specific\n(for example a validation failure). Omitted for errors not tied to a single field.\n"}}}},"responses":{"BadRequest":{"description":"Bad Request — validation errors or invalid state transition.\n","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"Unauthorized":{"description":"Unauthorized — the request is missing a valid API key, or the key has expired.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"NotFound":{"description":"Not Found — the requested resource does not exist. Also returned when the caller lacks\naccess to the resource (to avoid leaking resource existence).\n","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"TooManyRequests":{"description":"Too Many Requests — the caller has exceeded the rate limit for this endpoint.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"InternalServerError":{"description":"Internal Server Error — an unexpected error occurred while processing the request.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"paths":{"/v4/experiments/{experiment-id}":{"get":{"tags":["Experiments"],"operationId":"getExperiment","summary":"Get an Experiment","description":"Returns a single Experiment by its system-assigned identifier. Unlike list, this endpoint\nreturns the experiment regardless of lifecycle status (`ACTIVE`, `PAUSED`, `ARCHIVED`, or\n`COMPLETED`). `CONFIG` and warehouse-native experiments return `404` in v1.\n`assignmentSource` is omitted.\n","parameters":[{"$ref":"#/components/parameters/ExperimentIdPath"},{"$ref":"#/components/parameters/AccountId"},{"$ref":"#/components/parameters/OrganizationIdentifier"},{"$ref":"#/components/parameters/ProjectIdentifier"}],"responses":{"200":{"description":"OK — experiment returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Experiment"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}}}
```

## Delete an Experiment

> Permanently deletes an Experiment. This is a hard delete — the experiment is removed, is\
> not recoverable, and afterward a \`GET\` by id returns \`404\` and it no longer appears in\
> \`LIST\`. It does not set \`status: ARCHIVED\`. The parent Feature Flag, AI Config, or Config\
> is not deleted. \`CONFIG\` and warehouse-native experiments return \`404\` in v1.<br>

```json
{"openapi":"3.0.3","info":{"title":"Harness Feature Management & Experimentation API","version":"4.0.0"},"tags":[{"name":"Experiments","description":"Manage workspace-scoped Experiments."}],"servers":[{"url":"https://app.harness.io/fme/api","description":"Harness SaaS (production)"},{"url":"https://app3.harness.io/fme/api","description":"Harness SaaS (US-3)"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"Harness Service Account Token (SAT) or Personal Access Token (PAT).\nGenerate tokens in Harness under Account Settings → Access Management.\n"}},"parameters":{"ExperimentIdPath":{"name":"experiment-id","in":"path","required":true,"description":"The system-assigned identifier (ULID) of the experiment.","schema":{"type":"string","format":"ulid","pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","maxLength":128}},"AccountId":{"name":"account_id","in":"query","required":true,"description":"Harness account identifier. Required on all endpoints.","schema":{"type":"string","pattern":"^[-_A-Za-z0-9]+$","maxLength":128}},"OrganizationIdentifier":{"name":"organization_identifier","in":"query","required":true,"description":"Harness organization identifier.","schema":{"type":"string","pattern":"^[-_A-Za-z0-9]+$","maxLength":128}},"ProjectIdentifier":{"name":"project_identifier","in":"query","required":true,"description":"Harness project identifier.","schema":{"type":"string","pattern":"^[-_A-Za-z0-9]+$","maxLength":128}}},"schemas":{"DeleteResponse":{"type":"object","description":"Response envelope for delete operations. Contains only the OPA governance result — no\nentity is returned. Shared by all FME resources so delete responses are consistent.\n","required":["governance"],"properties":{"governance":{"allOf":[{"$ref":"#/components/schemas/GovernanceResult"}],"description":"OPA governance result for the delete operation."}}},"GovernanceResult":{"type":"object","description":"OPA policy evaluation result for the operation. `PASS`, `WARNING`, and `ERROR` mean\ngovernance ran; `NONE` means governance was not evaluated (for example off or not linked).\n","required":["status","details"],"properties":{"status":{"type":"string","enum":["PASS","WARNING","ERROR","NONE"],"description":"Overall governance result. `NONE` when governance did not run; otherwise the aggregate\nacross evaluated policies.\n"},"details":{"type":"array","description":"Per-policy results. Empty array when all policies pass cleanly or when status is `NONE`.","items":{"$ref":"#/components/schemas/GovernancePolicyDetail"}}}},"GovernancePolicyDetail":{"type":"object","description":"Per-policy OPA evaluation result.","required":["policyName","status","message"],"properties":{"policyName":{"type":"string","description":"Name of the OPA policy that was evaluated."},"status":{"type":"string","enum":["PASS","WARNING","ERROR"],"description":"Result of evaluating this specific policy."},"message":{"type":"string","description":"Human-readable explanation of the policy result."}}},"ErrorResponse":{"type":"object","description":"Standard error response following RFC 7807 Problem Details format (Harness ADR 57).\n","required":["type","status","title","errorType"],"properties":{"type":{"type":"string","format":"uri","description":"URI reference to documentation for this error type."},"status":{"type":"integer","description":"HTTP status code."},"title":{"type":"string","description":"Short human-readable summary of the problem."},"errorType":{"type":"string","description":"Machine-readable error type identifier."},"detail":{"type":"string","description":"Detailed human-readable explanation specific to this occurrence."},"instance":{"type":"string","description":"URI reference identifying the specific occurrence (usually the request path)."},"errors":{"type":"array","description":"List of specific sub-errors (useful for multi-field validation failures). Governance\npolicy failures are also surfaced here — each failing policy is reported as an entry\nwith `errorType: \"governancePolicy\"` — rather than in a separate top-level field.\n","items":{"$ref":"#/components/schemas/ErrorDetail"}}}},"ErrorDetail":{"type":"object","description":"Details about a single sub-error.","required":["errorType","title"],"properties":{"errorType":{"type":"string","description":"Machine-readable error type for this specific error."},"title":{"type":"string","description":"Short summary of this specific error."},"detail":{"type":"string","description":"Detailed explanation of this specific error."},"field":{"type":"string","description":"Name of the request field this error applies to, when the error is field-specific\n(for example a validation failure). Omitted for errors not tied to a single field.\n"}}}},"responses":{"BadRequest":{"description":"Bad Request — validation errors or invalid state transition.\n","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"Unauthorized":{"description":"Unauthorized — the request is missing a valid API key, or the key has expired.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"Forbidden":{"description":"Forbidden — the caller is authenticated but not permitted to perform this operation.\nReturned when the API can deny the operation without leaking whether a resource exists,\nsuch as create, or write operations where the caller can already read the resource. When\nreturning `403` would reveal resource existence, the API returns `404` instead.\n\nEnvironment-scoped mutations that require approval also return `403`.\n","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"NotFound":{"description":"Not Found — the requested resource does not exist. Also returned when the caller lacks\naccess to the resource (to avoid leaking resource existence).\n","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"TooManyRequests":{"description":"Too Many Requests — the caller has exceeded the rate limit for this endpoint.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"InternalServerError":{"description":"Internal Server Error — an unexpected error occurred while processing the request.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"paths":{"/v4/experiments/{experiment-id}":{"delete":{"tags":["Experiments"],"operationId":"deleteExperiment","summary":"Delete an Experiment","description":"Permanently deletes an Experiment. This is a hard delete — the experiment is removed, is\nnot recoverable, and afterward a `GET` by id returns `404` and it no longer appears in\n`LIST`. It does not set `status: ARCHIVED`. The parent Feature Flag, AI Config, or Config\nis not deleted. `CONFIG` and warehouse-native experiments return `404` in v1.\n","parameters":[{"$ref":"#/components/parameters/ExperimentIdPath"},{"$ref":"#/components/parameters/AccountId"},{"$ref":"#/components/parameters/OrganizationIdentifier"},{"$ref":"#/components/parameters/ProjectIdentifier"}],"responses":{"200":{"description":"OK — experiment deleted. Returns the governance result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}}}
```

## Update an Experiment (partial)

> Partially updates an Experiment using JSON Merge Patch (RFC 7396,\
> \`Content-Type: application/merge-patch+json\`). Fields omitted from the body are left\
> unchanged. JSON \`null\` (or \`\[]\` for arrays) clears \`description\`, \`hypothesis\`,\
> \`keyMetrics\`, \`supportingMetrics\`, and \`tags\`. \`name\`, \`startAt\`, \`endAt\`, \`baselineTreatment\`,\
> \`comparisonTreatments\`, and \`status\` cannot be cleared: omit the field to\
> leave it unchanged; JSON \`null\` (or \`\[]\` for \`comparisonTreatments\`) returns \`400\`.\
> Parent and environment cannot be changed. Renaming to a name already used in the\
> project returns \`409\`. \`CONFIG\` and warehouse-native experiments return \`404\` in v1.\
> \
> \*\*Updatable fields:\*\* \`name\`, \`description\`, \`hypothesis\`, \`rule\`, \`startAt\`, \`endAt\`,\
> \`baselineTreatment\`, \`comparisonTreatments\`, \`keyMetrics\`,\
> \`supportingMetrics\`, \`tags\`, \`owners\`, \`status\`.<br>

```json
{"openapi":"3.0.3","info":{"title":"Harness Feature Management & Experimentation API","version":"4.0.0"},"tags":[{"name":"Experiments","description":"Manage workspace-scoped Experiments."}],"servers":[{"url":"https://app.harness.io/fme/api","description":"Harness SaaS (production)"},{"url":"https://app3.harness.io/fme/api","description":"Harness SaaS (US-3)"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"Harness Service Account Token (SAT) or Personal Access Token (PAT).\nGenerate tokens in Harness under Account Settings → Access Management.\n"}},"parameters":{"ExperimentIdPath":{"name":"experiment-id","in":"path","required":true,"description":"The system-assigned identifier (ULID) of the experiment.","schema":{"type":"string","format":"ulid","pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","maxLength":128}},"AccountId":{"name":"account_id","in":"query","required":true,"description":"Harness account identifier. Required on all endpoints.","schema":{"type":"string","pattern":"^[-_A-Za-z0-9]+$","maxLength":128}},"OrganizationIdentifier":{"name":"organization_identifier","in":"query","required":true,"description":"Harness organization identifier.","schema":{"type":"string","pattern":"^[-_A-Za-z0-9]+$","maxLength":128}},"ProjectIdentifier":{"name":"project_identifier","in":"query","required":true,"description":"Harness project identifier.","schema":{"type":"string","pattern":"^[-_A-Za-z0-9]+$","maxLength":128}}},"schemas":{"UpdateExperimentRequest":{"type":"object","additionalProperties":false,"description":"JSON Merge Patch body (RFC 7396) for updating an Experiment. All fields are optional.\nOmit a field to leave it unchanged. JSON `null` (or `[]` for arrays) clears\n`description`, `hypothesis`, `rule`, `keyMetrics`, `supportingMetrics`, `tags`, and `owners`. `name`,\n`startAt`, `endAt`, `baselineTreatment`, `comparisonTreatments`, and `status` cannot be\ncleared: omit to keep; JSON `null` (or `[]` for `comparisonTreatments`) returns `400`.\nParent and environment cannot be changed.\n","properties":{"name":{"type":"string","minLength":2,"maxLength":250,"pattern":"^[a-zA-Z][-_a-zA-Z0-9]+$","description":"Updated name. `null` is not allowed."},"description":{"type":"string","nullable":true,"maxLength":250,"description":"Updated description. `null` clears it."},"hypothesis":{"type":"string","nullable":true,"maxLength":500,"description":"Updated hypothesis. `null` clears it."},"rule":{"type":"string","nullable":true,"description":"Updated targeting-rule label. `null` clears it, reverting to the experiment's default\nrule scope.\n"},"startAt":{"type":"string","format":"date-time","description":"Updated start time. `null` is not allowed."},"endAt":{"type":"string","format":"date-time","description":"Updated end time. `null` is not allowed."},"baselineTreatment":{"allOf":[{"$ref":"#/components/schemas/TreatmentName"}],"description":"Updated baseline treatment. Omit to keep; JSON `null` returns `400`."},"comparisonTreatments":{"type":"array","minItems":1,"description":"Replacement comparison treatments (full replacement; not including `baselineTreatment`).\nAt least one. `null` or `[]` returns `400`.\n","items":{"$ref":"#/components/schemas/TreatmentName"}},"keyMetrics":{"type":"array","nullable":true,"items":{"type":"string","format":"uuid"},"description":"Replacement key metric ids. `null` or `[]` clears the list."},"supportingMetrics":{"type":"array","nullable":true,"items":{"type":"string","format":"uuid"},"description":"Replacement supporting metric ids. `null` or `[]` clears the list."},"tags":{"type":"array","nullable":true,"description":"Replacement tag list (full replacement), using the shared `TagReferenceInput` (`{ name }`).\n`null` or `[]` clears all tags. Tags are returned as full `{ type, id, name }` refs on read.\n","items":{"$ref":"#/components/schemas/TagReferenceInput"}},"owners":{"type":"array","nullable":true,"description":"Replacement owner list (full replacement; not incremental). `null` or `[]` clears all\nowners. Omit to leave unchanged.\n","items":{"$ref":"#/components/schemas/ExperimentOwnerReference"}},"status":{"allOf":[{"$ref":"#/components/schemas/ExperimentStatus"}],"description":"Updated lifecycle status. Omit to keep; JSON `null` returns `400`. `ARCHIVED` is a\nstatus on this resource; it is not a substitute for `DELETE`.\n"}}},"TreatmentName":{"type":"string","pattern":"^[a-zA-Z0-9][-_\\.a-zA-Z0-9]*$","description":"Treatment name. Must start with a letter or digit; remaining characters may be letters,\ndigits, hyphens, underscores, or periods.\n"},"TagReferenceInput":{"type":"object","description":"Tag input used in request bodies. Identified by `name`.","required":["name"],"properties":{"name":{"type":"string","description":"Tag name."}}},"ExperimentOwnerReference":{"type":"object","additionalProperties":false,"description":"Reference to an owner (user or team) of an experiment.","required":["type","id"],"properties":{"type":{"type":"string","enum":["USER","TEAM"],"description":"Owner kind."},"id":{"type":"string","description":"Identifier of the owner — the Harness user id (for `USER`) or team id (for `TEAM`)."}}},"ExperimentStatus":{"type":"string","enum":["ACTIVE","PAUSED","ARCHIVED","COMPLETED"],"description":"Experiment lifecycle status. New experiments are `ACTIVE`. `PATCH` can set `PAUSED`,\n`ARCHIVED`, or `COMPLETED`. `DELETE` removes the experiment permanently rather than\nsetting `status: ARCHIVED` (see the delete endpoint).\n"},"ExperimentResponse":{"type":"object","description":"Experiment mutation response envelope. Returned by create and update: the resulting entity\ntogether with the OPA governance result. Experiments are not a governed entity type, so\n`governance` is always present with `status: NONE` and empty `details` (no policy\nevaluation occurs); the envelope is kept for response-shape consistency with other v4\nresources.\n","required":["entity","governance"],"properties":{"entity":{"$ref":"#/components/schemas/Experiment"},"governance":{"allOf":[{"$ref":"#/components/schemas/GovernanceResult"}],"description":"OPA governance result for the mutation. For experiments this is always `{ \"status\": \"NONE\",\n\"details\": [] }` — `EXPERIMENT` is not a governed entity type, so no policy evaluation\noccurs. Present (never `null`) for response-shape consistency with other v4 resources.\n"}}},"Experiment":{"type":"object","additionalProperties":false,"description":"A workspace-scoped Experiment.","required":["type","id","name","environment","trafficType","startAt","endAt","baselineTreatment","comparisonTreatments","keyMetrics","supportingMetrics","tags","owners","status","createdAt","modifiedAt"],"properties":{"type":{"type":"string","enum":["EXPERIMENT"],"description":"Resource type discriminator. Always `EXPERIMENT`."},"id":{"type":"string","format":"ulid","pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","description":"Unique system-assigned identifier for the experiment. Use this as the path parameter in subsequent requests."},"parent":{"allOf":[{"$ref":"#/components/schemas/ExperimentParent"}],"description":"Present for Feature Flag, AI Config, and Config. Omitted for warehouse-native\nexperiments when that revision ships (those use `assignmentSource` instead).\nA given experiment returns exactly one of `parent` or `assignmentSource`, never both.\nThis revision always returns `parent` and omits `assignmentSource`.\n"},"assignmentSource":{"allOf":[{"$ref":"#/components/schemas/AssignmentSourceReference"}],"description":"Omitted for Feature Flag, AI Config, and Config. Present when warehouse-native\nexperiments are implemented. Mutually exclusive with `parent` (see `parent`).\nNot returned in this revision.\n"},"name":{"type":"string","minLength":2,"maxLength":250,"pattern":"^[a-zA-Z][-_a-zA-Z0-9]+$","description":"Unique experiment name within the project."},"description":{"type":"string","nullable":true,"maxLength":250,"description":"Human-readable description of this experiment."},"hypothesis":{"type":"string","nullable":true,"maxLength":500,"description":"Hypothesis this experiment is testing."},"environment":{"allOf":[{"$ref":"#/components/schemas/NamedReference"}],"description":"Environment this experiment is assigned in."},"trafficType":{"allOf":[{"$ref":"#/components/schemas/NamedReference"}],"description":"Reference to the traffic type used to bucket users."},"startAt":{"type":"string","format":"date-time","description":"ISO-8601 timestamp when the experiment starts."},"endAt":{"type":"string","format":"date-time","description":"ISO-8601 timestamp when the experiment ends."},"baselineTreatment":{"allOf":[{"$ref":"#/components/schemas/TreatmentName"}],"description":"Baseline treatment name."},"comparisonTreatments":{"type":"array","minItems":1,"description":"Comparison treatments (not including `baselineTreatment`).","items":{"$ref":"#/components/schemas/TreatmentName"}},"keyMetrics":{"type":"array","description":"Key metrics on this experiment.","items":{"$ref":"#/components/schemas/NamedReference"}},"supportingMetrics":{"type":"array","description":"Supporting metrics on this experiment.","items":{"$ref":"#/components/schemas/NamedReference"}},"tags":{"type":"array","description":"Tags associated with this experiment (each `type` is `TAG`).","items":{"$ref":"#/components/schemas/ReferenceObject"}},"owners":{"type":"array","description":"Users or teams that own this experiment. Empty if none were set on create.","items":{"$ref":"#/components/schemas/ExperimentOwnerReference"}},"status":{"allOf":[{"$ref":"#/components/schemas/ExperimentStatus"}],"description":"Lifecycle status of the experiment. Get returns the experiment regardless of status (`ACTIVE`, `PAUSED`, `ARCHIVED`, or `COMPLETED`)."},"createdAt":{"type":"string","format":"date-time","description":"ISO-8601 timestamp when the experiment was created."},"modifiedAt":{"type":"string","format":"date-time","description":"ISO-8601 timestamp when the experiment was last modified."},"rule":{"type":"string","nullable":true,"description":"Targeting-rule label this experiment's results are scoped to (e.g. `\"default rule\"` or\na specific targeting rule name on the parent flag). `null` when the experiment was\ncreated without one, in which case results use the experiment's default rule scope.\n"}}},"ExperimentParent":{"type":"object","additionalProperties":false,"description":"Parent Feature Flag, AI Config, or Config (id and name).","required":["type","id","name"],"properties":{"type":{"$ref":"#/components/schemas/ExperimentParentType"},"id":{"type":"string","description":"System-assigned identifier of the parent. Feature Flag ids are UUIDs; Config and\nAI Config ids are the AppConfig metadata id.\n"},"name":{"type":"string","description":"Human-readable parent name.","pattern":"^[A-Za-z][-_A-Za-z0-9]*$","maxLength":100}}},"ExperimentParentType":{"type":"string","enum":["FEATURE_FLAG","AI_CONFIG","CONFIG"],"description":"Kind of parent the experiment runs on. `CONFIG` and `AI_CONFIG` are separate types.\nWarehouse-native experiments are not a parent type; they use `assignmentSource` on\nthis same resource when implemented.\n"},"AssignmentSourceReference":{"type":"object","additionalProperties":false,"description":"Impression assignment source (`type` is `ASSIGNMENT_SOURCE`).","required":["type","id"],"properties":{"type":{"type":"string","enum":["ASSIGNMENT_SOURCE"],"description":"Resource type. Always `ASSIGNMENT_SOURCE`."},"id":{"type":"string","format":"ulid","pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","description":"System-assigned identifier of the assignment source."}}},"NamedReference":{"type":"object","description":"Generic reference to another resource, returned in responses. `id` is the stable\npublic identifier and `name` is the human-readable label.\n","required":["id","name"],"properties":{"id":{"type":"string","description":"Identifier of the referenced resource."},"name":{"type":"string","description":"Human-readable name of the referenced resource."}}},"ReferenceObject":{"type":"object","description":"Generic reference to another resource, returned in responses. `id` is the stable\npublic identifier, `type` disambiguates the referenced entity kind, and `name` is the\nhuman-readable label.\n","required":["id","type","name"],"properties":{"id":{"type":"string","description":"Identifier of the referenced resource."},"type":{"type":"string","description":"The kind of entity this reference points to (for example `TRAFFIC_TYPE`, `TAG`,\n`USER`, `GROUP`, `ROLLOUT_STATUS`, `FEATURE_FLAG`, `ENVIRONMENT`, or `SEGMENT`).\nEach resource API returns only the kinds relevant to that API.\n"},"name":{"type":"string","description":"Human-readable name of the referenced resource."}}},"GovernanceResult":{"type":"object","description":"OPA policy evaluation result for the operation. `PASS`, `WARNING`, and `ERROR` mean\ngovernance ran; `NONE` means governance was not evaluated (for example off or not linked).\n","required":["status","details"],"properties":{"status":{"type":"string","enum":["PASS","WARNING","ERROR","NONE"],"description":"Overall governance result. `NONE` when governance did not run; otherwise the aggregate\nacross evaluated policies.\n"},"details":{"type":"array","description":"Per-policy results. Empty array when all policies pass cleanly or when status is `NONE`.","items":{"$ref":"#/components/schemas/GovernancePolicyDetail"}}}},"GovernancePolicyDetail":{"type":"object","description":"Per-policy OPA evaluation result.","required":["policyName","status","message"],"properties":{"policyName":{"type":"string","description":"Name of the OPA policy that was evaluated."},"status":{"type":"string","enum":["PASS","WARNING","ERROR"],"description":"Result of evaluating this specific policy."},"message":{"type":"string","description":"Human-readable explanation of the policy result."}}},"ErrorResponse":{"type":"object","description":"Standard error response following RFC 7807 Problem Details format (Harness ADR 57).\n","required":["type","status","title","errorType"],"properties":{"type":{"type":"string","format":"uri","description":"URI reference to documentation for this error type."},"status":{"type":"integer","description":"HTTP status code."},"title":{"type":"string","description":"Short human-readable summary of the problem."},"errorType":{"type":"string","description":"Machine-readable error type identifier."},"detail":{"type":"string","description":"Detailed human-readable explanation specific to this occurrence."},"instance":{"type":"string","description":"URI reference identifying the specific occurrence (usually the request path)."},"errors":{"type":"array","description":"List of specific sub-errors (useful for multi-field validation failures). Governance\npolicy failures are also surfaced here — each failing policy is reported as an entry\nwith `errorType: \"governancePolicy\"` — rather than in a separate top-level field.\n","items":{"$ref":"#/components/schemas/ErrorDetail"}}}},"ErrorDetail":{"type":"object","description":"Details about a single sub-error.","required":["errorType","title"],"properties":{"errorType":{"type":"string","description":"Machine-readable error type for this specific error."},"title":{"type":"string","description":"Short summary of this specific error."},"detail":{"type":"string","description":"Detailed explanation of this specific error."},"field":{"type":"string","description":"Name of the request field this error applies to, when the error is field-specific\n(for example a validation failure). Omitted for errors not tied to a single field.\n"}}}},"responses":{"BadRequest":{"description":"Bad Request — validation errors or invalid state transition.\n","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"Unauthorized":{"description":"Unauthorized — the request is missing a valid API key, or the key has expired.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"Forbidden":{"description":"Forbidden — the caller is authenticated but not permitted to perform this operation.\nReturned when the API can deny the operation without leaking whether a resource exists,\nsuch as create, or write operations where the caller can already read the resource. When\nreturning `403` would reveal resource existence, the API returns `404` instead.\n\nEnvironment-scoped mutations that require approval also return `403`.\n","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"NotFound":{"description":"Not Found — the requested resource does not exist. Also returned when the caller lacks\naccess to the resource (to avoid leaking resource existence).\n","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"Conflict":{"description":"Conflict — a resource with this identifier already exists, the operation conflicts with an\nopen change request, or the resource cannot be deleted/archived while dependents still\nexist. Discriminate with `errorType`: `resourceAlreadyExists`, `pendingChangeConflict`, or\n`hasDependents`. For `hasDependents`, `detail` is the archiver message when one is\navailable; otherwise `Resource has active dependents`.\n","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"TooManyRequests":{"description":"Too Many Requests — the caller has exceeded the rate limit for this endpoint.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"InternalServerError":{"description":"Internal Server Error — an unexpected error occurred while processing the request.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"paths":{"/v4/experiments/{experiment-id}":{"patch":{"tags":["Experiments"],"operationId":"updateExperiment","summary":"Update an Experiment (partial)","description":"Partially updates an Experiment using JSON Merge Patch (RFC 7396,\n`Content-Type: application/merge-patch+json`). Fields omitted from the body are left\nunchanged. JSON `null` (or `[]` for arrays) clears `description`, `hypothesis`,\n`keyMetrics`, `supportingMetrics`, and `tags`. `name`, `startAt`, `endAt`, `baselineTreatment`,\n`comparisonTreatments`, and `status` cannot be cleared: omit the field to\nleave it unchanged; JSON `null` (or `[]` for `comparisonTreatments`) returns `400`.\nParent and environment cannot be changed. Renaming to a name already used in the\nproject returns `409`. `CONFIG` and warehouse-native experiments return `404` in v1.\n\n**Updatable fields:** `name`, `description`, `hypothesis`, `rule`, `startAt`, `endAt`,\n`baselineTreatment`, `comparisonTreatments`, `keyMetrics`,\n`supportingMetrics`, `tags`, `owners`, `status`.\n","parameters":[{"$ref":"#/components/parameters/ExperimentIdPath"},{"$ref":"#/components/parameters/AccountId"},{"$ref":"#/components/parameters/OrganizationIdentifier"},{"$ref":"#/components/parameters/ProjectIdentifier"}],"requestBody":{"required":true,"content":{"application/merge-patch+json":{"schema":{"$ref":"#/components/schemas/UpdateExperimentRequest"}}}},"responses":{"200":{"description":"OK — experiment updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}}}
```
