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

# Start a technical audit on one domain; uses the monthly audit quota, then poll the summary until running is null



## OpenAPI

````yaml /api-reference/openapi.json post /api/v2/brands/{brand_id}/technical_audit
openapi: 3.0.1
info:
  title: Cognizo Public API
  version: v1
  description: >-
    Public REST API for Cognizo. Authenticate with an API key via the
    `X-API-KEY` header.
servers:
  - url: https://core.cognizo.ai
security:
  - apiKey: []
paths:
  /api/v2/brands/{brand_id}/technical_audit:
    parameters:
      - name: brand_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
    post:
      tags:
        - Technical audit
      summary: >-
        Start a technical audit on one domain; uses the monthly audit quota,
        then poll the summary until running is null
      operationId: start_brand_technical_audit
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                domain_id:
                  type: string
                  format: uuid
                  description: Defaults to the brand's first domain
                action_id:
                  type: string
                  format: uuid
                  nullable: true
                  description: >-
                    Optional. Only when the run is started from a weekly action
                    that asks to rerun the audit: that action's id. The action
                    is marked complete when the run starts and stays open when
                    the run is refused. Any other action id is rejected and no
                    run is started.
      responses:
        '202':
          description: run started; returns the pending summary
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      status:
                        type: string
                        enum:
                          - not_started
                          - pending
                          - completed
                          - failed
                        description: >-
                          The latest finished run's; pending only while the
                          first run is in progress (see running)
                      outcome:
                        type: string
                        enum:
                          - completed
                          - partially_blocked
                          - blocked
                          - failed
                          - null
                        nullable: true
                      stage:
                        type: string
                        enum:
                          - access
                          - crawling
                          - classifying
                          - evaluating
                          - done
                          - null
                        nullable: true
                        description: >-
                          The running run's stage while one runs, else the
                          finished run's
                      ran_at:
                        type: string
                        format: date-time
                        nullable: true
                      domain:
                        type: object
                        properties:
                          id:
                            type: string
                            format: uuid
                          domain:
                            type: string
                        required:
                          - id
                          - domain
                      checks_total:
                        type: integer
                      checks_passing:
                        type: integer
                      missing_count:
                        type: integer
                      partial_count:
                        type: integer
                      to_fix_count:
                        type: integer
                        description: >-
                          Checks that need work (not done + partly done),
                          counting the AI crawlers as one check like the table
                          does
                      missing_by_priority:
                        type: object
                        properties:
                          high:
                            type: integer
                          medium:
                            type: integer
                          low:
                            type: integer
                        required:
                          - high
                          - medium
                          - low
                      pages_checked:
                        type: integer
                        nullable: true
                      pages_blocked:
                        type: integer
                        nullable: true
                      failure:
                        type: object
                        nullable: true
                        properties:
                          reason:
                            type: string
                            nullable: true
                          title:
                            type: string
                          explanation:
                            type: string
                          fix:
                            type: string
                        required:
                          - reason
                          - title
                          - explanation
                          - fix
                      latest_failure:
                        type: object
                        nullable: true
                        description: >-
                          Set when the newest run failed and an earlier run
                          finished: everything else on this response (and the
                          checks, pages and exports) is that earlier run, and
                          this says the newest one didn't finish. Null
                          otherwise.
                        properties:
                          reason:
                            type: string
                            nullable: true
                          ran_at:
                            type: string
                            format: date-time
                          title:
                            type: string
                          explanation:
                            type: string
                          fix:
                            type: string
                        required:
                          - reason
                          - ran_at
                          - title
                          - explanation
                          - fix
                      top_issues:
                        type: array
                        maxItems: 3
                        description: >-
                          The open problems to fix first: highest priority, then
                          not done before partly done, then the most pages to
                          fix. A table row each, so the AI crawlers are one
                          problem (key access.ai_bots).
                        items:
                          $ref: '#/components/schemas/technical_audit_top_issue'
                      quota:
                        type: object
                        properties:
                          limit:
                            type: integer
                            nullable: true
                          used:
                            type: integer
                          remaining:
                            type: integer
                            nullable: true
                          unlimited:
                            type: boolean
                          resets_at:
                            type: string
                            format: date-time
                            nullable: true
                          spent:
                            type: array
                            description: >-
                              This month's charged runs per domain, most used
                              first: where the allowance went.
                            items:
                              type: object
                              properties:
                                domain_id:
                                  type: string
                                domain:
                                  type: string
                                  nullable: true
                                runs:
                                  type: integer
                                last_run_at:
                                  type: string
                                  format: date-time
                                  nullable: true
                              required:
                                - domain_id
                                - domain
                                - runs
                                - last_run_at
                        required:
                          - limit
                          - used
                          - remaining
                          - unlimited
                          - resets_at
                          - spent
                      sections:
                        type: array
                        items:
                          type: object
                          properties:
                            key:
                              type: string
                              enum:
                                - reach
                                - seo
                                - cite
                            title:
                              type: string
                            checks_total:
                              type: integer
                            checks_passing:
                              type: integer
                          required:
                            - key
                            - title
                            - checks_total
                            - checks_passing
                      crawl:
                        allOf:
                          - $ref: '#/components/schemas/technical_audit_crawl'
                        nullable: true
                        description: >-
                          What the run crawled and how long it took. Null before
                          a run has crawled.
                      dismissed_count:
                        type: integer
                        description: >-
                          Checks the team dismissed whole; counted in none of
                          the totals above
                      running:
                        type: object
                        nullable: true
                        description: >-
                          The run in progress on this domain, null when none (a
                          run pending longer than 3h counts as dead). Every
                          other field describes the latest FINISHED run, so a
                          re-run keeps the previous results on screen; status is
                          "pending" only while the very first run is in
                          progress.
                        properties:
                          job_id:
                            type: string
                            format: uuid
                          stage:
                            type: string
                            enum:
                              - access
                              - crawling
                              - classifying
                              - evaluating
                              - done
                          started_at:
                            type: string
                            format: date-time
                          trigger:
                            type: string
                            enum:
                              - user
                              - system
                        required:
                          - job_id
                          - stage
                          - started_at
                          - trigger
                      running_elsewhere:
                        type: object
                        nullable: true
                        description: >-
                          The brand's run in progress on ANOTHER domain, null
                          when none or when this domain has its own. A brand
                          runs one audit at a time, so this domain can't start
                          one until it finishes (409 AUDIT_RUNNING).
                        properties:
                          domain_id:
                            type: string
                            format: uuid
                          domain:
                            type: string
                            nullable: true
                          started_at:
                            type: string
                            format: date-time
                        required:
                          - domain_id
                          - domain
                          - started_at
                    required:
                      - status
                      - outcome
                      - stage
                      - ran_at
                      - domain
                      - checks_total
                      - checks_passing
                      - missing_count
                      - partial_count
                      - missing_by_priority
                      - pages_checked
                      - pages_blocked
                      - failure
                      - latest_failure
                      - quota
                      - sections
                      - crawl
                      - dismissed_count
                      - running
                      - running_elsewhere
                      - to_fix_count
                      - top_issues
                required:
                  - data
        '403':
          description: >-
            organization access revoked (ORGANIZATION_ACCESS_REVOKED): the
            access token's organization is no longer one of the user's
            memberships (they left, were removed, or the organization was
            deleted). The session itself is still valid: drop the organization's
            client state and refresh the session, which moves it to another
            organization.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '404':
          description: >-
            brand not found (NOT_FOUND): no such brand, or it belongs to another
            organization (the two are indistinguishable by design).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '409':
          description: >-
            a run is already in progress for this brand (the card named by
            action_id stays open)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '410':
          description: paused brand
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '422':
          description: >-
            action_id isn't one of this brand's rerun_audit cards; no run is
            started
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '429':
          description: this month's audits are used up
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
components:
  schemas:
    technical_audit_top_issue:
      type: object
      description: >-
        One open problem to fix first: a table row, so the AI crawlers are one
        problem (key access.ai_bots)
      properties:
        key:
          $ref: '#/components/schemas/technical_audit_check_key'
        title:
          type: string
        priority:
          type: string
          enum:
            - high
            - medium
            - low
        status:
          type: string
          enum:
            - missing
            - partial
        affected_count:
          type: integer
          nullable: true
          description: Pages to fix; null for a site-level check
      required:
        - key
        - title
        - priority
        - status
        - affected_count
    technical_audit_crawl:
      type: object
      description: What a run crawled and how long it took
      properties:
        sitemap_urls:
          type: integer
          description: URLs listed in the site's sitemap(s)
        discovered:
          type: integer
          description: Pages the crawler fetched
        out_of_scope:
          type: integer
          description: Fetched pages dropped because they ended on another host
        duplicates_merged:
          type: integer
          description: Fetches that landed on a page already counted
        stored:
          type: integer
          description: Pages kept (= checked + blocked + errors + non_html)
        checked:
          type: integer
          description: Readable HTML pages (2xx) the checks ran on
        blocked:
          type: integer
          description: Pages behind a bot check, 401 or 403
        errors:
          type: integer
          description: Other non-2xx pages
        non_html:
          type: integer
          description: 2xx pages that aren't HTML (PDF, XML, feeds…)
        in_sitemap:
          type: integer
          description: Stored pages listed in the sitemap
        found_by_links:
          type: integer
          description: Stored pages found only by following links
        classified:
          type: integer
          description: Checked pages with page analysis answers
        classified_from_cache:
          type: integer
          description: Of those, answered from cache (page unchanged)
        classify_failed:
          type: integer
          description: Pages whose analysis failed
        page_limit:
          type: integer
        hit_page_limit:
          type: boolean
        timings:
          type: object
          description: Seconds per stage, 1 decimal; null for a stage that didn't run
          properties:
            access:
              type: number
              nullable: true
            crawling:
              type: number
              nullable: true
            classifying:
              type: number
              nullable: true
            evaluating:
              type: number
              nullable: true
            total:
              type: number
              nullable: true
          required:
            - access
            - crawling
            - classifying
            - evaluating
            - total
        page_types:
          type: object
          description: Checked pages per page type
          properties:
            article:
              type: integer
            faq:
              type: integer
            product:
              type: integer
            pricing:
              type: integer
            docs:
              type: integer
            landing:
              type: integer
            category:
              type: integer
            about:
              type: integer
            contact:
              type: integer
            other:
              type: integer
            unclassified:
              type: integer
          required:
            - article
            - faq
            - product
            - pricing
            - docs
            - landing
            - category
            - about
            - contact
            - other
            - unclassified
      required:
        - sitemap_urls
        - discovered
        - out_of_scope
        - duplicates_merged
        - stored
        - checked
        - blocked
        - errors
        - non_html
        - in_sitemap
        - found_by_links
        - classified
        - classified_from_cache
        - classify_failed
        - page_limit
        - hit_page_limit
        - timings
        - page_types
    error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              description: Stable machine-readable reason; see `error_code`.
            message:
              type: string
            details:
              type: array
              items:
                $ref: '#/components/schemas/error_detail'
          required:
            - code
            - message
      required:
        - error
    technical_audit_check_key:
      type: string
      enum:
        - access.ai_bot.oai_searchbot
        - access.ai_bot.chatgpt_user
        - access.ai_bot.gptbot
        - access.ai_bot.claude_searchbot
        - access.ai_bot.claude_user
        - access.ai_bot.claudebot
        - access.ai_bot.perplexitybot
        - access.ai_bot.perplexity_user
        - access.ai_bot.googlebot
        - access.ai_bot.google_extended
        - access.ai_bot.bingbot
        - access.ai_bot.applebot
        - access.ai_bot.applebot_extended
        - access.ai_bot.meta_externalagent
        - access.ai_bot.ccbot
        - access.ai_bot.amazonbot
        - access.ai_bot.duckassistbot
        - access.robots.reachable
        - access.server
        - access.homepage.https
        - access.homepage.http_redirect
        - access.homepage.reachable
        - access.homepage.indexable
        - access.sitemap.declared
        - access.sitemap.valid
        - site.schema.organization_homepage
        - site.schema.website_homepage
        - site.schema.article
        - site.schema.faq
        - site.schema.valid
        - site.schema.type_mismatch
        - site.schema.recommended
        - site.schema.same_as
        - site.pages.errors
        - site.links.broken_internal
        - site.snippets.blocked
        - site.indexing.noindex
        - site.redirects.chains
        - site.canonical.issues
        - site.sitemap.mismatch
        - site.social.open_graph
        - site.access.bot_protection
        - site.headings.single_h1
        - site.headings.h1_descriptive
        - site.headings.hierarchy
        - site.titles.unique
        - site.titles.length
        - site.titles.relevant
        - site.meta_description.present
        - site.meta_description.relevant
        - site.images.alt
        - site.images.alt_descriptive
        - site.articles.dates
        - site.articles.author
        - site.content.substantive
        - site.content.outdated
        - access.ai_bots
      description: >-
        Every row key of the Technical audit: the catalogue's checks
        (access.ai_bot.* one per AI crawler) and access.ai_bots, the AI
        assistants row they are part of
    error_detail:
      type: object
      properties:
        field:
          type: string
          nullable: true
        code:
          type: string
        message:
          type: string
      required:
        - code
        - message
        - field
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: X-API-KEY

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.