---
title: "Enable a continuous pentest"
method: POST
path: "/profiles/{profileId}/continuous-pentest/enable"
tags: ["Profiles", "Beta"]
---

# Enable a continuous pentest

`POST /profiles/{profileId}/continuous-pentest/enable`

## Request

- Base URL: `https://public.escape.tech/v3`
- URL: `https://public.escape.tech/v3/profiles/{profileId}/continuous-pentest/enable`
- Auth: API key in header `X-ESCAPE-API-KEY`

Turn a continuous pentest back on, optionally replacing the watched repositories. Each repository restarts at its current head. A schedule requires a cron. CI and MERGE do not.

## Path parameters

- `profileId` string, required: The AI Pentest profile ID

## Request body

- object: Input to turn a continuous pentest back on. A schedule requires a cron. CI and MERGE do not.
  - `repositories` object[]: Repositories to watch, each on a branch
    - `url` string, required: The repository URL
    - `branch` string, required: The branch to watch
  - `cron` string: Cron expression defining how often the repositories are reviewed
  - `initiator` 'APPLICATION_CREATION' | 'CI' | 'INVENTORY' | 'MANUAL' | 'MERGE' | 'SCHEDULED' | 'UNKNOWN': SCHEDULED plans a cron. CI and MERGE do not. Any other value is refused.
  - `startAt` string, date-time: When the schedule becomes active (ISO 8601). Defaults to now.

## Response `200`

OK

- object
  - `initiator` 'SCHEDULED' | 'CI' | 'MERGE', required: SCHEDULED plans a cron. CI and MERGE do not.
  - `disabledAt` string, date-time, nullable, required: Set when the continuous setup was turned off; null while it is on
  - `schedule` object, nullable, required: The timer of the setup
    - `cron` string, nullable, required: Recurring cron expression; null for CI or MERGE. Kept when the setup is disabled.
    - `startAt` string, required: When the schedule becomes active
    - `nextScheduledAt` string, nullable, required: Next planned run, when a job is scheduled
  - `repositories` object[], required: Repositories watched by the continuous pentest
    - `id` string, uuid, required: The continuous pentest repository link id
    - `branch` string, required: Branch watched for the diff
    - `lastCommit` string, nullable, required: Commit the next run diffs from; null when no baseline is known yet
    - `asset` object, required: The repository asset
      - `id` string, uuid, required: The repository asset id
      - `name` string, required: The repository asset name
  - `lastScanId` string, uuid, nullable, required: The id of the last continuous pentest run

## Other responses

- `400`: Bad Request
- `404`: Not found

---

[API](https://skmtc.dev/escape/apis/escape-public-api.md) - [All operations](https://skmtc.dev/escape/apis/escape-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/escape/apis/escape-public-api/revisions/2eab35df40c7?raw)
