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

# Approve pending trades

> Approves trades with status "awaiting_approval" and changes their status to "pending" so they can execute.

Operation ID: post__portfolios_id_pending_trades_approve.



## OpenAPI

````yaml /openapi/itoflow-public.openapi.json post /portfolios/{id}/pending-trades/approve
openapi: 3.1.0
info:
  description: >-
    All Itoflow APIs are experimental and may change without notice. Read-only
    operations marked interactive can be tried from the documentation; the
    others are reference-only.
  title: Itoflow Developer API
  version: 1.0.0
servers:
  - description: Itoflow API
    url: https://api.itoflow.ai
security: []
tags:
  - name: Account
  - name: Billing
  - name: Brokers
  - name: Chat
  - name: Connected MCP servers
  - name: GitHub
  - name: Market data
  - name: Monitors
  - name: Notifications
  - name: Portfolios
  - name: Risk runs
  - name: Sharing and data
  - name: Strategies
paths:
  /portfolios/{id}/pending-trades/approve:
    post:
      tags:
        - Portfolios
      summary: Approve pending trades
      description: >-
        Approves trades with status "awaiting_approval" and changes their status
        to "pending" so they can execute.


        Operation ID: post__portfolios_id_pending_trades_approve.
      operationId: post__portfolios_id_pending_trades_approve
      parameters:
        - description: Resource UUID
          in: path
          name: id
          required: true
          schema:
            description: Resource UUID
            example: 550e8400-e29b-41d4-a716-446655440000
            format: uuid
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApproveTradesRequest'
        required: false
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApproveTradesResponse'
          description: Trades approved
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Invalid parameters
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Ownership required
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Portfolio not found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApprovalConflictResponse'
          description: Approval conflict
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Server error
      security:
        - bearerAuth: []
components:
  schemas:
    ApproveTradesRequest:
      additionalProperties: false
      properties:
        approvalProposal:
          additionalProperties: false
          properties:
            hash:
              minLength: 1
              type: string
            id:
              format: uuid
              type: string
          required:
            - id
            - hash
          type: object
        decisionId:
          format: uuid
          type: string
      type: object
    ApproveTradesResponse:
      properties:
        approved:
          type: integer
        executionMode:
          description: paper | live
          type: string
        message:
          type: string
      required:
        - approved
        - message
        - executionMode
      type: object
    Error:
      properties:
        available:
          description: Optional available amount or value
          type: string
        billing_action:
          $ref: '#/components/schemas/BillingAction'
        code:
          description: Machine-readable error code
          type: string
        currentVersion:
          description: Current server-side version, when relevant
          type: number
        details:
          description: Optional structured error details
        error:
          description: Error type or code
          type: string
        expectedVersion:
          description: Client-provided expected version, when relevant
          type: number
        message:
          description: Human-readable error message
          type: string
        requested:
          description: Optional requested amount or value
          type: string
        usage:
          description: Optional usage metadata for limit errors
      required:
        - error
      type: object
    ApprovalConflictResponse:
      properties:
        code:
          type: string
        error:
          type: string
      required:
        - error
        - code
      type: object
    BillingAction:
      description: Action that resolves a billing-related rejection
      properties:
        href:
          type: string
        kind:
          enum:
            - upgrade
            - payment_method
            - spending_cap
            - billing
          type: string
        label:
          type: string
      required:
        - href
        - label
        - kind
      type: object
  securitySchemes:
    bearerAuth:
      bearerFormat: JWT
      description: Itoflow access token issued for the Itoflow API.
      scheme: bearer
      type: http

````

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