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

# Withdraw coins

> Converts coins to BRL. Only the deposited pool is withdrawable (bonus is not).



## OpenAPI

````yaml /openapi.json post /v1/accounts/me/withdraw
openapi: 3.1.0
info:
  title: clipping API
  version: 1.0.0
  description: >-
    The clipping API — one API under /v1, two credentials:


    - **API key** (`Authorization: Bearer ck_live_…`): for integrators. Each
    call draws a flat platform fee from the key's account balance, plus the real
    cost of external calls (pass-through). No balance → HTTP 402. Create a key
    at https://clipping.cc/account.

    - **Session JWT** (`Authorization: Bearer <jwt>` from /v1/auth/login): used
    by the web app. No platform fee (only external-call pass-through).


    Either credential hits the same endpoints. Routes marked *admin only*
    require an admin role.
servers:
  - url: https://api.clipping.cc
    description: production
security:
  - ApiKeyAuth: []
  - BearerAuth: []
tags:
  - name: auth
    description: session auth, profile and API key management
  - name: accounts
    description: balance, ledger, deposits and withdrawals
  - name: items
    description: monitored sources (channels, videos, etc.)
  - name: collections
    description: collections of monitored sources
  - name: videos
    description: catalogued videos
  - name: tools
    description: tool catalog, transcripts and documents
  - name: search
    description: semantic search and tag cloud over your library
  - name: discover
    description: public catalog (collections, reporters, users)
  - name: reporters
    description: 'reporters: CRUD, clone, collections, subscriptions, run'
  - name: workflows
    description: a reporter's workflows and their steps
  - name: schedules
    description: a reporter's schedules and runs
  - name: executions
    description: workflow execution tracking
  - name: events
    description: the user's event feed
  - name: logs
    description: 'external call audit: OpenAI, YouTube, transcriber'
  - name: realtime
    description: WebSocket hub for live notifications
  - name: admin
    description: 'admin only: other users'' accounts and economy stats'
  - name: treasury
    description: 'admin only: platform cash desk'
paths:
  /v1/accounts/me/withdraw:
    post:
      tags:
        - accounts
      summary: Withdraw coins
      description: >-
        Converts coins to BRL. Only the deposited pool is withdrawable (bonus is
        not).
      operationId: withdraw
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AmountCoins'
      responses:
        '201':
          description: Withdrawn.
          content:
            application/json:
              schema:
                type: object
                properties:
                  transaction:
                    $ref: '#/components/schemas/Transaction'
                  account:
                    $ref: '#/components/schemas/Account'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
components:
  schemas:
    AmountCoins:
      type: object
      required:
        - amount_coins
      properties:
        amount_coins:
          type: number
          minimum: 0
        description:
          type: string
    Transaction:
      type: object
      additionalProperties: true
      properties:
        txn_id:
          type: string
        user_id:
          type: string
        kind:
          type: string
        amount_microcoins:
          type: integer
        ref_type:
          type: string
        description:
          type:
            - string
            - 'null'
        created_at:
          type: integer
    Account:
      type: object
      additionalProperties: true
      properties:
        user_id:
          type: string
        balance_microcoins:
          type: integer
        balance_coins:
          type: number
        total_credited:
          type: integer
        total_debited:
          type: integer
        withdrawable_microcoins:
          type: integer
        withdrawable_coins:
          type: number
    Error:
      type: object
      properties:
        erro:
          type: string
      required:
        - erro
  responses:
    BadRequest:
      description: Invalid request.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Missing or invalid API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    PaymentRequired:
      description: Insufficient balance on the API key account.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: ck_live_…
      description: 'API key: Authorization: Bearer ck_live_…'
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: 'Session JWT from /v1/auth/login: Authorization: Bearer <jwt>'

````