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

# Send fungibles

> Send fungibles in bulk to several farcaster users. A funded wallet is to required use this API. React out to us on the Neynar channel on farcaster to get your wallet address.

<Info>
  ### Related documentation:

  * [Managing Onchain Wallets](/docs/managing-onchain-wallets) - Wallet setup guide
</Info>

## Understanding Wallet ID for Fungible Transfers

This endpoint allows you to send fungible tokens (ERC-20, SPL tokens, etc.) in bulk to multiple Farcaster users. You can send tokens using their FID (Farcaster ID) instead of wallet addresses.

### Wallet ID (REQUIRED)

The [`x-wallet-id` header](/docs/managing-onchain-wallets) is **REQUIRED** for this endpoint. You must provide a funded wallet that will execute the token transfers on your behalf.

<Note>
  **New to Wallet IDs?** See [Managing Onchain Wallets](/docs/managing-onchain-wallets) to create your app wallet in the developer portal and obtain your `x-wallet-id` value.
</Note>

## Code Examples

### Basic Token Transfer

<CodeGroup>
  ```javascript Node.js theme={"system"}
  const response = await fetch('https://api.neynar.com/v2/farcaster/fungible/send', {
    method: 'POST',
    headers: {
      'x-api-key': 'YOUR_NEYNAR_API_KEY',
      'x-wallet-id': 'your-wallet-id',  // REQUIRED
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      token_address: '0x...',  // ERC-20 contract address
      network: 'base',
      recipients: [
        { fid: 12345, amount: '1.5' },
        { fid: 67890, amount: '2.0' }
      ]
    })
  });

  const result = await response.json();
  console.log('Transfers:', result);
  ```

  ```bash cURL theme={"system"}
  curl -X POST 'https://api.neynar.com/v2/farcaster/fungible/send' \
    -H 'x-api-key: YOUR_NEYNAR_API_KEY' \
    -H 'x-wallet-id: your-wallet-id' \
    -H 'Content-Type: application/json' \
    -d '{
      "token_address": "0x...",
      "network": "base",
      "recipients": [
        {"fid": 12345, "amount": "1.5"},
        {"fid": 67890, "amount": "2.0"}
      ]
    }'
  ```

  ```python Python theme={"system"}
  import requests

  headers = {
      'x-api-key': 'YOUR_NEYNAR_API_KEY',
      'x-wallet-id': 'your-wallet-id',  # REQUIRED
      'Content-Type': 'application/json'
  }

  payload = {
      'token_address': '0x...',
      'network': 'base',
      'recipients': [
          {'fid': 12345, 'amount': '1.5'},
          {'fid': 67890, 'amount': '2.0'}
      ]
  }

  response = requests.post(
      'https://api.neynar.com/v2/farcaster/fungible/send',
      headers=headers,
      json=payload
  )

  result = response.json()
  print('Transfers:', result)
  ```
</CodeGroup>

## Supported Networks

You can send fungibles on:

| Network          | Token Standard   | Native Token |
| ---------------- | ---------------- | ------------ |
| **Base**         | ERC-20           | ETH          |
| **Optimism**     | ERC-20           | ETH          |
| **Base Sepolia** | ERC-20 (testnet) | ETH          |
| **Solana**       | SPL              | SOL          |

## What You're Paying For

When you send fungibles with a wallet\_id:

* **Services Included:**
  * FID to wallet address resolution
  * Transaction execution and monitoring
  * Gas estimation and optimization
  * Retry logic for failed transactions
  * Batch processing support

## Batch Transfers

Send to multiple recipients in a single API call:

<CodeGroup>
  ```javascript Node.js theme={"system"}
  const recipients = [
    { fid: 12345, amount: '1.0' },
    { fid: 23456, amount: '2.5' },
    { fid: 34567, amount: '0.5' },
    { fid: 45678, amount: '1.5' }
  ];

  const response = await fetch('https://api.neynar.com/v2/farcaster/fungible/send', {
    method: 'POST',
    headers: {
      'x-api-key': 'YOUR_NEYNAR_API_KEY',
      'x-wallet-id': 'your-wallet-id',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      token_address: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913', // USDC on Base
      network: 'base',
      recipients: recipients
    })
  });

  const result = await response.json();
  console.log(`Sent to ${result.transactions.length} recipients`);
  ```
</CodeGroup>

<Tip>
  **Batch Processing:** The API processes transfers in parallel for better efficiency. Each recipient gets their own transaction.
</Tip>

## Error Handling

### Error: Missing Wallet ID

```json theme={"system"}
{
  "code": "RequiredField",
  "message": "x-wallet-id header is required"
}
```

**Solution:** Add the `x-wallet-id` header. See [Managing Onchain Wallets](/docs/managing-onchain-wallets) for setup.

### Error: Invalid Wallet ID

```json theme={"system"}
{
  "code": "InvalidWalletId",
  "message": "The provided wallet_id is invalid or not found."
}
```

**Solution:** Verify your wallet\_id in the [Developer Portal](https://dev.neynar.com) or contact support.

### Error: Insufficient Wallet Balance

```json theme={"system"}
{
  "code": "InsufficientFunds",
  "message": "Wallet does not have enough balance to complete this transaction."
}
```

**Solution:** Fund your wallet with more tokens (and gas tokens) on the target network.

### Error: Insufficient Token Balance

```json theme={"system"}
{
  "code": "InsufficientTokenBalance",
  "message": "Wallet does not have enough of the specified token to complete transfers."
}
```

**Solution:** Ensure your wallet has enough of the token you're trying to send, plus gas tokens for fees.

## Use Cases

### Reward Community Members

```javascript theme={"system"}
// Reward top contributors with USDC
const topContributors = [
  { fid: 12345, amount: '100' },  // $100 USDC
  { fid: 23456, amount: '50' },   // $50 USDC
  { fid: 34567, amount: '25' }    // $25 USDC
];

await sendFungibles({
  token_address: USDC_ADDRESS,
  network: 'base',
  recipients: topContributors
});
```

### Airdrop Custom Tokens

```javascript theme={"system"}
// Airdrop your custom token to holders
const airdropList = users.map(user => ({
  fid: user.fid,
  amount: calculateAirdropAmount(user)
}));

await sendFungibles({
  token_address: YOUR_TOKEN_ADDRESS,
  network: 'base',
  recipients: airdropList
});
```

### Pay for Services

```javascript theme={"system"}
// Pay creators for their work
await sendFungibles({
  token_address: USDC_ADDRESS,
  network: 'base',
  recipients: [
    { fid: artistFid, amount: paymentAmount }
  ]
});
```

## Node.js SDK

🔗 **SDK Method:** [sendFungiblesToUsers](/nodejs-sdk/onchain-apis/sendFungiblesToUsers)

Use the Neynar Node.js SDK for typed responses and better developer experience:

```javascript theme={"system"}
import { NeynarAPIClient } from "@neynar/nodejs-sdk";

const client = new NeynarAPIClient({ apiKey: "YOUR_API_KEY" });

const result = await client.sendFungiblesToUsers({
  walletId: "your-wallet-id",
  tokenAddress: "0x...",
  network: "base",
  recipients: [
    { fid: 12345, amount: "1.0" }
  ]
});
```

## Best Practices

### Security

* ✅ **Validate recipients** - Verify FIDs before sending
* ✅ **Set reasonable limits** - Implement transfer caps
* ✅ **Monitor transactions** - Track all transfers
* ✅ **Handle errors gracefully** - Implement retry logic

### Operations

* ✅ **Fund wallet adequately** - Ensure sufficient token and gas balance
* ✅ **Batch when possible** - More efficient for multiple recipients
* ✅ **Test on testnet first** - Use Base Sepolia before mainnet
* ✅ **Monitor wallet balance** - Set up low balance alerts

### Cost Optimization

* ✅ **Batch transfers** - Reduce per-recipient costs
* ✅ **Choose right network** - Base often has lower gas costs than Optimism
* ✅ **Monitor gas prices** - Send during low-traffic periods when possible
* ✅ **Use efficient tokens** - Some ERC-20s are more gas-efficient than others

## Next Steps

<CardGroup cols={2}>
  <Card title="Manage Your Wallet" href="/docs/managing-onchain-wallets" icon="wallet">
    Set up and fund your wallet for token transfers
  </Card>

  <Card title="Fetch User Balance" href="/reference/fetch-user-balance" icon="coins">
    Check token balances for Farcaster users
  </Card>

  <Card title="Mint NFTs" href="/docs/mint-for-farcaster-users" icon="image">
    Mint NFTs to Farcaster users
  </Card>

  <Card title="Contact Support" href="https://t.me/rishdoteth" icon="telegram">
    Need help? Reach out to our team
  </Card>
</CardGroup>


## OpenAPI

````yaml post /v2/farcaster/fungible/send/
openapi: 3.0.4
info:
  contact:
    email: team@neynar.com
    name: Neynar
    url: https://neynar.com/
  description: >-
    The Neynar API allows you to interact with the Farcaster protocol among
    other things. See the [Neynar docs](https://docs.neynar.com/reference) for
    more details.
  title: Neynar API
  version: 3.173.0
servers:
  - url: https://api.neynar.com
security:
  - ApiKeyAuth: []
tags:
  - description: Operations related to user
    externalDocs:
      description: More info about user
      url: https://docs.neynar.com/reference/user-operations
    name: User
  - description: Operations related to signer
    externalDocs:
      description: More info about signer
      url: https://docs.neynar.com/reference/signer-operations
    name: Signer
  - description: Operations related to cast
    externalDocs:
      description: More info about cast
      url: https://docs.neynar.com/reference/cast-operations
    name: Cast
  - description: Operations related to feed
    externalDocs:
      description: More info about feed
      url: https://docs.neynar.com/reference/feed-operations
    name: Feed
  - description: Operations related to reaction
    externalDocs:
      description: More info about reaction
      url: https://docs.neynar.com/reference/reaction-operations
    name: Reaction
  - description: Operations related to notifications
    externalDocs:
      description: More info about notifications
      url: https://docs.neynar.com/reference/notifications-operations
    name: Notifications
  - description: Operations related to channels
    externalDocs:
      description: More info about channels
      url: https://docs.neynar.com/reference/channel-operations
    name: Channel
  - description: Operations related to follows
    externalDocs:
      description: More info about follows
      url: https://docs.neynar.com/reference/follows-operations
    name: Follows
  - description: Operations related to storage
    externalDocs:
      description: More info about storage
      url: https://docs.neynar.com/reference/storage-operations
    name: Storage
  - description: Operations related to mini apps
    name: Frame
  - description: Operations for building AI agents
    name: Agents
  - description: Operations related to fname
    name: fname
  - description: Operations related to a webhook
    name: Webhook
  - description: >-
      Securely communicate and perform actions on behalf of users across
      different apps
    externalDocs:
      description: More info about farcaster actions
      url: https://docs.neynar.com/docs/farcaster-actions-spec
    name: Action
  - description: Operations related to a subscriptions
    name: Subscribers
  - description: Operations related to a mute
    name: Mute
  - description: Operations related to a block
    name: Block
  - description: Operations related to a ban
    name: Ban
  - description: Operations related to onchain data
    name: Onchain
  - description: Operations related to login
    name: Login
  - description: Operations related to retrieving metrics
    name: Metrics
  - description: Operations related to mini app host notifications
    externalDocs:
      description: More info about mini app host notifications
      url: https://docs.neynar.com/docs/app-host-notifications
    name: App Host
paths:
  /v2/farcaster/fungible/send/:
    post:
      tags:
        - Onchain
      summary: Send fungibles
      description: >-
        Send fungibles in bulk to several farcaster users. A funded wallet is to
        required use this API. React out to us on the Neynar channel on
        farcaster to get your wallet address.
      operationId: send-fungibles-to-users
      parameters:
        - $ref: '#/components/parameters/WalletIdHeader'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TransactionSendFungiblesReqBody'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransactionSendFungiblesResponse'
          description: Success
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorRes'
          description: Bad Request
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorRes'
          description: Server Error
      externalDocs:
        url: https://docs.neynar.com/reference/send-fungibles-to-users
components:
  parameters:
    WalletIdHeader:
      description: Wallet ID to use for transactions
      in: header
      name: x-wallet-id
      required: true
      schema:
        type: string
      x-is-global-header: true
  schemas:
    TransactionSendFungiblesReqBody:
      properties:
        fungible_contract_address:
          description: >-
            Contract address of the fungible token to send. If not provided, the
            default is the native token of the network.
          example: '0x833589fcd6edb6e08f4c7c32d4f71b54bda02913'
          pattern: ^0x[a-fA-F0-9]{40}$
          type: string
        network:
          enum:
            - base
            - optimism
            - base-sepolia
          type: string
        recipients:
          items:
            $ref: '#/components/schemas/TransactionSendFungiblesRecipient'
          maxItems: 200
          minItems: 1
          type: array
      required:
        - network
        - recipients
      title: TransactionSendFungiblesReqBody
      type: object
    TransactionSendFungiblesResponse:
      properties:
        send_receipts:
          items:
            $ref: '#/components/schemas/TransactionSendFungiblesReceipt'
          type: array
        transactions:
          items:
            $ref: '#/components/schemas/TransactionSendTxInfo'
          type: array
      required:
        - send_receipts
        - transactions
      title: TransactionSendFungiblesResponse
      type: object
    ErrorRes:
      description: Details for the error response
      properties:
        code:
          type: string
        message:
          type: string
        property:
          type: string
        status:
          format: int32
          type: integer
      required:
        - message
      title: ErrorRes
      type: object
    TransactionSendFungiblesRecipient:
      properties:
        amount:
          description: Amount to send (must be greater than 0)
          minimum: 1.e-8
          type: number
        fid:
          $ref: '#/components/schemas/Fid'
      required:
        - fid
        - amount
      title: TransactionSendFungiblesRecipient
      type: object
    TransactionSendFungiblesReceipt:
      properties:
        amount:
          type: number
        fid:
          $ref: '#/components/schemas/Fid'
        reason:
          description: Reason for failure (if status is failed)
          type: string
        status:
          enum:
            - sent
            - failed
          type: string
      required:
        - fid
        - amount
        - status
      title: TransactionSendFungiblesReceipt
      type: object
    TransactionSendTxInfo:
      properties:
        approval_hash:
          description: >-
            Hash of the transaction that approved the transfer. This is only
            present if the fungible token is not native token of the network.
          type: string
        gas_used:
          description: Gas used for the transaction.
          type: string
        network:
          enum:
            - base
            - optimism
            - base-sepolia
          type: string
        transaction_hash:
          type: string
      required:
        - network
        - transaction_hash
        - gas_used
        - approval_hash
      title: TransactionSendTxInfo
      type: object
    Fid:
      description: The unique identifier of a farcaster user or app (unsigned integer)
      example: 3
      format: int32
      minimum: 0
      title: Fid
      type: integer
  securitySchemes:
    ApiKeyAuth:
      description: API key to authorize requests
      in: header
      name: x-api-key
      type: apiKey
      x-default: NEYNAR_API_DOCS

````