> ## Documentation Index
> Fetch the complete documentation index at: https://projectdiscovery-feat-gsoc.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Scan

> Trigger a scan



## OpenAPI

````yaml post /v1/scans
openapi: 3.1.0
info:
  title: PDCP API
  version: '1.0'
  summary: ProjectDiscovery Cloud Platform
  description: >-
    For more details, checkout
    https://docs.projectdiscovery.io/api-reference/editor/scan
servers:
  - url: https://api.projectdiscovery.io
    description: Production
  - url: https://api.dev.projectdiscovery.io
    description: Development
  - url: http://localhost:8085
    description: Localhost
security:
  - X-API-Key: []
paths:
  /v1/scans:
    post:
      tags:
        - scans
      summary: Create Scan
      description: Trigger a scan
      operationId: post-v1-scans
      parameters:
        - schema:
            type: string
          in: header
          description: >-
            Retrieve the Team ID from:
            https://cloud.projectdiscovery.io/settings/team
          name: X-Team-Id
      requestBody:
        $ref: '#/components/requestBodies/TriggerUserScanRequest'
      responses:
        '200':
          $ref: '#/components/responses/TriggerUserScanResponse'
        '400':
          $ref: '#/components/responses/ErrorResponse'
        '401':
          $ref: '#/components/responses/ErrorResponse'
        '500':
          $ref: '#/components/responses/ErrorResponse'
        default:
          $ref: '#/components/responses/ErrorResponse'
      security:
        - X-API-Key: []
components:
  requestBodies:
    TriggerUserScanRequest:
      content:
        application/json:
          schema:
            type: object
            properties:
              targets:
                type: array
                items:
                  type: string
              templates:
                type: array
                items:
                  type: string
              assets:
                type: array
                items:
                  type: string
              private_templates:
                type: array
                items:
                  $ref: '#/components/schemas/PrivateTemplates'
              name:
                type: string
              recommended:
                type: boolean
              all:
                type: boolean
              alerting_config_ids:
                type: array
                items:
                  type: string
              scan_config_ids:
                type: array
                items:
                  type: string
              reporting_config_ids:
                type: array
                items:
                  type: string
              early_templates:
                type: array
                items:
                  type: string
              exclude_targets:
                type: array
                items:
                  type: string
              enumeration_ids:
                type: array
                items:
                  $ref: '#/components/schemas/EnumerationIds'
              schedule_only:
                type: boolean
              disable_global_alert_config:
                type: boolean
              disable_global_report_config:
                type: boolean
              disable_global_scan_config:
                type: boolean
              socks5_proxy:
                type: string
              agent_id:
                type: string
              agent_tags:
                type: array
                items:
                  type: string
              agent_networks:
                type: array
                items:
                  type: string
              agent_behavior:
                enum:
                  - distribute
                  - mirror
                default: distribute
              automatic_scan:
                type: boolean
              scan_all_assets:
                type: boolean
              exclusions:
                type: array
                items:
                  type: string
  responses:
    TriggerUserScanResponse:
      description: Example response
      content:
        application/json:
          schema:
            type: object
            required:
              - message
            properties:
              id:
                type: string
              message:
                type: string
              truncated-scan-targets:
                type: integer
        application/xml:
          schema:
            type: object
            properties:
              message:
                type: string
              id:
                type: string
        multipart/form-data:
          schema:
            type: object
            properties:
              message:
                type: string
              id:
                type: string
            required:
              - message
        text/html:
          schema:
            type: object
            properties:
              message:
                type: string
              id:
                type: string
            required:
              - message
    ErrorResponse:
      description: Example response
      content:
        application/json:
          schema:
            type: object
            required:
              - message
            properties:
              message:
                type: string
              kind:
                type: string
              code:
                type: string
              error:
                type: string
              error_id:
                type: string
              param:
                type: string
              status:
                type: integer
  schemas:
    PrivateTemplates:
      title: PrivateTemplates
      type: object
      properties:
        name:
          type: string
        contents:
          type: string
      required:
        - name
        - contents
    EnumerationIds:
      title: EnumerationIds
      type: object
      required:
        - id
      properties:
        id:
          type: string
  securitySchemes:
    X-API-Key:
      name: X-API-Key
      type: apiKey
      in: header

````