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

# Decide approval

> Decides a pending delegated approval request, exactly once. `approved` resumes the approval workflow, whose step executes the captured call AS THE DECIDER with that user's own credentials and reports the result back to the requester's conversation; `declined` resumes it with the refusal. A session decides as its user; an organization key names the decider with `decided_by` — or sends `decision: "stale"` with no user when the application knows the call is no longer valid (the approver's buttons are then withdrawn by the application). The requester can never decide; when the workflow named eligible users, only they can. A second decision answers 409 with the first outcome.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/approval-requests/{ref}/decide
openapi: 3.1.0
info:
  title: Sidenet API
  version: 1.0.0
  description: >-
    Sidenet HTTP endpoints exposed by the Sidenet Studio. All routes require an
    api key that can be generated through the studio in studio.sidenet.ai.
servers:
  - url: https://api.sidenet.ai
security:
  - bearerAuth: []
paths:
  /v1/approval-requests/{ref}/decide:
    post:
      tags:
        - Approvals
      summary: Decide approval
      description: >-
        Decides a pending delegated approval request, exactly once. `approved`
        resumes the approval workflow, whose step executes the captured call AS
        THE DECIDER with that user's own credentials and reports the result back
        to the requester's conversation; `declined` resumes it with the refusal.
        A session decides as its user; an organization key names the decider
        with `decided_by` — or sends `decision: "stale"` with no user when the
        application knows the call is no longer valid (the approver's buttons
        are then withdrawn by the application). The requester can never decide;
        when the workflow named eligible users, only they can. A second decision
        answers 409 with the first outcome.
      parameters:
        - name: ref
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - decision
              properties:
                decision:
                  type: string
                  enum:
                    - approved
                    - declined
                    - stale
                note:
                  type: string
                  description: Why (shown to the requester).
                decided_by:
                  type: string
                  description: 'Organization key only: the deciding user. Not for `stale`.'
            example:
              decision: approved
              note: Fine, the twin is free those nights.
      responses:
        '200':
          description: >-
            The request after the decision — and after the execution when it was
            approved and the workflow was waiting
          content:
            application/json:
              schema:
                type: object
                properties:
                  request:
                    type: object
                    properties:
                      approval_ref:
                        type: string
                        format: uuid
                        description: The request id, as the agent received it.
                      id:
                        type: string
                        format: uuid
                      org_id:
                        type: string
                        format: uuid
                      agent_id:
                        type: string
                        nullable: true
                        description: The agent that asked.
                      agent_version_id:
                        type: string
                        nullable: true
                      workflow_id:
                        type: string
                        format: uuid
                        description: The approval workflow routing the decision.
                      workflow_version_id:
                        type: string
                        nullable: true
                        description: >-
                          Pinned at capture: a republish never changes an
                          in-flight request.
                      workflow_run_id:
                        type: string
                        nullable: true
                      tool_id:
                        type: string
                      tool_name:
                        type: string
                        description: The captured tool, by its agent-facing name.
                      args:
                        type: object
                        description: >-
                          The captured arguments — exactly what executes on
                          approval. Never edited.
                      summary:
                        type: string
                        nullable: true
                        description: >-
                          The model-written sentence saying what the call does
                          (plain text).
                      metadata:
                        type: object
                        description: >-
                          What the model said about the call, outside its
                          arguments: `approval_reason` (the summary) and
                          `progress_message` (the line the widget showed while
                          the call ran). Context for the approver; never
                          executed.
                        additionalProperties: true
                      requester_user_id:
                        type: string
                      requester_run_id:
                        type: string
                        nullable: true
                      requester_thread_id:
                        type: string
                        nullable: true
                      eligible_user_ids:
                        type: array
                        nullable: true
                        items:
                          type: string
                        description: >-
                          Who may decide, as the workflow named them; null = any
                          org user but the requester.
                      ttl_minutes:
                        type: integer
                        nullable: true
                      expires_at:
                        type: string
                        format: date-time
                        nullable: true
                      status:
                        type: string
                        enum:
                          - pending
                          - approved
                          - declined
                          - expired
                          - stale
                          - executed
                          - failed
                        description: >-
                          pending → approved | declined | expired | stale;
                          approved → executed | failed (| stale after a failed
                          dry run).
                      decided_by_user_id:
                        type: string
                        nullable: true
                      decided_at:
                        type: string
                        format: date-time
                        nullable: true
                      decision_note:
                        type: string
                        nullable: true
                      decision_channel:
                        type: string
                        nullable: true
                      execution_run_id:
                        type: string
                        nullable: true
                      execution_result:
                        description: The tool's result when executed.
                        nullable: true
                      execution_error:
                        type: string
                        nullable: true
                      created_at:
                        type: string
                        format: date-time
                      updated_at:
                        type: string
                        format: date-time
                  resumed:
                    type: string
                    enum:
                      - success
                      - failed
                      - suspended
                      - not_suspended_yet
                    nullable: true
              example:
                request:
                  approval_ref: 7d2e1c54-9a0b-4f3e-8c21-5b6d7e8f9a01
                  id: 7d2e1c54-9a0b-4f3e-8c21-5b6d7e8f9a01
                  org_id: c0a8012e-5f3b-4d1a-9e2f-7b6c5d4e3f21
                  agent_id: 6f1c0f4e-2b7a-4a51-9a2f-0c9d1b3e5a10
                  agent_version_id: a7c3e1d5-6b48-4f92-8a03-e5c9b2d417f6
                  workflow_id: 4c2f9e18-7a63-4d05-b1e8-93a7c0f2d641
                  workflow_version_id: 0e1f2a3b-4c5d-4e6f-8a9b-0c1d2e3f4a5b
                  workflow_run_id: 9b8a7c6d-5e4f-4a3b-9c2d-1e0f9a8b7c6d
                  tool_id: 33befea7-0d3e-4b1a-8f9c-2a1b3c4d5e6f
                  tool_name: pms_modify_reservation
                  args:
                    reservation_id: ABC123
                    arrival: '2026-11-12'
                    departure: '2026-11-14'
                  summary: >-
                    Move reservation ABC123 to 12–14 November as the guest
                    asked.
                  metadata:
                    approval_reason: >-
                      Move reservation ABC123 to 12–14 November as the guest
                      asked.
                    progress_message: Moving the reservation
                  requester_user_id: guest-liaison
                  requester_run_id: trace_01
                  requester_thread_id: wa:prop-1:guest:+4917000000
                  eligible_user_ids:
                    - marta
                    - jonas
                  ttl_minutes: 240
                  expires_at: '2026-10-25T18:00:00Z'
                  status: executed
                  decided_by_user_id: marta
                  decided_at: '2026-10-25T14:20:00Z'
                  decision_note: null
                  decision_channel: null
                  execution_run_id: null
                  execution_result:
                    ok: true
                  execution_error: null
                  created_at: '2026-10-25T14:00:00Z'
                  updated_at: '2026-10-25T14:00:00Z'
                resumed: success
        '400':
          description: Bad body, or a decision that needs a user sent without one
        '403':
          description: The requester, or a user the workflow did not name as eligible
        '404':
          description: Not found
        '409':
          description: Already decided
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  details:
                    type: string
                  request:
                    type: object
                    properties:
                      approval_ref:
                        type: string
                        format: uuid
                        description: The request id, as the agent received it.
                      id:
                        type: string
                        format: uuid
                      org_id:
                        type: string
                        format: uuid
                      agent_id:
                        type: string
                        nullable: true
                        description: The agent that asked.
                      agent_version_id:
                        type: string
                        nullable: true
                      workflow_id:
                        type: string
                        format: uuid
                        description: The approval workflow routing the decision.
                      workflow_version_id:
                        type: string
                        nullable: true
                        description: >-
                          Pinned at capture: a republish never changes an
                          in-flight request.
                      workflow_run_id:
                        type: string
                        nullable: true
                      tool_id:
                        type: string
                      tool_name:
                        type: string
                        description: The captured tool, by its agent-facing name.
                      args:
                        type: object
                        description: >-
                          The captured arguments — exactly what executes on
                          approval. Never edited.
                      summary:
                        type: string
                        nullable: true
                        description: >-
                          The model-written sentence saying what the call does
                          (plain text).
                      metadata:
                        type: object
                        description: >-
                          What the model said about the call, outside its
                          arguments: `approval_reason` (the summary) and
                          `progress_message` (the line the widget showed while
                          the call ran). Context for the approver; never
                          executed.
                        additionalProperties: true
                      requester_user_id:
                        type: string
                      requester_run_id:
                        type: string
                        nullable: true
                      requester_thread_id:
                        type: string
                        nullable: true
                      eligible_user_ids:
                        type: array
                        nullable: true
                        items:
                          type: string
                        description: >-
                          Who may decide, as the workflow named them; null = any
                          org user but the requester.
                      ttl_minutes:
                        type: integer
                        nullable: true
                      expires_at:
                        type: string
                        format: date-time
                        nullable: true
                      status:
                        type: string
                        enum:
                          - pending
                          - approved
                          - declined
                          - expired
                          - stale
                          - executed
                          - failed
                        description: >-
                          pending → approved | declined | expired | stale;
                          approved → executed | failed (| stale after a failed
                          dry run).
                      decided_by_user_id:
                        type: string
                        nullable: true
                      decided_at:
                        type: string
                        format: date-time
                        nullable: true
                      decision_note:
                        type: string
                        nullable: true
                      decision_channel:
                        type: string
                        nullable: true
                      execution_run_id:
                        type: string
                        nullable: true
                      execution_result:
                        description: The tool's result when executed.
                        nullable: true
                      execution_error:
                        type: string
                        nullable: true
                      created_at:
                        type: string
                        format: date-time
                      updated_at:
                        type: string
                        format: date-time
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Organization API key, generated in studio.sidenet.ai. Backend only —
        never in a browser.

````

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