Skip to main content
POST
/
api
/
campaigns
Create campaign
curl --request POST \
  --url https://studio.x402layer.cc/api/campaigns \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "title": "<string>",
  "wallet_address": "<string>",
  "target_amount": 1001,
  "description": "<string>",
  "token_ticker": "<string>",
  "fee_option": "supporters",
  "fee_split_pct": 50,
  "images": [
    "<string>"
  ],
  "x_handle": "<string>",
  "deadline": "2023-11-07T05:31:56Z",
  "bags_config_type": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'
{
  "success": true,
  "campaign": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "slug": "<string>",
    "title": "<string>",
    "url": "<string>",
    "endpoint_slug": "<string>"
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.x402layer.cc/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Supabase session JWT

Body

application/json
title
string
required
Minimum string length: 3
wallet_address
string
required

Creator's Solana wallet for payouts

target_amount
number
required

Funding target in USDC

Required range: x >= 1000
description
string
token_ticker
string

2–10 uppercase alphanumeric characters

Pattern: ^[A-Z0-9]{2,10}$
fee_option
enum<string>
default:supporters
Available options:
supporters,
creator,
split
fee_split_pct
number

Creator's percentage when using split

Required range: 0 <= x <= 100
images
string<uri>[]

First image = token logo

Maximum array length: 5
x_handle
string

X/Twitter handle without @

deadline
string<date-time>
category
enum<string>
Available options:
medical,
emergency,
education,
community,
creative,
tech,
business,
personal,
other
bags_config_type
string<uuid>

Fee tier UUID

Response

Campaign created

success
boolean
campaign
object