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

# Get per-step diagnostics for a compliance run

> Returns the exact request and response payloads the runner captured for failing storyboard steps on a single compliance run.

Lets agent owners diff what the runner sent against their own probes without re-running the storyboard. Owner-only, with static admin API key access for support/debugging — payloads echo seller-side account/brand identifiers and may carry sensitive descriptive fields. If `run_id` is omitted, resolves to the latest run for the agent.



## OpenAPI

````yaml /static/openapi/registry.yaml get /api/registry/agents/{encodedUrl}/compliance/diagnostics
openapi: 3.1.0
info:
  title: AgenticAdvertising.org Registry API
  description: >-
    REST API for the AgenticAdvertising.org registry. Resolve brands,

    discover properties, look up agents, and validate authorization in the

    AdCP ecosystem.


    Most endpoints are public and require no authentication. Endpoints marked

    with a lock icon accept either an organization API key or a user JWT

    obtained via the OAuth 2.1 flow — see
    [Authentication](https://agenticadvertising.org/docs/registry/index#authentication).


    **Base URL:** `https://agenticadvertising.org`
  version: 1.0.0
  contact:
    name: AgenticAdvertising.org
    url: https://agenticadvertising.org
servers:
  - url: https://agenticadvertising.org
    description: Production
security: []
tags:
  - name: Onboarding
    description: >-
      Explicitly bootstrap a third-party integration into the AAO registry. Most
      callers don't need this tag — `POST /api/me/agents` auto-creates the org
      (for fresh users) and the member profile (for first-time agent
      registration) without a separate round trip. Use `POST /api/organizations`
      only when you need to override the auto-derived org name / company_type /
      revenue_tier. Tier transitions happen via the billing flow only; the
      Stripe webhook is the sole writer of `organizations.membership_tier`.
  - name: Member Agents
    description: >-
      Register, list, update, and remove agents on the caller's organization
      member profile. Authenticated programmatic surface for CI / scripts that
      don't want to round-trip the full member profile.
  - name: Brand Resolution
    description: Resolve advertiser domains to canonical brand identities.
  - name: Property Resolution
    description: >-
      Resolve publisher domains to their property configurations and authorized
      agents.
  - name: Agent Discovery
    description: >-
      Browse the federated agent network, search agent inventory profiles,
      publisher index, and registry statistics.
  - name: Change Feed
    description: Poll cursor-based registry change events for local sync.
  - name: Lookups & Authorization
    description: >-
      Look up agents by domain or property, and validate ad-serving
      authorization.
  - name: Validation Tools
    description: >-
      Validate publisher adagents.json files and generate compliant
      configurations.
  - name: Community Mirrors
    description: >-
      Publish, fetch, list, and retire catalog-only adagents.json mirrors for
      platforms that have not adopted AdCP.
  - name: Search
    description: Cross-entity search across brands, publishers, agents, and properties.
  - name: Agent Probing
    description: >-
      Connect to live agents and inspect their capabilities, formats, and
      inventory.
  - name: Brand Discovery
    description: Discover and crawl brand.json files across domains.
  - name: Agent Compliance
    description: Agent compliance status, storyboard test results, and compliance history.
  - name: Policy Registry
    description: >-
      Browse, resolve, and contribute governance policies for campaign
      compliance.
  - name: Property Catalog
    description: >-
      Contribute facts to the property fact-graph: resolve identifiers to stable
      property_rids (which also contributes them, with provenance) and dispute
      catalog claims.
paths:
  /api/registry/agents/{encodedUrl}/compliance/diagnostics:
    get:
      tags:
        - Agent Compliance
      summary: Get per-step diagnostics for a compliance run
      description: >-
        Returns the exact request and response payloads the runner captured for
        failing storyboard steps on a single compliance run.


        Lets agent owners diff what the runner sent against their own probes
        without re-running the storyboard. Owner-only, with static admin API key
        access for support/debugging — payloads echo seller-side account/brand
        identifiers and may carry sensitive descriptive fields. If `run_id` is
        omitted, resolves to the latest run for the agent.
      operationId: getAgentComplianceStepDiagnostics
      parameters:
        - schema:
            type: string
            description: URL-encoded agent URL
          required: true
          description: URL-encoded agent URL
          name: encodedUrl
          in: path
        - schema:
            type: string
            description: Specific compliance run UUID. Defaults to latest.
          required: false
          description: Specific compliance run UUID. Defaults to latest.
          name: run_id
          in: query
        - schema:
            type: string
            description: Max rows (default 500, max 1000)
          required: false
          description: Max rows (default 500, max 1000)
          name: limit
          in: query
      responses:
        '200':
          description: Per-step diagnostics for the requested run
          content:
            application/json:
              schema:
                type: object
                properties:
                  agent_url:
                    type: string
                  run_id:
                    type:
                      - string
                      - 'null'
                  count:
                    type: integer
                  diagnostics:
                    type: array
                    items:
                      $ref: '#/components/schemas/ComplianceStepDiagnostic'
                required:
                  - agent_url
                  - run_id
                  - count
                  - diagnostics
        '400':
          description: Invalid agent URL
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Not authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
        - oauth2: []
components:
  schemas:
    ComplianceStepDiagnostic:
      type: object
      properties:
        id:
          anyOf:
            - type: number
            - type: string
        run_id:
          type: string
        agent_url:
          type: string
        storyboard_id:
          type: string
        phase_id:
          type: string
        step_id:
          type: string
        task:
          type: string
        step_passed:
          type: boolean
        duration_ms:
          type:
            - number
            - 'null'
        request_url:
          type:
            - string
            - 'null'
        request_jsonb: {}
        response_status:
          type:
            - number
            - 'null'
        response_headers_jsonb:
          type:
            - object
            - 'null'
          additionalProperties:
            type: string
        response_jsonb: {}
        extraction_path:
          type:
            - string
            - 'null'
        extraction_note:
          type:
            - string
            - 'null'
        error_text:
          type:
            - string
            - 'null'
        adcp_error_jsonb: {}
        failed_validations_jsonb: {}
        served_by_agent_url:
          type:
            - string
            - 'null'
        captured_at:
          type: string
      required:
        - id
        - run_id
        - agent_url
        - storyboard_id
        - phase_id
        - step_id
        - task
        - step_passed
        - captured_at
    Error:
      type: object
      properties:
        error:
          type: string
      required:
        - error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Bearer token in the `Authorization` header. Two token types are
        accepted:


        - **Organization API key** (`sk_...`) issued via the dashboard.
        Org-scoped, long-lived, for server-to-server use.

        - **User JWT** obtained via the OAuth 2.1 authorization code flow with
        PKCE. User-scoped, short-lived. Discover the authorization server at
        `/.well-known/oauth-authorization-server` and the protected-resource
        metadata at `/.well-known/oauth-protected-resource/api`.
    oauth2:
      type: oauth2
      description: >-
        OAuth 2.1 authorization code flow with PKCE. Users authenticate via
        AuthKit and clients receive a Bearer JWT that authorizes both the MCP
        endpoint and this REST API. Dynamic client registration is supported at
        `/register`.
      flows:
        authorizationCode:
          authorizationUrl: https://agenticadvertising.org/authorize
          tokenUrl: https://agenticadvertising.org/token
          refreshUrl: https://agenticadvertising.org/token
          scopes:
            openid: User identifier
            profile: User profile information
            email: User email address

````