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

# Post api approve

> POST TRC-20 approve status and unsigned approve transaction (same as POST /api/approve)



## OpenAPI

````yaml /openapi-tron.json post /api/{blockchain}/approve
openapi: 3.1.0
info:
  title: ggp-tron-swap
  description: ''
  license:
    name: ''
  version: 0.1.0
servers:
  - url: https://swap.ggp.gg
security: []
tags:
  - name: swap
    description: Swap API endpoints
  - name: approve
    description: TRC-20 approve endpoints
  - name: tokens
    description: Tokens API endpoints
  - name: healthcheck
    description: Health Check API endpoints
paths:
  /api/{blockchain}/approve:
    post:
      tags:
        - tron
      description: >-
        POST TRC-20 approve status and unsigned approve transaction (same as
        POST /api/approve)
      operationId: create_approve
      parameters:
        - name: blockchain
          in: path
          required: true
          schema:
            type: string
            description: Blockchain served by this service.
            enum:
              - tron
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApproveRequest'
        required: true
      responses:
        '200':
          description: Approve status + optional unsigned tx
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApproveResponse'
        '400':
          description: Bad request
components:
  schemas:
    ApproveRequest:
      type: object
      required:
        - token
        - owner
      properties:
        amount:
          type:
            - string
            - 'null'
          description: >-
            Amount to approve in smallest units (decimal string). Omit for
            unlimited.
        checkAllowance:
          type: boolean
          description: >-
            If true (default), check current allowance and skip approval when
            already

            sufficient. Set false to always return an approve tx.
        owner:
          type: string
          description: Owner wallet address (base58) that will sign the approve.
        token:
          type: string
          description: >-
            TRC-20 token to approve (base58 or hex). Native TRX needs no
            approval.
    ApproveResponse:
      type: object
      required:
        - spender
        - alreadyApproved
      properties:
        alreadyApproved:
          type: boolean
          description: True when existing allowance already covers the requested amount.
        spender:
          type: string
          description: The spender (router/wrapper) being approved.
        unsignedTx:
          description: >-
            Unsigned approve transaction to sign & broadcast. Null when already
            approved.

````

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