POST
/
farcaster
/
storage
/
buy
curl --request POST \
  --url https://api.neynar.com/v2/farcaster/storage/buy \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "fid": 1,
  "units": 1,
  "idem": "<string>"
}'
{
  "total_active_units": 13,
  "allocations": [
    {
      "object": "storage_allocation",
      "user": {
        "object": "user_dehydrated",
        "fid": 3,
        "username": "<string>",
        "display_name": "<string>",
        "pfp_url": "<string>",
        "custody_address": "0x5a927ac639636e534b678e81768ca19e2c6280b7"
      },
      "units": 10,
      "expiry": "2024-10-08T22:03:49.000Z",
      "timestamp": "2023-10-09T22:03:49.000Z"
    }
  ]
}

Authorizations

x-api-key
string
header
default:NEYNAR_API_DOCS
required

API key to authorize requests

Body

application/json
fid
integer
required
Required range: x >= 1
Examples:

1

units
integer

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

Required range: x >= 1
Examples:

1

idem
string

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.

Response

200
application/json
Success
total_active_units
integer
Examples:

13

allocations
object[]