---
title: "Update pentest scope"
method: PATCH
path: "/v1/pentests/{pentest_slug}/scope/"
tags: ["pentests"]
---

# Update pentest scope

`PATCH /v1/pentests/{pentest_slug}/scope/`

## Request

- Base URL: `https://api.ethiack.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.ethiack.com/v1/pentests/{pentest_slug}/scope/`
- Auth: none declared

Bulk-move assets between in- and out-of-scope.

Restricted to organization and partner integrators.

Args:
    pentest_id (int): The parent pentest, resolved and access-checked
        by the router's gate.
    body (PatchPentestScopeRequest): Assets to move in or out of
        scope.
    db (AsyncSession): Request-scoped database session.
    context (ActiveContext): Resolved caller identity and scope.

Returns:
    SuccessResponse: The pre-rename update envelope, which names
        no id -- the PATCH edits the collection, not a row.

## Path parameters

- `pentest_slug` string, required

## Request body

- PatchPentestScopeRequest: Request body for bulk scope updates. Moves assets between in-scope and out-of-scope. An asset ID must not appear in both sets. Attributes: in_scope (set[int]): Asset IDs to mark as in-scope. out_of_scope (set[int]): Asset IDs to mark as out-of-scope.
  - `in_scope` integer[]: Asset IDs to mark as in-scope.
  - `out_of_scope` integer[]: Asset IDs to mark as out-of-scope.

## Response `200`

Successful Response

- SuccessResponse: Standard response for successful write operations. Matches the ``SuccessResponse`` contract from api-3. Attributes: code (int): HTTP status code. description (str): Human-readable result description. id (int | str | None): Created/affected resource ID. success (bool): Always ``True`` for successful responses.
  - `code` integer, required
  - `description` string, required
  - `id` union
    - integer
    - string
  - `success` boolean

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/ethiack/apis/ethiack-api.md) - [All operations](https://skmtc.dev/ethiack/apis/ethiack-api/llms.txt) - [OpenAPI document](https://skmtc.dev/ethiack/apis/ethiack-api/revisions/4eaba89bfebf?raw)
