v1

latestOpenAPI 3.1.02026-07-261690320.7 KB

Create pentest draft

Create a new draft pentest assessment. The project will be created if it doesn't exist. You can either provide existing repository IDs or create a custom repository from a download URL.

post/pentests/assessments/createDraft

Request body

project_namestring required

The name of the pentest project. If the project doesn't exist, it will be created.

domainsstring[] required

An array of domain URLs to include in the pentest assessment. Cannot be empty.

custom_headersobject

A map of custom headers to include in the assessment. Must be of format {header_name: header_value, ...}

repository_idsinteger[]

An array of existing code repository IDs to include in the assessment. Required if 'repository_download_url' and 'repository_name' are not provided.

repository_download_urlstring

URL to download a custom code repository. Must be provided together with 'repository_name'. If provided, 'repository_ids' should not be provided.

repository_namestring

Name for the custom code repository. Must be provided together with 'repository_download_url'. If provided, 'repository_ids' should not be provided.

Example request

{
  "project_name": "My Security Project",
  "domains": [
    "https://example.com",
    "https://api.example.com"
  ],
  "repository_ids": [
    1,
    2,
    3
  ]
}

Response

The draft assessment has been successfully created

project_idinteger

The ID of the pentest project (created or existing)

draft_idstring

The unique identifier of the created draft assessment

Example response

{
  "project_id": 123,
  "draft_id": "550e8400-e29b-41d4-a716-446655440000"
}