Oumla Ltd withdraw API

The withdraw API from Oumla Ltd — 1 operation(s) for withdraw.

OpenAPI Specification

oumla-ltd-withdraw-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: Oumla Core Server addresses withdraw API
  description: 'Core API. Errors, request and response are documented per endpoint. Error response shape: code, category, message, statusCode, path, timestamp, requestId.'
  version: '1.0'
  contact: {}
servers:
- url: https://sandbox.oumla.com
  description: Mainnet
  x-fern-server-name: Mainnet
tags:
- name: withdraw
paths:
  /api/v1/withdraw:
    post:
      description: Initiate a withdrawal. Returns pending status; supports BTC, tBTC, ETH, tETH.
      operationId: createWithdraw
      parameters:
      - $ref: '#/components/parameters/SdkVersionHeader'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateWithdrawRequestBodyDTO'
      responses:
        '200':
          description: Withdraw created (pending)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateWithdrawResponseBodyDTO'
        '400':
          description: 'Bad request or validation failed.


            **Applicable error codes and client messages**


            The response body contains one of the following error codes and the corresponding client-facing message.


            | Code | Client message |

            |------|----------------|

            | ERR-010 | The request could not be processed. |

            | ERR-236 | Insufficient balance for this action. |

            | ERR-206 | Transaction data is invalid. |

            | ERR-226 | No available funds for this transaction. |'
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ApiErrorResponseDto'
                properties:
                  code:
                    type: string
                    enum:
                    - ERR_010
                    - ERR_236
                    - ERR_206
                    - ERR_226
                    description: 'One of: ERR-010: The request could not be processed.; ERR-236: Insufficient balance for this action.; ERR-206: Transaction data is invalid.; ERR-226: No available funds for this transaction.'
                  message:
                    type: string
                    description: Client-facing message for this error code (see table above).
                example:
                  code: ERR_010
                  message: The request could not be processed.
                  category: VALIDATION
                  statusCode: 400
                  path: /api/v1/example
                  timestamp: '2025-02-20T12:00:00.000Z'
                  requestId: req-example-id
        '401':
          description: 'Unauthorized – invalid or missing token.


            **Applicable error codes and client messages**


            The response body contains one of the following error codes and the corresponding client-facing message.


            | Code | Client message |

            |------|----------------|

            | ERR-008 | You need to sign in to continue. |

            | ERR-011 | Your session is invalid or expired. Please sign in again. |'
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ApiErrorResponseDto'
                properties:
                  code:
                    type: string
                    enum:
                    - ERR_008
                    - ERR_011
                    description: 'One of: ERR-008: You need to sign in to continue.; ERR-011: Your session is invalid or expired. Please sign in again.'
                  message:
                    type: string
                    description: Client-facing message for this error code (see table above).
                example:
                  code: ERR_008
                  message: You need to sign in to continue.
                  category: AUTHORIZATION
                  statusCode: 401
                  path: /api/v1/example
                  timestamp: '2025-02-20T12:00:00.000Z'
                  requestId: req-example-id
        '403':
          description: 'Forbidden – insufficient permissions.


            **Applicable error codes and client messages**


            The response body contains one of the following error codes and the corresponding client-facing message.


            | Code | Client message |

            |------|----------------|

            | ERR-009 | You don''t have permission to do that. |

            | ERR-410 | Error occurred |'
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ApiErrorResponseDto'
                properties:
                  code:
                    type: string
                    enum:
                    - ERR_009
                    - ERR_410
                    description: 'One of: ERR-009: You don''t have permission to do that.; ERR-410: Error occurred'
                  message:
                    type: string
                    description: Client-facing message for this error code (see table above).
                example:
                  code: ERR_009
                  message: You don't have permission to do that.
                  category: AUTHORIZATION
                  statusCode: 403
                  path: /api/v1/example
                  timestamp: '2025-02-20T12:00:00.000Z'
                  requestId: req-example-id
        '404':
          description: 'Resource not found.


            **Applicable error codes and client messages**


            The response body contains one of the following error codes and the corresponding client-facing message.


            | Code | Client message |

            |------|----------------|

            | ERR-096 | Address not found. |

            | ERR-888 | Wallet not found. |

            | ERR-216 | Account balance could not be retrieved. |'
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ApiErrorResponseDto'
                properties:
                  code:
                    type: string
                    enum:
                    - ERR_096
                    - ERR_888
                    - ERR_216
                    description: 'One of: ERR-096: Address not found.; ERR-888: Wallet not found.; ERR-216: Account balance could not be retrieved.'
                  message:
                    type: string
                    description: Client-facing message for this error code (see table above).
                example:
                  code: ERR_096
                  message: Address not found.
                  category: RESOURCE
                  statusCode: 404
                  path: /api/v1/example
                  timestamp: '2025-02-20T12:00:00.000Z'
                  requestId: req-example-id
        '500':
          description: 'Internal server error.


            **Applicable error codes and client messages**


            The response body contains one of the following error codes and the corresponding client-facing message.


            | Code | Client message |

            |------|----------------|

            | ERR-019 | Something went wrong on our side. |

            | ERR-036 | Failed to send transaction. |

            | ERR-999 | An unexpected error occurred. Please try again. |'
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ApiErrorResponseDto'
                properties:
                  code:
                    type: string
                    enum:
                    - ERR_019
                    - ERR_036
                    - ERR_999
                    description: 'One of: ERR-019: Something went wrong on our side.; ERR-036: Failed to send transaction.; ERR-999: An unexpected error occurred. Please try again.'
                  message:
                    type: string
                    description: Client-facing message for this error code (see table above).
                example:
                  code: ERR_019
                  message: Something went wrong on our side.
                  category: SYSTEM
                  statusCode: 500
                  path: /api/v1/example
                  timestamp: '2025-02-20T12:00:00.000Z'
                  requestId: req-example-id
      security:
      - x-api-key: []
      summary: Withdraw
      tags:
      - withdraw
components:
  schemas:
    ApiErrorResponseDto:
      type: object
      properties:
        message:
          type: string
          description: Human-readable error message for the client (see ErrorClientMessage per code)
          example: Organization not found.
        code:
          type: string
          enum:
          - ERR_000
          - ERR_001
          - ERR_002
          - ERR_003
          - ERR_006
          - ERR_008
          - ERR_009
          - ERR_010
          - ERR_011
          - ERR_012
          - ERR_013
          - ERR_014
          - ERR_015
          - ERR_016
          - ERR_017
          - ERR_018
          - ERR_019
          - ERR_020
          - ERR_021
          - ERR_022
          - ERR_888
          - ERR_999
          - ERR_023
          - ERR_026
          - ERR_036
          - ERR_046
          - ERR_056
          - ERR_066
          - ERR_068
          - ERR_067
          - ERR_076
          - ERR_086
          - ERR_096
          - ERR_106
          - ERR_116
          - ERR_126
          - ERR_136
          - ERR_146
          - ERR_147
          - ERR_156
          - ERR_166
          - ERR_176
          - ERR_186
          - ERR_196
          - ERR_200
          - ERR_201
          - ERR_202
          - ERR_203
          - ERR_204
          - ERR_205
          - ERR_206
          - ERR_207
          - ERR_208
          - ERR_209
          - ERR_210
          - ERR_211
          - ERR_212
          - ERR_213
          - ERR_214
          - ERR_215
          - ERR_216
          - ERR_217
          - ERR_226
          - ERR_236
          - ERR_237
          - ERR_238
          - ERR_239
          - ERR_240
          - ERR_241
          - ERR_242
          - ERR_246
          - ERR_256
          - ERR_266
          - ERR_276
          - ERR_286
          - ERR_296
          - ERR_300
          - ERR_301
          - ERR_302
          - ERR_303
          - ERR_304
          - ERR_305
          - ERR_310
          - ERR_311
          - ERR_312
          - ERR_313
          - ERR_320
          - ERR_321
          - ERR_322
          - ERR_323
          - ERR_324
          - ERR_325
          - ERR_326
          - ERR_327
          - ERR_328
          - ERR_400
          - ERR_401
          - ERR_402
          - ERR_403
          - ERR_404
          - ERR_405
          - ERR_410
          - ERR_411
          - ERR_412
          - ERR_500
          - ERR_501
          - ERR_502
          - ERR_503
          - ERR_600
          - ERR_601
          - ERR_602
          - ERR_603
          - ERR_604
          - ERR_701
          - ERR_702
          - ERR_703
          - ERR_704
          - ERR_705
          - ERR_706
          - ERR_707
          - ERR_708
          - ERR_709
          - ERR_710
          - ERR_711
          description: Application error code. Possible values are listed per endpoint in the response schema (e.g. ERR_013, ERR_008).
        category:
          type: string
          enum:
          - CONFLICT
          - VALIDATION
          - CRYPTOGRAPHIC
          - NETWORK
          - DATABASE
          - EXTERNAL_SERVICE
          - UNKNOWN_ERROR
          - RESOURCE
          - AUTHORIZATION
          - SYSTEM
          description: Error category for grouping and handling.
        statusCode:
          type: number
          description: HTTP status code
          example: 404
          minimum: 400
        path:
          type: string
          description: Request path that produced the error
          example: /api/v1/wallets
        timestamp:
          type: string
          description: ISO 8601 timestamp
          example: '2025-02-20T12:00:00.000Z'
        requestId:
          type: string
          description: Request ID for tracing
      required:
      - code
      - category
      - statusCode
      - path
      - timestamp
    CreateWithdrawResponseBodyDTO:
      type: object
      properties:
        data:
          readOnly: true
          allOf:
          - $ref: '#/components/schemas/CreateWithdrawResponseDataDto'
      required:
      - data
    CreateWithdrawResponseDataDto:
      type: object
      properties:
        id:
          type: string
          description: Transaction or withdrawal ID
        status:
          type: string
          example: pending
          description: Status of the withdrawal
      required:
      - id
      - status
    CreateWithdrawRequestBodyDTO:
      type: object
      properties:
        to:
          type: string
        amount:
          type: string
        from:
          description: Input UTXOs or addresses
          type: array
          items:
            type: string
        networkId:
          type: string
        clientShare:
          type: string
      required:
      - to
      - amount
      - from
      - networkId
      - clientShare
  parameters:
    SdkVersionHeader:
      name: x-sdk-version
      in: header
      description: SDK version header
      required: true
      schema:
        type: string
        default: 1.0.0
  securitySchemes:
    x-api-key:
      type: apiKey
      in: header
      name: x-api-key
      description: API key for authentication