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

# Score a URL

> Crawl a URL (up to 6 pages) and produce an AI maturity assessment
across 27 dimensions. Each dimension is scored 1-5 with evidence,
confidence bands, and reasoning. Costs 1 credit. Subject to plan-based monthly quotas.

**Permission:** `score:create` (all authenticated users)




## OpenAPI

````yaml post /api/score
openapi: 3.1.0
info:
  title: Dacard.ai API
  description: >
    Decision intelligence platform for AI-native product teams.

    Score, connect, and compound your product maturity across two original
    frameworks.
  version: 0.1.0
  contact:
    name: Darren Card
    email: darren@darrencard.com
    url: https://darrencard.com
  license:
    name: Proprietary
servers:
  - url: https://app.dacard.ai
    description: Production
  - url: http://localhost:3001
    description: Local development
security: []
tags:
  - name: Scoring
    description: AI maturity scoring engine
  - name: Lifecycle
    description: Development Lifecycle assessment
  - name: Products
    description: Product management and analytics
  - name: Dashboard
    description: Dashboard and suite analytics
  - name: Account
    description: Account and team management
  - name: Billing
    description: Stripe billing integration
  - name: User
    description: User profile, onboarding, and preferences
  - name: System
    description: Health checks and diagnostics
  - name: Internal
    description: Internal and admin endpoints (PQL tracking, demo data management)
  - name: Agents
    description: Agent Studio - autonomous AI agents, triggers, and artifacts
  - name: Intelligence
    description: Alerts, coaching context, and score timeline
  - name: Anomalies
    description: Signal anomaly detection, acknowledgment, and sensitivity overrides
  - name: Outcomes
    description: Longitudinal outcome observations for validation study (E2.2)
  - name: Settings
    description: User and account notification preferences
  - name: Webhooks
    description: Outbound webhook management
  - name: API Keys
    description: API key management (Team and Enterprise plans)
paths:
  /api/score:
    post:
      tags:
        - Scoring
      summary: Score a URL
      description: >
        Crawl a URL (up to 6 pages) and produce an AI maturity assessment

        across 27 dimensions. Each dimension is scored 1-5 with evidence,

        confidence bands, and reasoning. Costs 1 credit. Subject to plan-based
        monthly quotas.


        **Permission:** `score:create` (all authenticated users)
      operationId: scoreUrl
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - url
              properties:
                url:
                  type: string
                  format: uri
                  description: The product URL to score
                  example: https://linear.app
                context:
                  type: string
                  description: Additional context to improve scoring accuracy
                  example: Linear is a project management tool for software teams
      responses:
        '200':
          description: Scoring result
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScoringResult'
        '400':
          description: Invalid URL or crawl failure
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                invalidUrl:
                  value:
                    error: Invalid URL
                    code: INVALID_URL
                crawlFailed:
                  value:
                    error: Failed to crawl URL
                    code: CRAWL_FAILED
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          description: Monthly quota exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: Not enough credits remaining
                code: QUOTA_EXCEEDED
      security:
        - clerkAuth: []
        - bearerAuth: []
components:
  schemas:
    ScoringResult:
      type: object
      required:
        - id
        - url
        - totalScore
        - stageName
        - dimensions
        - strengths
        - gaps
        - createdAt
      properties:
        id:
          type: string
          format: uuid
          description: Unique result ID (shareable)
        url:
          type: string
          format: uri
          description: URL that was scored
        companyName:
          type: string
          description: Extracted or user-provided company name
        totalScore:
          type: integer
          minimum: 27
          maximum: 135
          description: Sum of all 27 dimension scores
        stageName:
          type: string
          enum:
            - Foundation
            - Building
            - Scaling
            - Leading
            - Compounding
          description: Overall maturity tier
        dimensions:
          type: array
          items:
            $ref: '#/components/schemas/DimensionScore'
          minItems: 27
          maxItems: 27
          description: All 27 dimension scores
        strengths:
          type: array
          items:
            type: string
          description: Top 3 dimension IDs
          maxItems: 3
        gaps:
          type: array
          items:
            type: string
          description: Bottom 3 dimension IDs
          maxItems: 3
        crawledPages:
          type: array
          items:
            type: string
            format: uri
          description: URLs analyzed during crawl
        crossDimensionNotes:
          type: string
          nullable: true
          description: LLM narrative on cross-dimension patterns
        antiPatternsDetected:
          type: array
          items:
            type: string
          description: Detected anti-pattern names
        crawlStats:
          type: object
          properties:
            pagesAnalyzed:
              type: integer
            contentLength:
              type: integer
        productId:
          type: string
          format: uuid
          nullable: true
          description: Associated product ID (if scored within a product context)
        createdAt:
          type: string
          format: date-time
          description: ISO 8601 timestamp
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          description: Machine-readable error message
        code:
          type: string
          description: Error code
          enum:
            - AUTH_REQUIRED
            - FORBIDDEN
            - NOT_FOUND
            - INVALID_URL
            - CRAWL_FAILED
            - SCORE_FAILED
            - QUOTA_EXCEEDED
            - ANON_RATE_LIMIT
            - SIGNAL_RATE_LIMITED
            - SIGNAL_VALIDATION_FAILED
            - SERVER_ERROR
        message:
          type: string
          description: Human-readable message
        details:
          description: Additional context
    DimensionScore:
      type: object
      required:
        - dimensionId
        - dimensionName
        - score
        - stageName
        - evidence
        - confidence
        - reasoning
      properties:
        dimensionId:
          type: string
          description: Dimension identifier
          enum:
            - market_intelligence
            - decision_quality
            - roadmap_discipline
            - competitive_positioning
            - research_discovery
            - prototyping_speed
            - experience_design
            - design_dev_handoff
            - architecture_systems
            - spec_context_quality
            - build_vs_buy
            - delivery_velocity
            - customer_signal_synthesis
            - product_analytics
            - data_strategy_flywheel
            - feedback_loop_quality
            - quality_experimentation
            - team_orchestration
            - process_iteration
            - cost_token_economics
            - positioning_messaging
            - launch_execution
            - adoption_expansion
            - pricing_packaging
        dimensionName:
          type: string
          description: Human-readable dimension name
          example: Market Intelligence
        score:
          type: integer
          minimum: 1
          maximum: 4
          description: Maturity score (1=Foundation, 4=Compounding)
        stageName:
          type: string
          description: Stage name for this score level
        evidence:
          type: string
          description: Verbatim quote or observation from the crawled website
        confidence:
          type: string
          enum:
            - high
            - medium
            - low
          description: >
            Confidence in the score based on available evidence.

            Low confidence dimensions benefit from integration source
            enrichment.
        reasoning:
          type: string
          description: LLM explanation for the assigned score
  responses:
    Unauthorized:
      description: Authentication required
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Authentication required
            code: AUTH_REQUIRED
  securitySchemes:
    clerkAuth:
      type: apiKey
      in: cookie
      name: __session
      description: |
        Clerk session cookie. Authentication is handled by Clerk.
        Sign in at https://app.dacard.ai/sign-in to obtain a session.
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: |
        Clerk JWT session token. Obtain via Clerk's frontend SDK
        using `getToken()` or via the Clerk Backend API.

````