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

# List AI risk assessments

> The workspace's most recent AI risk assessments, newest first, with the
affiliate embedded. Requires `read` (or `*`) scope.




## OpenAPI

````yaml /openapi.yaml get /v1/risk/flags
openapi: 3.1.0
info:
  title: Affixo API
  version: 1.0.0
  description: |
    The Affixo REST API for affiliate program management and server-to-server
    conversion tracking.

    All requests authenticate with a workspace key (`sa_live_…`) as a Bearer
    token. Scopes: `read` / `write` / `track` / `*`.

    Rate limit: 600 req/min per key (enforced at the edge).
servers:
  - url: https://go.affixo.dev
    description: Production
security: []
tags:
  - name: Affiliates
    description: Manage affiliates (workspace key)
  - name: Campaigns
    description: Create and configure campaigns + commission rules (workspace key)
  - name: Links
    description: Manage referral links (workspace key)
  - name: Risk
    description: AI risk assessments for fraud triage (workspace key)
  - name: Commissions
    description: Approve, deny, and manage commissions (workspace key)
  - name: Conversions
    description: Re-attribute and manage conversions (workspace key)
  - name: Webhooks
    description: Manage webhook endpoint subscriptions (workspace key)
  - name: Reports
    description: Aggregated reporting data (workspace key)
  - name: Resources
    description: Read campaigns, commissions, conversions, payouts (workspace key)
  - name: Tracking
    description: >-
      Server-to-server click & conversion tracking (workspace key, scope
      "track")
paths:
  /v1/risk/flags:
    get:
      tags:
        - Risk
      summary: List AI risk assessments
      description: |
        The workspace's most recent AI risk assessments, newest first, with the
        affiliate embedded. Requires `read` (or `*`) scope.
      parameters:
        - name: limit
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 25
        - name: risk_level
          in: query
          schema:
            type: string
            enum:
              - low
              - medium
              - high
              - critical
      responses:
        '200':
          description: A page of risk assessments
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ListEnvelope'
                  - type: object
                    properties:
                      data:
                        type: array
                        items:
                          $ref: '#/components/schemas/RiskAssessment'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/InsufficientScope'
      security:
        - WorkspaceKey: []
components:
  schemas:
    ListEnvelope:
      type: object
      properties:
        object:
          type: string
          example: list
        resource:
          type: string
          example: affiliates
        limit:
          type: integer
          example: 50
        offset:
          type: integer
          example: 0
        data:
          type: array
          items: {}
    RiskAssessment:
      type: object
      properties:
        affiliate_id:
          type: string
          format: uuid
        risk_level:
          type: string
          enum:
            - low
            - medium
            - high
            - critical
        score:
          type: number
        summary:
          type: string
        recommended_action:
          type: string
        flags:
          type: array
          items:
            type: string
          example:
            - self_referral
            - velocity_anomaly
        created_at:
          type: string
          format: date-time
        affiliate:
          type: object
          nullable: true
          properties:
            name:
              type: string
              nullable: true
            email:
              type: string
              nullable: true
            ref_code:
              type: string
            status:
              type: string
    Error:
      type: object
      properties:
        error:
          type: string
        need:
          type: string
          description: Present on insufficient_scope.
        detail:
          type: string
  responses:
    BadRequest:
      description: Invalid or missing parameters
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: invalid_json
    Unauthorized:
      description: Missing or invalid bearer token
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: unauthorized
    InsufficientScope:
      description: The key lacks the required scope
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: insufficient_scope
            need: write
  securitySchemes:
    WorkspaceKey:
      type: http
      scheme: bearer
      description: 'Workspace API key, e.g. `sa_live_…`. Scopes: read / write / track / *.'

````