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

# Enviar activo (EVM + Solana)

> Envía activos nativos y tokens en EVM y Solana con solicitudes POST idempotentes.

<Note>
  Requiere encabezado `Idempotency-Key`. ERC20 llama a `transfer()`; SPL puede crear ATA si es necesario.
</Note>

<ResponseExample>
  ```json 200 theme={null}
  { "id": "tx_...", "status": "SUBMITTED", "hash": "0x...", "explorerUrl": "https://basescan.org/tx/0x...", "chainName": "Base" }
  ```
</ResponseExample>


## OpenAPI

````yaml POST /send
openapi: 3.1.0
info:
  title: AFK Crypto API
  description: >-
    AFK Crypto - Non-custodial wallet automation. Simple REST APIs for EVM and
    Solana.
  version: 1.0.0
servers:
  - url: https://api.afkcrypto.com/v1
    description: Production
security:
  - apiKeyAuth: []
paths:
  /send:
    post:
      summary: Send native assets and tokens
      description: Send native and token assets on EVM and Solana.
      parameters:
        - name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            format: uuid
          description: >-
            Provide a unique Idempotency-Key per user to ensure single
            submission.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SendRequest'
      responses:
        '200':
          description: Submission accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubmissionResponse'
          headers:
            x-request-id:
              $ref: '#/components/headers/XRequestId'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          headers:
            x-request-id:
              $ref: '#/components/headers/XRequestId'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          headers:
            x-request-id:
              $ref: '#/components/headers/XRequestId'
        '429':
          description: Rate limited
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          headers:
            x-request-id:
              $ref: '#/components/headers/XRequestId'
            Retry-After:
              schema:
                type: integer
              description: Seconds until next window
        default:
          $ref: '#/components/responses/ErrorResponse'
components:
  schemas:
    SendRequest:
      type: object
      properties:
        chain:
          type: string
          description: Chain slug (e.g., base, base-sepolia, solana-devnet).
        from:
          type:
            - string
            - 'null'
          description: >-
            Optional sender wallet; defaults to user's default wallet for the
            chain.
        to:
          type: string
          description: Recipient wallet address (owner for token transfers).
        asset:
          type: string
          enum:
            - native
            - erc20
            - spl
          description: Asset type to send.
        token:
          type:
            - string
            - 'null'
          description: Token address (EVM) or mint (Solana) when sending tokens.
        amount:
          type: string
          description: Amount in base units (wei/lamports/token units).
      required:
        - chain
        - to
        - asset
        - amount
    SubmissionResponse:
      type: object
      properties:
        id:
          type: string
          description: AFK transaction id for the submitted action.
        status:
          type: string
          enum:
            - SUBMITTED
          description: Submission status.
        hash:
          type:
            - string
            - 'null'
          description: >-
            On-chain transaction hash/signature (may be null at submission
            time).
        explorerUrl:
          type:
            - string
            - 'null'
          description: >-
            Direct link to the transaction on a chain explorer. Null until a
            hash/signature exists.
        chainName:
          type: string
          description: >-
            Human-readable chain name for display (e.g., Base, Ethereum,
            Solana).
      required:
        - id
        - status
        - hash
        - explorerUrl
        - chainName
    ApiError:
      type: object
      properties:
        error:
          type: string
          description: Human-readable error message.
        code:
          type: string
          enum:
            - FORBIDDEN
            - UNAUTHORIZED
            - RATE_LIMITED
            - INVALID_INPUT
            - WALLET_NOT_FOUND
            - USER_NOT_LINKED
            - WALLET_NOT_DELEGATED
            - WALLET_ID_REQUIRED
            - CHAIN_UNKNOWN
            - IDEMPOTENT_BODY_MISMATCH
            - IDEMPOTENT_REPLAY
            - PRIVY_RPC_ERROR
            - SEND_FAILED
            - SERVICE_UNAVAILABLE
            - QUOTE_FAILED
            - NOT_FOUND
            - INSUFFICIENT_FUNDS
            - INTERNAL_ERROR
          description: Stable error code for programmatic handling.
        requestId:
          type:
            - string
            - 'null'
          description: Unique request identifier (also in x-request-id header).
      required:
        - error
  headers:
    XRequestId:
      description: Unique request identifier
      schema:
        type: string
  responses:
    ErrorResponse:
      description: Error envelope
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
      headers:
        x-request-id:
          $ref: '#/components/headers/XRequestId'
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````