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

# Send the client's assets

> Sends a token the client holds to another address. This endpoint builds,
signs, and submits a transaction to an RPC gateway.

**Important:** A 200 response only confirms that the transaction was
received by the RPC gateway — it does not mean the transaction is confirmed
on-chain.




## OpenAPI

````yaml /openapi/enclave-mpc-api.yaml post /v1/assets/send
openapi: 3.1.0
info:
  title: Portal Enclave MPC API
  version: '1.0'
  description: |
    The Enclave MPC API provides endpoints for MPC wallet generation, signing,
    backup, and recovery. All endpoints require a Client API Key or Client
    Session Token as a Bearer token.

    ## Base URL
    `https://mpc-client.portalhq.io`
servers:
  - url: https://mpc-client.portalhq.io
security:
  - bearerAuth: []
tags:
  - name: MPC Operations
    description: MPC wallet generation, signing, asset transfers, backup, and recovery
paths:
  /v1/assets/send:
    post:
      tags:
        - MPC Operations
      summary: Send the client's assets
      description: >
        Sends a token the client holds to another address. This endpoint builds,

        signs, and submits a transaction to an RPC gateway.


        **Important:** A 200 response only confirms that the transaction was

        received by the RPC gateway — it does not mean the transaction is
        confirmed

        on-chain.
      operationId: sendAssets
      parameters:
        - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SendAssetsRequest'
            example:
              share: eyJjbG...
              chain: ethereum
              to: '0xdFd8302f44727A6348F702fF7B594f127dE3A902'
              token: NATIVE
              amount: '0.0001'
              rpcUrl: https://mainnet.infura.io/v3/YOUR_KEY
      responses:
        '200':
          description: Transaction submitted successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SendAssetsResponse'
              example:
                transactionHash: >-
                  0x02073df9ba08895d681f80ae45440ba57e766602c97ee6321df5ac81bca900cc
                metadata:
                  amount: '0.01'
                  rawAmount: '10000000000000000'
                  tokenAddress: '0xfFf9976782d46CC05630D1f6eBAb18b2324d6B14'
                  tokenDecimals: 18
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MpcErrorResponse'
              example:
                id: RPC_OP_FAILED
                message: 'Failed to send transaction: details'
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                type: string
              example: Incorrect API key format
        '404':
          description: >-
            Portal-managed presignature not found or not decryptable with the
            supplied share
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MpcErrorResponse'
        '409':
          description: Idempotent request already completed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IdempotencyConflict'
        '422':
          description: Idempotency key reused with different payload
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IdempotencyReuse'
components:
  parameters:
    IdempotencyKey:
      name: Idempotency-Key
      in: header
      required: false
      description: |
        A caller-provided key used for safe retries. Behavior depends on the
        endpoint:

        - **`POST /v1/presign/{curve}` with `managed: true`** — retrying a
          completed request with the same key returns the same
          `{id, expiresAt}` (200). If the original attempt is still in
          progress, the retry returns 409 with a `Retry-After` header; if
          the original attempt failed before completing, it returns 409
          without `Retry-After` (caller should retry with a new key).
          Reusing a key after the wallet's signing share has changed (for
          example, after a reshare or recovery) returns 422.
        - **`POST /v1/sign`** — only honored for broadcast methods (for
          example `eth_sendTransaction`, `sol_signAndSendTransaction`).
          Supplying the header with a non-broadcast method returns 400.
          For broadcast methods, retrying a completed request returns 409
          (`IDEMPOTENT_REQUEST_ALREADY_COMPLETED`), and reuse with a
          different payload returns 422. On 409, the response body does
          not include the original signing result — the header prevents
          double-execution, it does not replay the prior response.
        - **`POST /v1/assets/send`** — retrying a completed request returns
          409 (`IDEMPOTENT_REQUEST_ALREADY_COMPLETED`), and reuse with a
          different payload returns 422. On 409, the response body does
          not include the original `transactionHash` — the header prevents
          double-submission, it does not replay the prior response.

        Client-stored presignature creation does not currently honor this
        header.
      schema:
        type: string
  schemas:
    SendAssetsRequest:
      type: object
      description: Request body for sending assets.
      properties:
        share:
          type: string
          description: The MPC share for the relevant curve.
        chain:
          type: string
          description: |
            The blockchain network. Accepts a CAIP-2 chain ID or a friendly name
            such as `ethereum`, `solana`, `polygon`, `base`, `sepolia`, etc.
        to:
          type: string
          description: The recipient's address.
        token:
          type: string
          description: |
            Token contract address (ERC-20), mint address (SPL), or a shorthand
            like `NATIVE`, `USDC`, or `USDT`.
        amount:
          type: string
          description: The amount of tokens to send (e.g. `"0.1"` is 0.1 of the token).
        rpcUrl:
          type: string
          description: |
            The RPC node provider URL that the transaction will be submitted
            through. Not required for Solana or Solana Devnet.
        nonce:
          type: string
          description: |
            Hex string of the nonce to set on the transaction (e.g. `"0x01"`).
            Must include the `0x` prefix and a leading zero for single digits.
        metadataStr:
          type: string
          description: Optional metadata string for the transaction.
        sponsorGas:
          type: boolean
          description: |
            Set to `false` to opt out of gas sponsorship for Account Abstraction
            clients. Defaults to `true` when omitted.
        presignature:
          type: string
          description: >
            The `data` value from a client-stored presign response. Omit for
            standard

            (non-presigned) signing. Mutually exclusive with `presignatureId`.
        presignatureId:
          type: string
          description: >
            The `id` value from a Portal-managed presign response. Omit for
            standard

            (non-presigned) signing. Mutually exclusive with `presignature`.
      required:
        - share
        - chain
        - to
        - token
        - amount
        - rpcUrl
    SendAssetsResponse:
      type: object
      description: Response after submitting a send-assets transaction.
      properties:
        transactionHash:
          type: string
          description: |
            The transaction hash (or User Operation hash for Account Abstraction
            clients).
        metadata:
          type: object
          properties:
            amount:
              type: string
              description: Human-readable amount sent.
            rawAmount:
              type: string
              description: Raw amount in the token's smallest unit.
            tokenAddress:
              type: string
              description: The token's contract address.
            tokenDecimals:
              type: integer
              description: Number of decimals for the token.
      required:
        - transactionHash
    MpcErrorResponse:
      type: object
      description: Standard error response from the Enclave MPC API.
      properties:
        id:
          type: string
          description: >-
            Short error identifier (e.g. `DKG_FAILED`, `BAD_REQUEST`,
            `RPC_OP_FAILED`).
        message:
          type: string
          description: Human-readable error details.
      required:
        - id
    IdempotencyConflict:
      type: object
      description: >-
        Returned when the Idempotency-Key has already been used with an
        identical request body.
      properties:
        id:
          type: string
          example: IDEMPOTENT_REQUEST_ALREADY_COMPLETED
        message:
          type: string
          example: Request already completed
      required:
        - id
        - message
    IdempotencyReuse:
      type: object
      description: >-
        Returned when the Idempotency-Key has already been used with a different
        request body.
      properties:
        id:
          type: string
          example: IDEMPOTENCY_KEY_REUSED
        message:
          type: string
          example: Idempotency key reused for different request payload
      required:
        - id
        - message
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Client API Key or Client Session Token

````