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

# Create swap and transfer



## OpenAPI

````yaml /api-reference/openapi.yaml post /swap-and-transfer
openapi: 3.1.0
info:
  title: Onbeam API
  version: 1.0.0
servers:
  - url: https://api.onbeam.io
  - url: http://localhost:3004
security: []
paths:
  /swap-and-transfer:
    post:
      summary: Create swap and transfer
      operationId: createSwapAndTransfer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SwapAndTransferRequest'
      responses:
        '200':
          description: Operation created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SwapAndTransferResponse'
      security:
        - ApiKeyAuth: []
        - BearerAuth: []
components:
  schemas:
    SwapAndTransferRequest:
      type: object
      properties:
        fromWalletId:
          type: string
        fromChainId:
          type: integer
        toChainId:
          type: integer
        fromToken:
          type: string
        toToken:
          type: string
        amount:
          type: string
        recipient:
          type: string
      required:
        - fromWalletId
        - fromChainId
        - toChainId
        - fromToken
        - toToken
        - amount
        - recipient
    SwapAndTransferResponse:
      type: object
      properties:
        operationId:
          type: string
        status:
          type: string
          examples:
            - pending
      required:
        - operationId
        - status
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````