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

# Bulk Add Custody Allocations

> Validates a batch of allocation rows (wallet address plus grant or warrant) and creates custody allocations in one transaction.

Not available to API keys yet. It will need `wallets:write`.

## OpenAPI

````yaml api-reference/openapi.json POST /tga/bulk-add-custody-allocations
openapi: 3.1.0
info:
  title: Toku API
  version: 1.0.0
servers:
  - url: https://api.toku.com
security:
  - bearerAuth: []
paths:
  /tga/bulk-add-custody-allocations:
    post:
      operationId: bulkAddCustodyAllocations
      summary: Bulk Add Custody Allocations
      description: >-
        Validates a batch of allocation rows (wallet address plus grant or
        warrant) and creates custody allocations in one transaction.


        Not available to API keys yet. It will need `wallets:write`.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BulkAddCustodyAllocationsRequest'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkAddCustodyAllocationsResponse'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not found
        '409':
          description: Conflict
        '429':
          description: Response 429
components:
  schemas:
    BulkAddCustodyAllocationsRequest:
      type: object
      properties:
        allocations:
          type: array
          items:
            type: object
            properties:
              custodyWalletAddress:
                type: string
                minLength: 1
              custodyWalletName:
                type: string
                minLength: 1
              custodyProviderName:
                type: string
                enum:
                  - SAFE
                  - SAFE_PROPOSER
                  - ANCHORAGE
                  - FIREBLOCKS
                  - SQUADS
                  - COINBASE
                  - FILECOIN_SELF_CUSTODY
                  - FORDEFI
                  - BITGO
              networkType:
                type: string
                enum:
                  - ETHEREUM
                  - ETHEREUM_SEPOLIA
                  - SOLANA
                  - POLYGON
                  - ZKSYNC
                  - BASE
                  - OPTIMISM
                  - SCROLL
                  - BNB_SMART_CHAIN
                  - SHAPE
                  - KATANA
                  - RITUAL
                  - KAVA
                  - OSMOSIS
                  - FILECOIN
              grantID:
                type: string
                format: uuid
              warrantID:
                type: string
                format: uuid
              allocationAmount:
                type: number
                minimum: 0
            required:
              - custodyWalletAddress
              - custodyWalletName
              - custodyProviderName
              - networkType
              - allocationAmount
          minItems: 1
      required:
        - allocations
    BulkAddCustodyAllocationsResponse:
      type: object
      properties:
        success:
          type: boolean
        results:
          type: array
          items:
            type: object
            properties:
              custodyWalletID:
                type: string
              custodyAllocationID:
                type: string
              custodyWalletAddress:
                type: string
              custodyProviderName:
                type: string
              networkType:
                type: string
              grantID:
                type: string
              warrantID:
                type: string
              allocationAmount:
                type: string
            required:
              - custodyWalletID
              - custodyAllocationID
              - custodyWalletAddress
              - custodyProviderName
              - networkType
              - allocationAmount
        totalAllocations:
          type: integer
          minimum: 0
      required:
        - success
        - results
        - totalAllocations
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
````
