# Remove component on page

Removes a specific component from a page. Use this to clean up orphaned component references after deleting a datasource item.

Endpoint: DELETE /api/v1/pages/{pageId}/components/{componentId}
Version: v2.0
Security: HTTPBearer

## Security:

  - `HTTPBearer` (unknown)
    http bearer JWT

## Path parameters:

  - `pageId` (string, required)
    The unique identifier of the page. To get this ID, use [List pages of a site](#operation/sites-get_all_pages_by_site).

  - `componentId` (string, required)
    The unique identifier of the component. To get this ID, use the [List allowed components for a placeholder](#operation/pages-get_allowed_components_by_placeholder) endpoint.

## Query parameters:

  - `language` (any)
    The language of the component.

## 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.

## Response 200:

  - `200` (unknown)
    Successful response

## Response 200 fields (application/json):

  - `success` (boolean)
    Whether the component was successfully removed.
    Example: true

  - `removedComponentId` (string)
    The unique identifier of the removed component.
    Example: 86a03271-dff4-470a-92bd-b68c67de2e25

  - `affectedExperiments` (array)
    The A/B tests found on the removed component. `archived=True` only if this call successfully archived it.

  - `affectedExperiments.flowId` (string)
    The unique identifier of the A/B/n test.
    Example: 55b819c6-8b52-491a-8289-949a363473db

  - `affectedExperiments.name` (string)
    The A/B test's display name.
    Example: Article 1 - Promo AB Test

  - `affectedExperiments.pageId` (string)
    The unique identifier of the page the test's component lives on.

  - `affectedExperiments.componentId` (string)
    The unique instance ID of the component the test runs on.

  - `affectedExperiments.archived` (boolean)
    Whether the experiment was archived. `true` only if this call actually archived it.
    Example: true

  - `affectedExperiments.error` (any)
    The reason why archiving failed, when archived is `false`. Null when archived is `true`.
    Example: Error archiving flow definition: Flow definition not found

## 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.

