Skip to main content

Community Export API

Admin-only endpoint that exports all claimed community holders with their tier, credit, and badge information. Designed for downstream operations such as airdrop snapshots and analytics.

Export community data

GET /api/community/export
Requires admin session authentication. Returns all claimed holders with their wallet addresses, tiers, credit amounts, and badge titles.

Query parameters

ParameterTypeRequiredDescription
formatstringNoResponse format: json (default) or csv

JSON response

{
  "exportedAt": "2026-04-10T12:00:00.000Z",
  "count": 42,
  "rows": [
    {
      "userId": "user_abc123",
      "walletAddress": "7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU",
      "tier": "builder",
      "credits": 100,
      "claimedAt": "2026-04-10T12:00:00.000Z",
      "badgeTitle": "Founding Community"
    }
  ]
}

JSON response fields

FieldTypeDescription
exportedAtstringISO 8601 timestamp of when the export was generated
countnumberTotal number of rows in the export
rowsarrayList of claimed holder records
rows[].userIdstringUser identifier
rows[].walletAddressstringSolana wallet address that made the claim
rows[].tierstringTier at time of claim (whale, builder, or holder)
rows[].creditsnumberCredits granted
rows[].claimedAtstringISO 8601 timestamp of the claim
rows[].badgeTitlestring | nullFounding badge title, or null if no badge

CSV response

When format=csv is passed, the response is returned as a downloadable CSV file with the following columns:
ColumnDescription
user_idUser identifier
wallet_addressSolana wallet address
tierClaim tier
creditsCredits granted
claimed_atISO 8601 timestamp
badge_titleFounding badge title
The response includes Content-Disposition: attachment; filename="agentbot-community-export.csv" to trigger a file download.

Errors

CodeDescription
403Forbidden — admin session required