v1

latestOpenAPI 3.0.42026-07-26159287356.1 KB
Storage

Buy storage

This api will help you rent units of storage for an year for a specific FID. A storage unit lets you store 5000 casts, 2500 reactions and 2500 links. Requires x-wallet-id header.

post/v2/farcaster/storage/buy/

Headers

x-wallet-idstring required

Wallet ID to use for transactions

Request body

fidinteger required

The unique identifier of a farcaster user or app (unsigned integer)

idemstring

An Idempotency key is a unique identifier for the request. Note:

  1. This is used to prevent duplicate requests. Use the same idem key on retry attempts.
  2. This should be a unique identifier for each request.
  3. Recommended format is a 16-character string generated by the developer at the time of making this request.
unitsinteger

Number of storage units to buy. A storage unit lets you store 5000 casts, 2500 reactions and 2500 links.

Example request

{
  "fid": 1,
  "units": 1
}

Response

Success

total_active_unitsinteger

Example response

{
  "allocations": [
    {
      "expiry": "2024-10-08T22:03:49.000Z",
      "object": "storage_allocation",
      "timestamp": "2023-10-09T22:03:49.000Z",
      "units": 10,
      "user": {
        "custody_address": "0x5a927ac639636e534b678e81768ca19e2c6280b7",
        "fid": 3
      }
    }
  ],
  "total_active_units": 13
}