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

# Get a decision

> Type, declared context fields and options of the live version — what a connector needs to build dynamic fields.



## OpenAPI

````yaml /openapi.yaml get /decisions/{slug}
openapi: 3.1.0
info:
  title: Branch Pilot API
  version: '1.0'
  summary: The AI decision layer for workflows.
  description: >
    One endpoint per decision. Send the input your decision expects, get a typed
    answer with

    calibrated probabilities, a confidence and the engine that produced it.


    Personal data in declared PII fields (and detected in free text) is
    pseudonymized before

    any model call; only the pseudonymized input is logged.
  contact:
    email: hello@branchpilot.ai
  termsOfService: https://branchpilot.ai/terms
servers:
  - url: https://api.branchpilot.ai/v1
    description: Production
security:
  - apiKey: []
tags:
  - name: Decide
  - name: Runs
  - name: Decisions
paths:
  /decisions/{slug}:
    get:
      tags:
        - Decisions
      summary: Get a decision
      description: >-
        Type, declared context fields and options of the live version — what a
        connector needs to build dynamic fields.
      operationId: getDecision
      parameters:
        - $ref: '#/components/parameters/slug'
      responses:
        '200':
          description: The decision.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DecisionDetail'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  parameters:
    slug:
      name: slug
      in: path
      required: true
      description: Slug of the decision, as shown in the app.
      schema:
        type: string
        pattern: ^[a-z0-9]+(-[a-z0-9]+)*$
        example: lead-routing
  schemas:
    DecisionDetail:
      allOf:
        - $ref: '#/components/schemas/DecisionSummary'
        - type: object
          properties:
            confidence_threshold:
              type: number
            uncertainty_policy:
              type: string
              enum:
                - uncertain_branch
                - human_review
            context:
              type:
                - object
                - 'null'
              properties:
                description:
                  type: string
                fields:
                  type: array
                  items:
                    type: object
                    properties:
                      name:
                        type: string
                      type:
                        type: string
                        enum:
                          - string
                          - number
                          - boolean
                          - object
                          - array
                      required:
                        type: boolean
                      pii:
                        type: boolean
                example: {}
            instructions:
              type:
                - string
                - 'null'
            options:
              type: array
              items:
                type: string
              description: Route decisions — option keys.
            levels:
              type: array
              items:
                type: string
              description: Score decisions — level labels, lowest first.
            labels:
              type: array
              items:
                type: string
              description: Classify decisions — label keys.
    DecisionSummary:
      type: object
      properties:
        slug:
          type: string
        name:
          type: string
        description:
          type: string
        type:
          type: string
          enum:
            - route
            - score
            - classify
        live_version:
          type:
            - integer
            - 'null'
        updated_at:
          type: string
          format: date-time
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
            message:
              type: string
            details: {}
  responses:
    Unauthorized:
      description: Missing, invalid or revoked API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: Unknown resource.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: An API key created in Settings → API keys (`bp_live_…` or `bp_test_…`).

````