> ## Documentation Index
> Fetch the complete documentation index at: https://docs.surnex.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Start a site audit

> Start a new async site audit crawl for a project. The crawl runs in the background via BullMQ + DataForSEO On-Page API. Poll the GET /audits/{audit_id} endpoint to track progress. Only one audit can be in progress per project at a time. Counts against the plan's site_audits_monthly limit. At most 10 audits are stored per project — oldest are auto-deleted.



## OpenAPI

````yaml https://api.surnex.io/openapi.json post /v1/projects/{project_id}/audits
openapi: 3.1.0
info:
  title: Surnex API
  description: |-
    Surnex SEO Platform API — api.surnex.io

    Provides the complete backend for the Surnex SEO dashboard including:
    - Multi-tenant organization management
    - Project tracking (domains)
    - Keyword rank tracking (Phase 1+)
    - Backlink analysis (Phase 3+)
    - Site auditing (Phase 4+)
    - Stripe billing integration
    - MCP endpoint for AI agents at /mcp
  version: 0.1.0
servers: []
security: []
paths:
  /v1/projects/{project_id}/audits:
    post:
      tags:
        - Site Audit
      summary: Start a site audit
      description: >-
        Start a new async site audit crawl for a project. The crawl runs in the
        background via BullMQ + DataForSEO On-Page API. Poll the GET
        /audits/{audit_id} endpoint to track progress. Only one audit can be in
        progress per project at a time. Counts against the plan's
        site_audits_monthly limit. At most 10 audits are stored per project —
        oldest are auto-deleted.
      operationId: start_audit_v1_projects__project_id__audits_post
      parameters:
        - name: project_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Project Id
        - name: X-API-Key
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Api-Key
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StartAuditRequest'
      responses:
        '202':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIResponse_AuditResponse_'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    StartAuditRequest:
      properties:
        target_url:
          type: string
          maxLength: 2048
          minLength: 3
          title: Target Url
          description: >-
            The domain or URL to crawl. Can be a bare domain (e.g.,
            'example.com') or a full URL (e.g., 'https://example.com'). Must
            match the domain configured for the project.
        max_pages:
          anyOf:
            - type: integer
              maximum: 10000
              minimum: 1
            - type: 'null'
          title: Max Pages
          description: Maximum pages to crawl. Defaults to 50.
          default: 50
      type: object
      required:
        - target_url
      title: StartAuditRequest
      description: Request body for starting a new site audit crawl.
    APIResponse_AuditResponse_:
      properties:
        success:
          type: boolean
          title: Success
          default: true
        data:
          anyOf:
            - $ref: '#/components/schemas/AuditResponse'
            - type: 'null'
      type: object
      title: APIResponse[AuditResponse]
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    AuditResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        project_id:
          type: string
          format: uuid
          title: Project Id
        status:
          type: string
          title: Status
        dataforseo_task_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Dataforseo Task Id
        target_url:
          type: string
          title: Target Url
        max_pages:
          type: integer
          title: Max Pages
        pages_crawled:
          type: integer
          title: Pages Crawled
        issues_found:
          type: integer
          title: Issues Found
        errors_count:
          type: integer
          title: Errors Count
        warnings_count:
          type: integer
          title: Warnings Count
        notices_count:
          type: integer
          title: Notices Count
        audit_score:
          anyOf:
            - type: number
            - type: 'null'
          title: Audit Score
        crawl_settings:
          additionalProperties: true
          type: object
          title: Crawl Settings
        started_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Started At
        completed_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Completed At
        error_message:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Message
        created_by:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Created By
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
      type: object
      required:
        - id
        - project_id
        - status
        - target_url
        - max_pages
        - pages_crawled
        - issues_found
        - errors_count
        - warnings_count
        - notices_count
        - created_at
        - updated_at
      title: AuditResponse
      description: Full site audit record returned after starting or retrieving an audit.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````