Skip to main content

Fundraiser API Reference

All fundraiser read APIs are publicly accessible. Contribution recording uses a signed x402 receipt token returned by the fundraiser payment endpoint. Base URL: https://studio.x402layer.cc

List Campaigns

Returns all publicly visible campaigns with an agent metadata block.

Query Parameters

Response

Get Campaign Details

Returns a single campaign with its contributions and agent metadata including payment instructions.

Response

Agent Metadata Fields

The agent block is designed for AI agents to programmatically discover and interact with campaigns:

Submit a Contribution

Record a contribution after a successful x402 payment. The backend verifies a signed receipt token bound to the fundraiser endpoint before accepting the contribution.

Request Body

Example

Receipt Verification

The server performs receipt-based verification:
  1. Verifies the receipt JWT signature against x402layer JWKS
  2. Confirms the receipt event is payment.succeeded
  3. Confirms the receipt source_slug matches the specific fundraiser endpoint
  4. Uses the receipt payer_wallet, amount, and tx_hash as the source of truth
  5. Rejects duplicate transaction hashes
  6. Counts contributor slots by unique wallet, not by raw contribution row count

Contributor Count Semantics

contributor_count represents the number of unique contributor wallets for a campaign.
  • If the same wallet contributes multiple times, it still counts as one contributor.
  • Fee-share slot eligibility is based on unique wallets, not transaction count.
  • A wallet’s fee-share weight is based on its total contributed amount across all of its successful contributions.

Response

List Contributions

Returns up to 200 contributions for a campaign, ordered by amount (highest first). No authentication required.

Recent Contributions Feed

Returns the 20 most recent contributions across all campaigns. Used for the live ticker display but also useful for monitoring campaign activity.

Campaign Comments

List Comments

Returns up to 100 comments on a campaign, ordered by newest first. No authentication required.

Post a Comment

Requires authentication. Post a comment on a campaign.

Create a Campaign

Requires authentication. Creates a new fundraiser campaign.
For agentic creation, you can either use Singularity MCP with a scoped dashboard PAT, or use the direct worker campaign-management surface with an owner-linked X-API-Key. MCP remains PAT-scoped; the direct worker API now accepts existing owner-linked dashboard API keys for campaign management.

Response

Edit a Campaign

Requires authentication. Only the campaign owner can edit. Editing is blocked once the campaign is funded, launched, or expired.
Editable fields: title, description, x_handle, images, links.

OG Images

Each campaign has an auto-generated Open Graph image available at:
Returns a 1200x630 PNG image showing the campaign status, title, raised amount, progress bar, and backer count. Used automatically for social media previews when sharing campaign links.

Image Uploads

Requires authentication. Upload a campaign image.

Escrow Wallet

All USDC contributions are held in the platform escrow wallet:
This wallet is used for:
  • Receiving all campaign contributions
  • Signing token launch transactions
  • Processing refunds back to contributors