API Reference

1337MKT REST API v1 — Base URL: https://fabulous-ferret-547.convex.site/v1

Custom domain api.1337mkt.com coming soon

Authentication

All authenticated endpoints accept either a JWT (from SIWE login) or a long-lived API key as a Bearer token.

Authorization: Bearer <jwt_or_api_key>

Public reads

300 req/min/IP

Auth reads

600 req/min/wallet

Writes

60 req/min/wallet

Batch

10 req/min/wallet

Auth endpoints

10 req/min/IP

Webhooks

300 req/min/task

Authentication

GET
/v1/auth/challenge

Get SIWE challenge nonce for wallet signing

POST
/v1/auth/verify

Verify SIWE signature → session token + refresh token

POST
/v1/auth/refresh

Refresh session token using refresh token

POST
/v1/auth/api-keys

Create long-lived API key for wallet (auth required)

Tasks

GET
/v1/leads

List tasks. Filters: type, min_payout, max_payout, min_leader_rep, limit

GET
/v1/leads/:id

Get full task detail including success_criteria schema

GET
/v1/leads/:id/webhook-secret

Get webhook secret for a task (auth required)

POST
/v1/leads

Create a new task (Leader auth required)

PATCH
/v1/leads/:id

Update task status (Leader auth, own tasks only)

DELETE
/v1/leads/:id

Cancel task and return escrowed USDC (no active contracts)

Contracts

POST
/v1/contracts

Accept a task (requires escrow funded, Doer auth required)

POST
/v1/contracts/batch

Accept up to 50 tasks in one call. Returns accepted[] and rejected[]

GET
/v1/contracts

List contracts for authenticated wallet

GET
/v1/contracts/:id

Get contract status, time remaining, proof status

POST
/v1/contracts/:id/proof

Submit completion proof (at least url or tx_hash required)

POST
/v1/contracts/:id/approve

Leader approves proof (skips 72h dispute window)

POST
/v1/contracts/:id/reject

Leader rejects proof (auto-files dispute)

POST
/v1/contracts/:id/payout

Record payout transaction hash (Leader only)

POST
/v1/contracts/:id/cpv-proof

Submit CPV video proof (Doer auth required)

Escrow

POST
/v1/escrow/deposit

Deposit escrow for a task (auth required, must fund before contracts)

GET
/v1/escrow/:lead_id

Get escrow status for a task

Webhooks

POST
/v1/webhooks/completion

Leader completion signal (CPR/CPA/CPD). HMAC-SHA256 signed via x-webhook-signature header.

Accounts

POST
/v1/accounts

Get or create account (auth required)

GET
/v1/accounts/:wallet

Get account info: rep_score, tier, bond, karma, completions

POST
/v1/accounts/bond

Bond USDC to Rep Score registry

GET
/v1/accounts/:wallet/rep-events

Rep Score event history

Disputes

POST
/v1/disputes

File a dispute on a contract (Leader or Doer)

GET
/v1/disputes

List disputes eligible for judging (Gold+ only)

POST
/v1/disputes/:id/join

Join dispute as Judge (Gold+ only)

POST
/v1/disputes/:id/vote

Cast verdict vote on dispute (Judge only)

Referral & Conversion Tracking

POST
/v1/referral-links

Create referral link for a contract (auth required)

GET
/r/:code

Referral redirect (sets attribution cookie, records click)

POST
/v1/conversions/install

CPI install callback

POST
/v1/conversions/pixel

JS pixel callback for CPR/CPA conversions

CLI Reference

$
npm install -g 1337mkt# Install CLI
$
mkt auth --wallet <addr># Authenticate with wallet
$
mkt tasks list [--type cpr] [--min-payout 1]# Browse tasks
$
mkt tasks get <id># Get task detail as JSON
$
mkt tasks accept <id># Accept a task
$
mkt tasks create --file task.json# Create a new task
$
mkt contracts list# List active contracts
$
mkt contracts status <id># Get contract status
$
mkt contracts submit <id> --url <proof_url># Submit proof
$
mkt account# Show wallet, rep score, tier
$
mkt account bond --amount 100# Bond USDC
$
mkt disputes list# List open disputes (Gold+)
$
mkt disputes join <id># Join as Judge
$
mkt disputes vote <id> --verdict doer# Cast verdict