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

# Prepare Morpho Withdraw

> Builds redeem-all or partial withdraw calldata from a Morpho vault for client signing.

Not available to API keys.

## OpenAPI

````yaml api-reference/openapi.json POST /tga/prepare-morpho-withdraw
openapi: 3.1.0
info:
  title: Toku API
  version: 1.0.0
servers:
  - url: https://api.toku.com
security:
  - bearerAuth: []
paths:
  /tga/prepare-morpho-withdraw:
    post:
      operationId: prepareMorphoWithdraw
      summary: Prepare Morpho Withdraw
      description: >-
        Builds redeem-all or partial withdraw calldata from a Morpho vault for
        client signing.


        Not available to API keys.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PrepareMorphoWithdrawRequest'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PrepareMorphoWithdrawResponse'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not found
        '409':
          description: Conflict
        '429':
          description: Response 429
components:
  schemas:
    PrepareMorphoWithdrawRequest:
      type: object
      properties:
        vaultAddress:
          type: string
          pattern: ^0x[a-fA-F0-9]{40}$
        walletAddress:
          type: string
          pattern: ^0x[a-fA-F0-9]{40}$
        withdrawAmount:
          type: string
          description: >-
            NOTE(ck): a .refine() rule is not mirrored here; TGA still enforces
            it
        redeemAll:
          type: boolean
          default: false
        chainId:
          type: integer
          description: >-
            NOTE(ck): a .refine() rule is not mirrored here; TGA still enforces
            it
      required:
        - vaultAddress
        - walletAddress
        - chainId
    PrepareMorphoWithdrawResponse:
      type: object
      properties:
        withdrawTx:
          type: object
          properties:
            to:
              type: string
            data:
              type: string
            chainId:
              type: integer
          required:
            - to
            - data
            - chainId
      required:
        - withdrawTx
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
````
