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

# List one visit's decisions

> The decisions on one visit's key at your application, from its start to when it was last seen, newest first by default, a page at a time: `limit`, then `cursor` from `X-Next-Cursor`, or `offset`. `X-Total-Count` and `X-Total-Pages` count every match and are sent on the first cursor page and on every offset page. Ties on `decided_at` break on the decision's id. The list runs to when the visit was last seen, which lags its latest record by about a minute, so a decision appears here about a minute after the SDK reports it.



## OpenAPI

````yaml /api-reference/openapi.json get /acceptance/visits/{visit_id}/decisions
openapi: 3.1.0
info:
  title: baselayer-api-service
  version: 0.1.0
servers:
  - url: https://api.baselayer.com/
security: []
paths:
  /acceptance/visits/{visit_id}/decisions:
    get:
      tags:
        - Acceptance
      summary: List one visit's decisions
      description: >-
        The decisions on one visit's key at your application, from its start to
        when it was last seen, newest first by default, a page at a time:
        `limit`, then `cursor` from `X-Next-Cursor`, or `offset`.
        `X-Total-Count` and `X-Total-Pages` count every match and are sent on
        the first cursor page and on every offset page. Ties on `decided_at`
        break on the decision's id. The list runs to when the visit was last
        seen, which lags its latest record by about a minute, so a decision
        appears here about a minute after the SDK reports it.
      operationId: acceptance_visits_decisions_list
      parameters:
        - name: visit_id
          in: path
          required: true
          schema:
            description: The visit's id.
            format: uuid
            title: Visit Id
            type: string
          description: The visit's id.
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 1000
            minimum: 1
            description: >-
              Maximum number of records to return in a single page. Must be
              between 1 and 1000.
            default: 10
            title: Limit
          description: >-
            Maximum number of records to return in a single page. Must be
            between 1 and 1000.
        - name: offset
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
                minimum: 0
              - type: 'null'
            description: >-
              Number of records to skip from the beginning. Use 0 for the first
              page. Cannot be used with cursor.
            title: Offset
          description: >-
            Number of records to skip from the beginning. Use 0 for the first
            page. Cannot be used with cursor.
        - name: cursor
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Opaque pagination cursor token that identifies the position in the
              result set. Use the cursor from the previous response to get the
              next page. Cannot be used with offset.
            title: Cursor
          description: >-
            Opaque pagination cursor token that identifies the position in the
            result set. Use the cursor from the previous response to get the
            next page. Cannot be used with offset.
        - name: sort
          in: query
          required: false
          schema:
            anyOf:
              - $ref: '#/components/schemas/v1.AcceptanceDecisionSortField'
              - type: 'null'
            description: >-
              `decided_at`: when the SDK decided; ties break on the decision's
              id. Defaults to `decided_at` `desc`.
            title: Sort
          description: >-
            `decided_at`: when the SDK decided; ties break on the decision's id.
            Defaults to `decided_at` `desc`.
        - name: sort_direction
          in: query
          required: false
          schema:
            anyOf:
              - $ref: '#/components/schemas/SortMethod'
              - type: 'null'
            description: >-
              `asc` or `desc`, for every key of the sort. Defaults to the
              field's own: `decided_at` `desc`.
            title: Sort Direction
          description: >-
            `asc` or `desc`, for every key of the sort. Defaults to the field's
            own: `decided_at` `desc`.
        - name: step
          in: query
          required: false
          schema:
            anyOf:
              - type: array
                items:
                  $ref: '#/components/schemas/v1.VisitStep'
              - type: 'null'
            description: Only decisions at this step. Repeat for several.
            title: Step
          description: Only decisions at this step. Repeat for several.
        - name: outcome
          in: query
          required: false
          schema:
            anyOf:
              - type: array
                items:
                  $ref: '#/components/schemas/v1.AcceptanceDecisionOutcome'
              - type: 'null'
            description: Only decisions with this recommendation. Repeat for several.
            title: Outcome
          description: Only decisions with this recommendation. Repeat for several.
      responses:
        '200':
          description: The visit's decisions in the requested order.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/v1.VisitDecision'
            application/vnd.baselayer.v1+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/v1.VisitDecision'
          headers:
            X-Total-Count:
              description: Total number of records matching the query.
              schema:
                type: integer
            X-Total-Pages:
              description: Total number of pages available based on the current limit.
              schema:
                type: integer
            X-Next-Cursor:
              description: >-
                Cursor for the next page (only present when using the keyset
                pagination and if `has_more` is true.
              schema:
                type: string
        '404':
          description: No visit of your application has this id.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
                title: ResourceNotFound
                description: Could not locate the resource for the given URI.
                examples:
                  - type: resource_not_found
                    code: 1
                    message: Could not locate the resource for the given URI.
                    metadata: {}
        '422':
          description: The request is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
                title: ValidationFailed
                description: The request is invalid.
                examples:
                  - type: validation_failed
                    code: 7112
                    message: The request is invalid.
                    metadata: {}
        '503':
          description: >-
            Acceptance data cannot be read right now; retry after `Retry-After`
            seconds.
          headers:
            Retry-After:
              description: Seconds to wait before retrying.
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
                title: AcceptanceReadsUnavailable
                description: >-
                  Acceptance data is temporarily unavailable. Retry after the
                  Retry-After interval.
                examples:
                  - type: acceptance_reads_unavailable
                    code: 7252
                    message: >-
                      Acceptance data is temporarily unavailable. Retry after
                      the Retry-After interval.
                    metadata: {}
      security:
        - APIKeyHeader: []
components:
  schemas:
    v1.AcceptanceDecisionSortField:
      type: string
      enum:
        - decided_at
      title: AcceptanceDecisionSortField
      description: The field a list of decisions sorts on.
    SortMethod:
      type: string
      enum:
        - asc
        - desc
      title: SortMethod
    v1.VisitStep:
      description: The funnel step a request maps to under the acceptance policy.
      enum:
        - browse
        - search
        - cart
        - checkout
        - payment
        - account
        - signup
        - write
      title: VisitStep
      type: string
    v1.AcceptanceDecisionOutcome:
      description: |-
        What a decision recommends for a request: let it through, serve a
        challenge, ask for a stronger credential, or refuse it.
      enum:
        - allow
        - challenge
        - step_up
        - block
      title: AcceptanceDecisionOutcome
      type: string
    v1.VisitDecision:
      allOf:
        - if:
            properties:
              outcome:
                const: step_up
          then:
            properties:
              requirement:
                properties:
                  kind:
                    enum:
                      - identity_level
                      - scope
                type: object
            required:
              - requirement
        - if:
            properties:
              outcome:
                const: challenge
          then:
            properties:
              requirement:
                properties:
                  kind:
                    enum:
                      - challenge
                type: object
            required:
              - requirement
        - if:
            properties:
              outcome:
                enum:
                  - allow
                  - block
          then:
            properties:
              requirement:
                type: 'null'
      description: |-
        One decision of a visit: what the SDK reported, what the merchant did,
        and where the visit stands.
      oneOf:
        - properties:
            policy_version_id:
              type: string
          required:
            - policy_version_id
        - properties:
            policy_version_label:
              type: string
          required:
            - policy_version_label
      properties:
        report_id:
          description: >-
            The SDK's id for the record; a resent record with the same id is a
            duplicate.
          format: uuid
          title: Report Id
          type: string
        decided_at:
          description: When the SDK decided, on the merchant's clock.
          format: date-time
          title: Decided At
          type: string
        transport:
          $ref: '#/components/schemas/v1.VisitTransport'
          description: How the visitor reached the merchant.
        step:
          $ref: '#/components/schemas/v1.VisitStep'
          description: The funnel step the request mapped to.
        presence:
          $ref: '#/components/schemas/v1.Presence'
          description: The presence the policy ran on.
        evidence:
          description: >-
            One entry per reader that contributed, raw: at most 16, with at most
            8,192 bytes of `detail` in all, counted as the UTF-8 of each
            `detail` as sent, in RFC 8785 canonical form.
          items:
            $ref: '#/components/schemas/v1.Evidence'
          maxItems: 16
          title: Evidence
          type: array
        identity_level:
          anyOf:
            - $ref: '#/components/schemas/v1.IdentityLevel'
            - type: 'null'
          default: null
          description: >-
            The deepest identity the SDK established; null for a person, an
            unknown visitor or an uncorroborated claim.
        sdk:
          $ref: '#/components/schemas/v1.Sdk'
          description: The SDK that computed the decision.
        outcome:
          $ref: '#/components/schemas/v1.AcceptanceDecisionOutcome'
          description: What the decision recommends.
        enforcement_mode:
          $ref: '#/components/schemas/v1.EnforcementMode'
          description: >-
            The mode the SDK applied; a step run report-only because of a rule
            it could not read is `report_only`.
        rule:
          anyOf:
            - maxLength: 128
              type: string
            - type: 'null'
          default: null
          description: The policy rule that fired; null when none matched.
          examples:
            - vl2
          title: Rule
        policy_version_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          default: null
          description: The policy version that decided; null for the bundled policy.
          title: Policy Version Id
        policy_version_label:
          anyOf:
            - maxLength: 64
              pattern: ^bundled:.+$
              type: string
            - type: 'null'
          default: null
          description: >-
            `bundled:` and the SDK version, set only when the SDK never fetched
            a policy.
          examples:
            - bundled:1.4.0
          title: Policy Version Label
        reasons:
          description: Why the decision came out as it did.
          items:
            $ref: '#/components/schemas/v1.AcceptanceDecisionReason'
          title: Reasons
          type: array
        requirement:
          anyOf:
            - $ref: '#/components/schemas/v1.Requirement'
            - type: 'null'
          default: null
          description: >-
            What a `step_up` or `challenge` asks for, verbatim from the rule;
            null otherwise.
        expires_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          default: null
          description: When the decision stops applying.
          title: Expires At
        acceptance_decision_id:
          description: The decision's id.
          format: uuid
          title: Acceptance Decision Id
          type: string
        visit_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          default: null
          description: >-
            Its visit; null until the decision is joined to its visit, about a
            minute after it is reported.
          title: Visit Id
        environment:
          $ref: '#/components/schemas/v1.ApplicationType'
          description: The application's environment.
        agent:
          anyOf:
            - $ref: '#/components/schemas/v1.VisitAgent'
            - type: 'null'
          default: null
          description: The agent behind the request.
        credential:
          anyOf:
            - $ref: '#/components/schemas/v1.VisitCredential'
            - type: 'null'
          default: null
          description: >-
            The presented KYA credential behind the request: its own
            presentation, or the verified one a session named; null otherwise.
        credential_verification:
          anyOf:
            - $ref: '#/components/schemas/v1.SubjectVerification'
            - type: 'null'
          default: null
          description: >-
            Baselayer's conclusion about the credential the request presented or
            its session named, even when `credential` is null (a pending or
            unbacked session); null when the decision names no credential,
            including a presentation no reader parsed.
        credential_refusal_reason:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: >-
            Why it was refused, as an error `type`, `unbacked_session` included;
            null unless `credential_verification` is `refused`.
          examples:
            - unbacked_session
          title: Credential Refusal Reason
        merchant_outcome:
          anyOf:
            - $ref: '#/components/schemas/v1.AcceptanceDecisionOutcome'
            - type: 'null'
          default: null
          description: >-
            What the merchant did with the recommendation; null when the SDK
            could not observe it.
        integrity:
          $ref: '#/components/schemas/v1.VisitDecisionIntegrity'
          description: Baselayer's check on the decision.
        visit:
          anyOf:
            - $ref: '#/components/schemas/v1.VisitSummary'
            - type: 'null'
          default: null
          description: >-
            Its visit; null until the decision is joined to its visit, about a
            minute after it is reported.
      required:
        - report_id
        - decided_at
        - transport
        - step
        - presence
        - evidence
        - sdk
        - outcome
        - enforcement_mode
        - reasons
        - acceptance_decision_id
        - environment
        - integrity
      title: VisitDecision (v1)
      type: object
    Error:
      properties:
        type:
          type: string
          title: Type
          description: >-
            Stable snake_case name of the error. Branch on this, never on
            `message`.
        code:
          type: integer
          title: Code
          description: Integer catalog code of the error.
        message:
          type: string
          title: Message
          description: For a human reading a log; not stable and not localized.
        metadata:
          additionalProperties: true
          type: object
          title: Metadata
          description: Context documented per `type`.
        request_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Request Id
          description: The `X-Request-ID` of the failed request.
      type: object
      required:
        - type
        - code
        - message
      title: Error
      description: The one body of every error a KYA route answers.
    v1.VisitTransport:
      description: How a visitor reached the merchant. Values may be added.
      enum:
        - browser
        - api
        - mcp
        - ucp
      title: VisitTransport
      type: string
    v1.Presence:
      additionalProperties: false
      description: |-
        What is behind a request and how strongly the evidence backs it: the
        answer the policy ran on.
      properties:
        kind:
          $ref: '#/components/schemas/v1.PresenceKind'
          description: What is behind the request.
        trust:
          $ref: '#/components/schemas/v1.PresenceTrust'
          description: How strongly the evidence backs `kind`.
        confidence:
          anyOf:
            - $ref: '#/components/schemas/v1.ConfidenceLevel'
            - type: 'null'
          default: null
          description: How sure a detection verdict was; null when nothing scored.
        risk_level:
          $ref: '#/components/schemas/v1.RiskLevel'
          description: The risk scored; `no_risk` when nothing scored.
        agent_platform:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: >-
            The agent platform, as the strongest source that names one names it;
            null for a person or an unnamed agent.
          examples:
            - OpenAI ChatGPT
          title: Agent Platform
        sources:
          description: Every reader that contributed to the presence.
          items:
            $ref: '#/components/schemas/v1.PresenceSource'
          title: Sources
          type: array
        is_detection_available:
          description: >-
            True when a detection verdict informed the presence, false when it
            was decided on local readers alone.
          title: Is Detection Available
          type: boolean
      required:
        - kind
        - trust
        - risk_level
        - sources
        - is_detection_available
      title: Presence (v1)
      type: object
    v1.Evidence:
      additionalProperties: false
      description: |-
        One reader's contribution to a decision: what it concluded and the raw
        detail it saw.
      properties:
        source:
          $ref: '#/components/schemas/v1.PresenceSource'
          description: The reader.
        kind:
          $ref: '#/components/schemas/v1.PresenceKind'
          description: What the reader concluded.
        trust:
          $ref: '#/components/schemas/v1.PresenceTrust'
          description: How strongly its evidence backs it.
        detail:
          description: Everything the reader saw, raw, by `source`.
          oneOf:
            - $ref: '#/components/schemas/v1.TransportEvidenceDetail'
            - $ref: '#/components/schemas/v1.WebBotAuthEvidenceDetail'
            - $ref: '#/components/schemas/v1.KyaEvidenceDetail'
            - $ref: '#/components/schemas/v1.TapEvidenceDetail'
            - $ref: '#/components/schemas/v1.DetectionEvidenceDetail'
            - $ref: '#/components/schemas/v1.ChallengeEvidenceDetail'
            - $ref: '#/components/schemas/v1.GenericEvidenceDetail'
          title: Detail
      required:
        - source
        - kind
        - trust
        - detail
      title: Evidence (v1)
      type: object
    v1.IdentityLevel:
      description: |-
        The deepest identity established for a visitor, lowest to highest:
        `L1` the operator is known, `L2` a consistent per-person identifier
        (pseudonymous), `L3` a verified-identity credential.
      enum:
        - L1
        - L2
        - L3
      title: IdentityLevel
      type: string
    v1.Sdk:
      additionalProperties: false
      description: The Baselayer SDK that computed a decision on the merchant's side.
      properties:
        language:
          $ref: '#/components/schemas/v1.SdkLanguage'
          description: The SDK's language.
        version:
          description: The SDK's package version.
          examples:
            - 1.4.0
          maxLength: 32
          title: Version
          type: string
        policy_schema_version:
          description: >-
            The policy feature level the SDK's evaluator implements; below a
            policy's `minimum_policy_schema_version` it runs report-only.
          maximum: 2147483647
          minimum: 1
          title: Policy Schema Version
          type: integer
      required:
        - language
        - version
        - policy_schema_version
      title: Sdk (v1)
      type: object
    v1.EnforcementMode:
      description: Whether a step's decisions are only recorded or also applied.
      enum:
        - report_only
        - enforce
      title: EnforcementMode
      type: string
    v1.AcceptanceDecisionReason:
      description: |-
        Why a decision came out as it did.

        `rule_unsupported` means the SDK met a rule it cannot read: the rule
        never matches and the whole step runs report-only. Values may be added.
      enum:
        - credential_verified
        - credential_refused
        - web_bot_auth_verified
        - tap_verified
        - declared_user_agent
        - ip_range_match
        - detection_scored
        - detection_unavailable
        - presence_conflict
        - challenge_passed
        - no_rule_matched
        - unobserved
        - rule_unsupported
      title: AcceptanceDecisionReason
      type: string
    v1.Requirement:
      additionalProperties: false
      description: |-
        What a `step_up` or `challenge` asks of the visitor: exactly the field
        named by `kind` is set.
      oneOf:
        - properties:
            kind:
              const: scope
            scope:
              not:
                type: 'null'
            identity_level:
              type: 'null'
            challenge:
              type: 'null'
          required:
            - kind
            - scope
        - properties:
            kind:
              const: identity_level
            identity_level:
              not:
                type: 'null'
            scope:
              type: 'null'
            challenge:
              type: 'null'
          required:
            - kind
            - identity_level
        - properties:
            kind:
              const: challenge
            challenge:
              not:
                type: 'null'
            scope:
              type: 'null'
            identity_level:
              type: 'null'
          required:
            - kind
            - challenge
      properties:
        kind:
          $ref: '#/components/schemas/v1.RequirementKind'
          description: What is asked for.
        scope:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: A disclosure scope, as `profile_id#scope`.
          examples:
            - shop-example#checkout
          title: Scope
        identity_level:
          anyOf:
            - $ref: '#/components/schemas/v1.IdentityLevel'
            - type: 'null'
          default: null
          description: The minimum identity level.
        challenge:
          anyOf:
            - $ref: '#/components/schemas/v1.ChallengeKind'
            - type: 'null'
          default: null
          description: The challenge to solve.
      required:
        - kind
      title: Requirement (v1)
      type: object
    v1.ApplicationType:
      enum:
        - sandbox
        - production
      title: ApplicationType
      type: string
    v1.VisitAgent:
      description: |-
        The agent behind a decision or visit, with what Baselayer has seen of it
        so far.
      properties:
        agent_key_thumbprint:
          description: The agent key's RFC 7638 thumbprint.
          title: Agent Key Thumbprint
          type: string
        agent_key_kid:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: The key's `kid`, when it has one.
          title: Agent Key Kid
        agent_key_source:
          $ref: '#/components/schemas/v1.AgentKeySource'
          description: Where the key came from.
        agent_platform:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: The agent platform the key belongs to, when known.
          title: Agent Platform
        first_seen_at:
          description: When this application first saw the agent; its value now.
          format: date-time
          title: First Seen At
          type: string
        visit_count:
          description: The agent's visits to this application; its value now.
          minimum: 0
          title: Visit Count
          type: integer
      required:
        - agent_key_thumbprint
        - agent_key_source
        - first_seen_at
        - visit_count
      title: VisitAgent (v1)
      type: object
    v1.VisitCredential:
      description: |-
        A KYA credential behind a decision or visit, and Baselayer's conclusion
        about it.
      properties:
        credential_id:
          description: The credential's `jti`.
          title: Credential Id
          type: string
        subject:
          description: The credential's pairwise subject DID for this audience.
          title: Subject
          type: string
        verification_level:
          anyOf:
            - $ref: '#/components/schemas/v1.VerificationLevel'
            - type: 'null'
          default: null
          description: >-
            The credential's verification level; null when its keys meet no
            recipe.
        verification:
          $ref: '#/components/schemas/v1.SubjectVerification'
          description: >-
            Whether Baselayer confirmed the credential was issued to this
            subject and unrevoked when the decision was made.
        refusal_reason:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: >-
            Why it was refused, as an error `type`; null unless `verification`
            is `refused`.
          examples:
            - revoked
          title: Refusal Reason
        source:
          $ref: '#/components/schemas/v1.CredentialSource'
          description: >-
            How the credential arrived. Always `presentation` here: a decision
            that checked a session reads the credential of the earlier
            presentation, and its KYA evidence's `arrived_by` says `session`.
        audience:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: >-
            The key-binding JWT's `aud` as presented. Null while `verification`
            is `pending`, when the presentation could not be read
            (`presentation_invalid`), and when the `aud` is not one printable
            string of at most 2048 characters.
          examples:
            - https://shop.example
          title: Audience
      required:
        - credential_id
        - subject
        - verification
        - source
      title: VisitCredential (v1)
      type: object
    v1.SubjectVerification:
      description: |-
        Baselayer's conclusion about a presented credential: still being
        checked, confirmed as issued and unrevoked, or refused.
      enum:
        - pending
        - verified
        - refused
      title: SubjectVerification
      type: string
    v1.VisitDecisionIntegrity:
      description: Baselayer's check on a decision read from its visit.
      properties:
        is_policy_hash_mismatch:
          description: True when the policy the SDK ran differs from the version it named.
          title: Is Policy Hash Mismatch
          type: boolean
      required:
        - is_policy_hash_mismatch
      title: VisitDecisionIntegrity (v1)
      type: object
    v1.VisitSummary:
      description: Where a decision's visit stands.
      properties:
        state:
          $ref: '#/components/schemas/v1.VisitState'
          description: Whether it goes on.
        outcome:
          anyOf:
            - $ref: '#/components/schemas/v1.VisitOutcome'
            - type: 'null'
          default: null
          description: How it ended; null while active.
        first_step:
          anyOf:
            - $ref: '#/components/schemas/v1.VisitStep'
            - type: 'null'
          default: null
          description: The step of its first decision; null when it has none.
        last_step:
          anyOf:
            - $ref: '#/components/schemas/v1.VisitStep'
            - type: 'null'
          default: null
          description: The step of its latest decision; null when it has none.
        started_at:
          description: Its first record.
          format: date-time
          title: Started At
          type: string
        last_seen_at:
          description: Its latest record.
          format: date-time
          title: Last Seen At
          type: string
      required:
        - state
        - started_at
        - last_seen_at
      title: VisitSummary (v1)
      type: object
    v1.PresenceKind:
      description: |-
        What is behind a request at a merchant: a person, an AI agent, a
        crawler, other automation, or not yet known.
      enum:
        - human
        - agent
        - crawler
        - automation
        - unknown
      title: PresenceKind
      type: string
    v1.PresenceTrust:
      description: |-
        How strongly the evidence backs a request's presence, strongest first:
        `credentialed` (a KYA credential), `verified` (a verified signature
        such as Web Bot Auth), `declared` (a User-Agent corroborated by the
        platform's published IP range), `scored` (a detection verdict),
        `unobserved` (the first request of a browser visit, before any
        evidence), `none` (evidence that did not corroborate).
      enum:
        - credentialed
        - verified
        - declared
        - scored
        - unobserved
        - none
      title: PresenceTrust
      type: string
    v1.ConfidenceLevel:
      enum:
        - high
        - medium
        - low
      title: ConfidenceLevel
      type: string
    v1.RiskLevel:
      enum:
        - high
        - medium
        - low
        - no_risk
      title: RiskLevel
      type: string
    v1.PresenceSource:
      description: A reader that contributed to a request's presence. Values may be added.
      enum:
        - transport
        - kya
        - web_bot_auth
        - tap
        - detection
        - challenge
        - edge_hint
        - local
      title: PresenceSource
      type: string
    v1.TransportEvidenceDetail:
      additionalProperties: false
      description: What the transport reader saw on the request, raw.
      properties:
        source:
          const: transport
          title: Source
          type: string
        user_agent:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: The raw User-Agent header.
          title: User Agent
        ip:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: The client IP the merchant trusts.
          title: Ip
        ip_range_platform:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: The platform whose published IP range the address is in.
          title: Ip Range Platform
        ip_range:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: The published range it matched, in CIDR form.
          title: Ip Range
        client_hints:
          additionalProperties:
            type: string
          description: The `Sec-CH-*` request headers, raw.
          title: Client Hints
          type: object
        fetch_metadata:
          additionalProperties:
            type: string
          description: The `Sec-Fetch-*` request headers, raw.
          title: Fetch Metadata
          type: object
        tls_fingerprint:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: The TLS fingerprint, when the runtime exposes it.
          title: Tls Fingerprint
        http_fingerprint:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: The HTTP/2 fingerprint, when the runtime exposes it.
          title: Http Fingerprint
        edge_bot_score:
          anyOf:
            - type: integer
            - type: 'null'
          default: null
          description: A bot score the merchant's edge forwarded, as it sent it.
          title: Edge Bot Score
        is_edge_verified_bot:
          anyOf:
            - type: boolean
            - type: 'null'
          default: null
          description: Whether the merchant's edge flagged a verified bot.
          title: Is Edge Verified Bot
      required:
        - source
      title: TransportEvidenceDetail (v1)
      type: object
    v1.WebBotAuthEvidenceDetail:
      additionalProperties: false
      description: A Web Bot Auth signature the request carried.
      properties:
        source:
          const: web_bot_auth
          title: Source
          type: string
        signing_domain:
          description: The domain that published the signing key.
          title: Signing Domain
          type: string
        key_id:
          description: The signature's `keyid`.
          title: Key Id
          type: string
        thumbprint:
          description: The signing key's RFC 7638 thumbprint.
          title: Thumbprint
          type: string
        is_signature_verified:
          description: Whether the signature verified.
          title: Is Signature Verified
          type: boolean
      required:
        - source
        - signing_domain
        - key_id
        - thumbprint
        - is_signature_verified
      title: WebBotAuthEvidenceDetail (v1)
      type: object
    v1.KyaEvidenceDetail:
      additionalProperties: false
      description: |-
        A KYA credential the request presented or the merchant's session named.
        Never the credential's disclosed claims.
      properties:
        source:
          const: kya
          title: Source
          type: string
        credential_id:
          description: The credential's `jti`.
          title: Credential Id
          type: string
        verification_level:
          anyOf:
            - $ref: '#/components/schemas/v1.VerificationLevel'
            - type: 'null'
          default: null
          description: >-
            The credential's verification level; null when its keys meet no
            recipe.
        cnf_thumbprint:
          description: The thumbprint of the credential's `cnf` key.
          title: Cnf Thumbprint
          type: string
        arrived_by:
          $ref: '#/components/schemas/v1.CredentialSource'
          description: How the credential reached this request.
      required:
        - source
        - credential_id
        - cnf_thumbprint
        - arrived_by
      title: KyaEvidenceDetail (v1)
      type: object
    v1.TapEvidenceDetail:
      additionalProperties: false
      description: A Trusted Agent Protocol signature the request carried.
      properties:
        source:
          const: tap
          title: Source
          type: string
        agent_key_thumbprint:
          description: The agent key's RFC 7638 thumbprint.
          title: Agent Key Thumbprint
          type: string
        consumer_token:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: The consumer token, raw, when one was sent.
          title: Consumer Token
      required:
        - source
        - agent_key_thumbprint
      title: TapEvidenceDetail (v1)
      type: object
    v1.DetectionEvidenceDetail:
      additionalProperties: false
      description: A detection verdict, in Baselayer's vocabulary.
      properties:
        source:
          const: detection
          title: Source
          type: string
        verdict:
          $ref: '#/components/schemas/v1.PresenceKind'
          description: What detection judged the request.
        confidence:
          anyOf:
            - $ref: '#/components/schemas/v1.ConfidenceLevel'
            - type: 'null'
          default: null
          description: How sure it was.
        risk_level:
          $ref: '#/components/schemas/v1.RiskLevel'
          description: The risk it scored.
      required:
        - source
        - verdict
        - risk_level
      title: DetectionEvidenceDetail (v1)
      type: object
    v1.ChallengeEvidenceDetail:
      additionalProperties: false
      description: A challenge served to the browser, and whether it was passed.
      properties:
        source:
          const: challenge
          title: Source
          type: string
        kind:
          $ref: '#/components/schemas/v1.ChallengeKind'
          description: The challenge served.
        is_passed:
          description: Whether the visitor passed it.
          title: Is Passed
          type: boolean
      required:
        - source
        - kind
        - is_passed
      title: ChallengeEvidenceDetail (v1)
      type: object
    v1.GenericEvidenceDetail:
      additionalProperties: true
      description: |-
        A reader's detail with no shape of its own here: its `source` and
        whatever it saw, as it sent it.
      properties:
        source:
          description: The reader that saw it.
          not:
            enum:
              - challenge
              - detection
              - kya
              - tap
              - transport
              - web_bot_auth
          title: Source
          type: string
      required:
        - source
      title: GenericEvidenceDetail (v1)
      type: object
    v1.SdkLanguage:
      description: |-
        The language of the Baselayer SDK that computed a decision.
        Values may be added.
      enum:
        - typescript
        - python
      title: SdkLanguage
      type: string
    v1.RequirementKind:
      description: |-
        What a `step_up` or `challenge` asks for: a disclosure scope, a
        minimum identity level, or a challenge to solve. Values may be added.
      enum:
        - scope
        - identity_level
        - challenge
      title: RequirementKind
      type: string
    v1.ChallengeKind:
      description: |-
        The challenge a `challenge` decision serves to a browser: a
        provider-run browser challenge, interactive or not. Values may be added.
      enum:
        - managed
      title: ChallengeKind
      type: string
    v1.AgentKeySource:
      description: |-
        Where an agent's key came from: a KYA credential, a Web Bot Auth
        signature, or a TAP token. Values may be added.
      enum:
        - kya
        - web_bot_auth
        - tap
      title: AgentKeySource
      type: string
    v1.VerificationLevel:
      description: |-
        Verification level the earned active keys attain, serialized as its
        integer value. Derived from the keys, never asserted.
      enum:
        - 1
        - 2
        - 3
      title: VerificationLevel
      type: integer
    v1.CredentialSource:
      description: >-
        How a credential reached a decision: presented by the agent, or named

        by the merchant's session claims after an earlier presentation. Values
        may

        be added.
      enum:
        - presentation
        - session
      title: CredentialSource
      type: string
    v1.VisitState:
      description: 'Whether a visit is still going: a visit ends after 30 minutes idle.'
      enum:
        - active
        - ended
      title: VisitState
      type: string
    v1.VisitOutcome:
      description: How a visit ended for the merchant. Values may be added.
      enum:
        - converted
        - abandoned
        - blocked
      title: VisitOutcome
      type: string
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key

````

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