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

# Hold a decision (bearer twin)

> Holds an approved proposal before it ran, with the caller's reason: a held proposal is run by nothing - neither the cost autopilot nor execute - until it is released or set aside. Allowed from approved. The cost autopilot's pre-notice links here (ankra-cozgu.2.2.1). Gated on the area's permission: billing.manage for cost, security.manage for security. The token stands in for the browser route's CSRF double-submit. Bearer-PAT twin of the browser route of the same name under /org; the console's session cookie is not accepted here and the browser route answers a token with a login redirect.



## OpenAPI

````yaml https://platform.ankra.app/openapi.json post /api/v1/org/decisions/{decision_id}/hold
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: https://platform.ankra.app
security: []
tags:
  - name: Clusters
    description: Create, inspect and manage clusters, and the stacks deployed on them.
  - name: Managed Clusters
    description: Provider-managed control planes, driven through one common surface.
  - name: Imported Clusters
    description: Clusters that already existed and were connected to Ankra.
  - name: Cluster Access
    description: Kubeconfigs, service-account tokens and per-cluster access grants.
  - name: Kubernetes
    description: Read and act on the Kubernetes objects inside a cluster.
  - name: AWS Clusters
    description: >-
      Provision and manage self-managed k3s / kubeadm clusters on AWS EC2 in
      your own VPC.
  - name: DigitalOcean Clusters
    description: Provision and manage DigitalOcean Kubernetes clusters.
  - name: Hetzner Clusters
    description: Provision and manage Hetzner Kubernetes clusters.
  - name: OVH Clusters
    description: Provision and manage OVH Kubernetes clusters.
  - name: Scaleway Clusters
    description: Provision and manage Scaleway Kapsule clusters.
  - name: UpCloud Clusters
    description: Provision and manage UpCloud Kubernetes clusters.
  - name: Applications
    description: Deploy, configure and observe applications across the fleet.
  - name: Backups
    description: >-
      Backup vaults, restore points, protection posture and captures for stacks
      and application deployments; a completed capture is not a verified
      restore.
  - name: Stack Profiles
    description: Reusable stack definitions, their versions and sharing.
  - name: Services
    description: >-
      Versioned service packages and explicit sharing. Runtime admission is
      separate from publication.
  - name: Charts
    description: Browse the chart catalogue behind stacks and addons.
  - name: Helm
    description: Helm registries, credentials and the charts they expose.
  - name: Executions
    description: Long-running platform executions and their jobs.
  - name: Operations
    description: Cancel in-flight cluster operations and their jobs.
  - name: Chat
    description: Conversational sessions, plans and confirmable actions.
  - name: AI Agent Runs
    description: Autonomous agent runs and their outcomes.
  - name: AI Tickets
    description: The AI ticket board, its sync connections and settings.
  - name: AI Playbooks
    description: Reusable playbooks the AI lanes execute.
  - name: AI Conditions
    description: Conditions that gate AI autonomy.
  - name: AI Remediation
    description: >-
      The organisation's auto-remediation policy: what the AI lanes may fix by
      themselves, and who approves the rest.
  - name: AI Engineering Handoffs
    description: Work the AI lanes escalate to a human engineer.
  - name: AI Environment
    description: The environment and base stacks AI demos deploy into.
  - name: Security
    description: Findings, advisories, SBOMs, compliance and posture.
  - name: Cost
    description: Cluster and fleet cost, rate cards and cost settings.
  - name: Decisions
    description: >-
      The decision ledger behind the Security and Cost queues: proposals a
      surface computed, the approve and set-aside decisions people took on them,
      and the receipts of running them.
  - name: Billing
    description: Subscription and spend caps.
  - name: Organisation
    description: Members, invitations, audit logs and organisation settings.
  - name: Account Tokens
    description: Personal access tokens for the API and CLI.
  - name: Credentials
    description: The shared credential store.
  - name: AWS Credentials
    description: >-
      AWS credentials: access keys or CloudFormation-onboarded STS roles for
      cost, EKS and self-managed provisioning.
  - name: Azure Credentials
    description: Azure credentials and SSH keys.
  - name: DigitalOcean Credentials
    description: DigitalOcean credentials and SSH keys.
  - name: Hetzner Credentials
    description: Hetzner credentials and SSH keys.
  - name: OVH Credentials
    description: OVH credentials and SSH keys.
  - name: Scaleway Credentials
    description: Scaleway credentials.
  - name: UpCloud Credentials
    description: UpCloud credentials and SSH keys.
  - name: Data Source Credentials
    description: Credentials for metrics and log sources.
  - name: DNS Credentials
    description: Credentials for DNS providers.
  - name: Object Storage Buckets
    description: >-
      Buckets Ankra creates and manages on an organisation's own provider
      credentials.
  - name: DNS
    description: DNS zones and records, including custom organisation zones.
  - name: Cloudflare
    description: Cloudflare domains and the credentials behind them.
  - name: Variables
    description: Organisation- and cluster-scoped variables.
  - name: SOPS
    description: Encrypt and decrypt values with the organisation SOPS config.
  - name: Alerts
    description: Alert integrations and ingest credentials.
  - name: Notifications
    description: Notification routes and their delivery targets.
  - name: Support
    description: Support tickets.
  - name: AI Settings
    description: Organisation AI provider, model catalog and per-function model settings
paths:
  /api/v1/org/decisions/{decision_id}/hold:
    post:
      tags:
        - Decisions
      summary: Hold a decision (bearer twin)
      description: >-
        Holds an approved proposal before it ran, with the caller's reason: a
        held proposal is run by nothing - neither the cost autopilot nor execute
        - until it is released or set aside. Allowed from approved. The cost
        autopilot's pre-notice links here (ankra-cozgu.2.2.1). Gated on the
        area's permission: billing.manage for cost, security.manage for
        security. The token stands in for the browser route's CSRF
        double-submit. Bearer-PAT twin of the browser route of the same name
        under /org; the console's session cookie is not accepted here and the
        browser route answers a token with a login redirect.
      operationId: hold_decision_api_v1_org_decisions_hold_post
      parameters:
        - description: PAT organisation override.
          in: header
          name: x-ankra-organisation-id
          required: false
          schema:
            type: string
        - in: path
          name: decision_id
          required: true
          schema:
            format: uuid
            title: Decision Id
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DecisionNoteRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DecisionProposal'
          description: Successful response
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContractDetailError'
          description: >-
            Missing or malformed Authorization header, or business validation
            error
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContractDetailError'
          description: Unknown, expired, or revoked API token
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContractDetailError'
          description: >-
            Permission denied: the area's permission (billing.manage for cost,
            security.manage for security) is required, or the token may not use
            this surface
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContractDetailError'
          description: Decision proposal not found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContractDetailError'
          description: >-
            The proposal's status does not allow a hold, or it changed while the
            request was in flight
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Request validation error
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContractDetailError'
          description: Internal server error
      security:
        - BearerAuth: []
components:
  schemas:
    DecisionNoteRequest:
      description: Optional body of the approve and set-aside routes.
      properties:
        note:
          maxLength: 2000
          type: string
      title: DecisionNoteRequest
      type: object
    DecisionProposal:
      description: >-
        One proposal of the decision ledger: what it is about, what the surface
        computed, where it stands, who decided, and what running it did.
      properties:
        id:
          type: string
          format: uuid
        area:
          description: >-
            security or cost; decides which permission approving and running it
            takes.
          enum:
            - security
            - cost
          type: string
        kind:
          description: >-
            What the proposal does, e.g. addon_upgrade, image_rebuild,
            right_size, off_hours_schedule, waste_cleanup. Only kinds with a
            platform operation are executable.
          type: string
        subject:
          additionalProperties: true
          description: >-
            Identity of what the proposal is about (finding_id, cluster_id,
            addon_name, waste_finding_id ...), one document per kind.
          type: object
        summary:
          type: string
        plan:
          additionalProperties: true
          description: >-
            The steps the surface computed. plan.parameters is the machine half
            the executable kinds are called with: addon_upgrade takes
            {cluster_id, addon_name, chart_version}; off_hours_schedule takes
            {cluster_id, timezone, schedules: [{action, stop_mode,
            cron_expression}]}; waste_cleanup takes {waste_finding_id}.
          type: object
        evidence:
          additionalProperties: true
          type: object
        status:
          enum:
            - proposed
            - approved
            - held
            - set_aside
            - running
            - succeeded
            - failed
            - superseded
          type: string
        source:
          description: Which surface computed it (default "surface").
          type: string
        created_by:
          anyOf:
            - type: string
            - type: 'null'
          description: Ankra user id of whoever posted it.
        decided_by:
          anyOf:
            - type: string
            - type: 'null'
          description: Ankra user id of the last approve or set-aside.
        decided_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
        decision_note:
          anyOf:
            - type: string
            - type: 'null'
        operation_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          description: >-
            The platform execution a run dispatched, to watch under
            /api/v1/org/executions.
        receipt:
          anyOf:
            - $ref: '#/components/schemas/DecisionReceipt'
            - type: 'null'
        dedupe_key:
          type: string
        executable:
          description: >-
            Whether the platform has an operation for the kind, so a surface
            offers "run" only where running can work.
          type: boolean
        expected_monthly_cents:
          anyOf:
            - type: integer
            - type: 'null'
          description: >-
            What the surface expected a cost proposal to save per month, in USD
            cents, recorded when it succeeded:
            plan.parameters.expected_monthly_cents, else
            evidence.expected_monthly_cents, each with an optional sibling
            expected_currency (ISO code, default usd) converted to USD. Null
            when the proposal declared none, has not run, or is not a cost
            proposal; never zero for an unknown.
        baseline_monthly_cents:
          anyOf:
            - type: integer
            - type: 'null'
          description: >-
            The subject cluster's run rate before the change: the mean
            monthly_cost_estimate_cents of its cost snapshots over
            baseline_window, in USD cents. Null until a measurement opens, or
            when no snapshot covered the window.
        baseline_window:
          anyOf:
            - $ref: '#/components/schemas/DecisionTimeWindow'
            - type: 'null'
          description: >-
            The 24 hours before the change was dispatched, [from, to); to is
            when the change ran.
        measured_monthly_cents:
          anyOf:
            - type: integer
            - type: 'null'
          description: >-
            What the change measurably saved per month, in USD cents:
            baseline_monthly_cents minus the cluster's 24h mean run rate seven
            days after the change. Negative when the run rate rose. Null unless
            measurement_status is measured.
        measured_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          description: >-
            When the measurement loop wrote its verdict (measured, unmeasured or
            reverted).
        measurement_status:
          description: >-
            Where the measured outcome stands: not_applicable (not a cost
            proposal, not run, or no cluster to measure), pending (inside the
            seven-day verification window), measured, unmeasured_coverage_moved
            (the cluster was not priced the same way on both sides),
            unmeasured_no_snapshots (nothing to read on one side, or the cluster
            is no longer priced), reverted (the change was undone inside the
            window). The activity feed's measured / unmeasured / reverted event
            carries the reason.
          enum:
            - not_applicable
            - pending
            - measured
            - unmeasured_coverage_moved
            - unmeasured_no_snapshots
            - reverted
          type: string
        verify_until:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          description: >-
            When the verification window closes: seven days after the change
            ran. The measurement loop settles the row once it has passed.
        subject_cluster_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          description: >-
            The cluster whose cost snapshots measure the change:
            plan.parameters.cluster_id, else subject.cluster_id.
        verification_status:
          description: >-
            Where a right-size's seven-day verification stands
            (ankra-cozgu.1.2): verifying until every day is judged, passed when
            all seven were clear, failed on the first day any node of the group
            ran p95 CPU over 60% or p95 memory over 70% of capacity (a
            right_size_rollback proposal is filed), unverified_no_metrics when
            no day tripped but at least one could not be read. not_applicable
            for every other proposal.
          enum:
            - not_applicable
            - verifying
            - passed
            - failed
            - unverified_no_metrics
          type: string
        verification_days:
          description: >-
            The judged verification days in order, empty until the first 24h
            after the dispatch has been read.
          items:
            $ref: '#/components/schemas/DecisionVerificationDay'
          type: array
        rollback_of:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          description: >-
            On a right_size_rollback: the right-size it undoes, which reads
            measurement_status reverted once this rollback succeeds.
        parent_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          description: >-
            On a wave of a right-size ladder (a right_size proposal with source
            ladder): the right_size_ladder proposal it belongs to. Null for
            every other proposal.
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        run_after:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          description: >-
            The earliest time the cost autopilot may run a proposal it approved
            itself - the end of its pre-notice window, in which a person may
            hold it; null for a proposal a person approved, which a person runs.
      required:
        - id
        - area
        - kind
        - subject
        - summary
        - plan
        - evidence
        - status
        - source
        - created_by
        - decided_by
        - decided_at
        - decision_note
        - operation_id
        - receipt
        - dedupe_key
        - executable
        - expected_monthly_cents
        - baseline_monthly_cents
        - baseline_window
        - measured_monthly_cents
        - measured_at
        - measurement_status
        - verify_until
        - subject_cluster_id
        - verification_status
        - verification_days
        - rollback_of
        - parent_id
        - created_at
        - updated_at
        - run_after
      title: DecisionProposal
      type: object
    ContractDetailError:
      example:
        detail: Cluster not found
      properties:
        detail:
          oneOf:
            - type: string
            - additionalProperties: true
              properties: {}
              type: object
      required:
        - detail
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    DecisionReceipt:
      description: >-
        The record of running a proposal: who ran it and when, the platform
        operation it became, the steps taken and how it ended.
      properties:
        claimed_at:
          type: string
          format: date-time
        executed_by:
          type: string
        dispatched_at:
          type: string
          format: date-time
        operation_id:
          type: string
          format: uuid
        completed_at:
          type: string
          format: date-time
        execution_status:
          description: >-
            The platform execution's terminal status once a read settled it
            (success, failed, critical, cancelled).
          type: string
        steps:
          items:
            $ref: '#/components/schemas/DecisionReceiptStep'
          type: array
      required:
        - steps
      title: DecisionReceipt
      type: object
    DecisionTimeWindow:
      description: A closed-open [from, to) interval.
      properties:
        from:
          type: string
          format: date-time
        to:
          type: string
          format: date-time
      required:
        - from
        - to
      title: DecisionTimeWindow
      type: object
    DecisionVerificationDay:
      description: >-
        One judged 24h day of a right-size's verification, counted from the
        dispatch.
      properties:
        day:
          description: 1 for the 24h after the dispatch, up to 7.
          type: integer
        from:
          type: string
          format: date-time
        to:
          type: string
          format: date-time
        state:
          description: >-
            breach when any node of the group ran over a threshold, unknown when
            any node reported nothing and none breached, else clear.
          enum:
            - clear
            - breach
            - unknown
          type: string
        cpu_p95_share:
          anyOf:
            - type: number
            - type: 'null'
          description: >-
            The highest p95 CPU share of capacity among the nodes that reported
            (0.61 is 61%); null when none reported CPU.
        memory_p95_share:
          anyOf:
            - type: number
            - type: 'null'
          description: >-
            The highest p95 memory share of capacity among the nodes that
            reported; null when none reported memory.
        hottest_node:
          description: The node furthest past (or closest to) its threshold.
          type: string
        nodes:
          type: integer
        reporting:
          description: >-
            How many of the nodes the metrics store answered for on both
            resources.
          type: integer
        reason:
          description: Why the day is unknown, or what tripped it.
          type: string
      required:
        - day
        - from
        - to
        - state
        - cpu_p95_share
        - memory_p95_share
        - nodes
        - reporting
      title: DecisionVerificationDay
      type: object
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
    DecisionReceiptStep:
      properties:
        name:
          type: string
        outcome:
          enum:
            - dispatched
            - succeeded
            - failed
            - refused
            - error
            - abandoned
          type: string
        detail:
          type: string
        evidence:
          additionalProperties: true
          type: object
      required:
        - name
        - outcome
      title: DecisionReceiptStep
      type: object
  securitySchemes:
    BearerAuth:
      bearerFormat: PAT
      scheme: bearer
      type: http

````