# Reset component variant

Removes any applied personalization or A/B/n test variant set up, such as copy, hide, or swap, from a component and restores it to its original state.

Endpoint: POST /api/v1/flows/{flowId}/variants/reset
Version: v2.0
Security: HTTPBearer

## Security:

  - `HTTPBearer` (unknown)
    http bearer JWT

## Path parameters:

  - `flowId` (string, required)
    The unique identifier of the A/B/n test or personalization that contains the variant to reset. To get this ID, you can use the [List flow definitions](#/operation/flows-list_flow_definitions_by_page) endpoint for the page and use the flow `ref` value.

## Header parameters:

  - `x-sc-job-id` (any)
    A unique identifier for the job, used to trace, audit, and revert actions performed by an AI agent through the Agent API.

## Request fields (application/json):

  - `language` (any)
    The language code for the page.
    Example: en

  - `page_version` (any)
    The version of the page to use, or null for the latest version.
    Example: 1

  - `page_id` (string, required)
    The unique identifier of the page containing the variant. To get this ID, use [List pages of a site](#operation/sites-get_all_pages_by_site).
    Example: 3f2504e0-4f89-11d3-9a0c-0305e82c3301

  - `component_id` (string, required)
    The unique identifier of the component with personalization or A/B test variant to reset. To get this ID, use [List components of a page](#operation/pages-get_all_components_by_page).
    Example: 429e3b45-277a-4c7f-adeb-4eb8b295d9ab

  - `variant_id` (any)
    The unique identifier of the personalization or A/B testing variant to reset. To get this ID, you can use the [List flow definitions](https://api-docs.sitecore.com/sai/agent-api/flow-definitions/flows-list_flow_definitions_by_page) endpoint. Use the `transpiledVariants[].ref`, or `variants[].ref` when available.
If you provide this value, the specified personalization or A/B test variant is reset. For personalization only, if you omit this value, the component on the default page variant is reset.
    Example: 429e3b45277a4c7fadeb4eb8b295d9ab_9d6f8492a3234b96b4c89878a8a1a7ab

## Response 201:

  - `201` (unknown)
    Successful response

## Response 201 fields (application/json):

  - `pageId` (string)
    The unique identifier of the page where the component was reset
    Example: 3f2504e0-4f89-11d3-9a0c-0305e82c3301

  - `componentId` (string)
    The unique identifier of the component that was reset
    Example: 86a03271-dff4-470a-92bd-b68c67de2e25

  - `language` (string)
    The language of the page.
    Example: en

## Response 422:

  - `422` (unknown)
    Unprocessable entity

## Response 422 fields (application/json):

  - `detail` (array)

  - `detail.loc` (array)
    The location of the error in the request.

  - `detail.msg` (string)
    The error message.

  - `detail.type` (string)
    The type of error.

  - `detail.input` (any)
    The input that caused the error.

  - `detail.ctx` (object)
    The context in which the error occurred.

