---
title: "Update the partner's default pentest duration"
method: PUT
path: "/v1/settings/default-pentest-duration/"
tags: ["settings"]
---

# Update the partner's default pentest duration

`PUT /v1/settings/default-pentest-duration/`

## 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/settings/default-pentest-duration/`
- Auth: none declared

Set the default pentest duration for the caller's partner.

Restricted to integrators whose subscription has the
``integrators_events_duration_editable`` feature (a 402 otherwise); the
feature gate and the Cerbos ``update_pentest_duration`` write are
enforced by the service. The feature key keeps its pre-rename spelling
because it is a row in the feature catalogue that legacy apps read —
tracked in ethiack/phoenix#310.

Answers the write envelope, not the updated setting: a caller that
needs the stored value reads it back from the GET. ``id`` is omitted
(``response_model_exclude_none``) because the setting is a singleton
on the subscription and has none to name.

Args:
    body (UpdateDefaultPentestDurationRequest): New default duration.
    db (AsyncSession): Request-scoped database session.
    context (ActiveContext): Resolved caller identity and scope.
    partner_id (int): The integrator's resolved partner id.

Returns:
    SuccessResponse: Confirmation naming the duration now stored.

## Request body

- UpdateDefaultPentestDurationRequest: Request body for updating the default pentest duration. Attributes: default_pentest_duration_days (int): New default pentest duration in days. Must be at least 1. Also accepted as ``duration``. unit (str): Duration unit. Only ``days`` is accepted.
  - `default_pentest_duration_days` integer, required
  - `unit` string: Unit of the duration. Only `days` is accepted.

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