Skip to main content
A campaign is a reward you run for your users — for example, a trade-profit match that pays each user a multiple of the profit they earned during the campaign window. The Campaigns API lets your server read campaign state and submit the per-user data that the reward is computed from. Everything is scoped to your merchant account — a campaign that isn’t yours returns 404.
On the testnet sandbox? Swap the host for https://api-sandbox.blink.cash.

The model

Two keys run through this API; keeping them straight makes the rest obvious.
  • Qualification is keyed by wallet address. A wallet qualifies by receiving a deposit from you during the campaign window (startDateendDate). Qualification is derived from deposits — it isn’t something you set.
  • Rewards are keyed by your own user id (merchantUserId). A participant owns the user’s matched amount and all payouts, so a per-user cap is tracked in exactly one place even when the user deposited from several wallets. Each participant rolls the user’s qualifying wallets up under it.
You supply the per-user input the reward is computed from (trade profit, today) by pushing participants; Blink computes the match — capped per user, clamped to the remaining campaign budget, and monotonic (a later submission never lowers an existing match). Disbursement is handled separately; these endpoints never move funds.

Authentication

Every request is authenticated with a signed X-Merchant-Authorization header — the same identity credential used across the server-to-server API. See Merchant Authentication for how to build it.

Amounts and pagination

Every amount is onchain-native: an integer quantity in the token’s smallest unit (base units) as a decimal string, plus the token symbol and its decimals.
The list endpoints are cursor-paginated. Pass limit (1–100, default 25) and an opaque cursor from the previous page’s nextCursor; a null nextCursor means the last page. Treat the cursor as opaque.

List campaigns

GET https://api.blink.cash/v1/marketings/campaigns Lists your campaigns, newest first.

Query parameters

Response

Get a campaign

GET https://api.blink.cash/v1/marketings/campaigns/{campaignId} Returns a single campaign (same shape as a list item). 404 if it doesn’t exist or isn’t yours.

Qualified wallets

GET https://api.blink.cash/v1/marketings/campaigns/{campaignId}/qualifiedWallets With no address filter, returns the paginated list of wallets that deposited during the campaign window. With one or more address params, it’s a point/batch qualification check — only the supplied addresses that qualify come back, so an address absent from the response did not qualify.

Query parameters

Response

List participants

GET https://api.blink.cash/v1/marketings/campaigns/{campaignId}/participants Lists your users’ participation in the campaign — their matched reward and payouts. Supply id (a participant id) or merchantUserId (your own user id) to fetch a single participant instead of the list.

Query parameters

Response

A CampaignParticipantList, or a single participant when id/merchantUserId is set:

Submit a participant

POST https://api.blink.cash/v1/marketings/campaigns/{campaignId}/participants Pushes one user’s data into the campaign. Blink computes the reward from the amount you submit, applying the campaign’s multiplier and caps.
  • merchantUserId is the idempotency key. The first submission creates the participant and returns 201; a repeat with the same merchantUserId updates it (refreshing the input amount) and returns 200. Re-submitting is always safe — the reward never decreases and the budget is never double-counted.
  • amount is the measured input the reward is based on (trade profit, today), as a base-unit token amount. Submit it in USDC base units (6 decimals).
  • wallets is the user’s wallets, each { address, chain: { id } } where chain.id is the numeric chain id (for example 1 = Ethereum, 8453 = Base, 137 = Polygon).
  • The campaign must be ACTIVE, and at least one submitted wallet must have a qualifying deposit in the window.

Request body

Response

201 Created on the first submission, 200 OK on a repeat. The body is the full participant (identical to Get a participant above). With this example — 500 USDC profit on a 2× campaign — amountMatched is 1000000000 (1,000 USDC), subject to the per-user and total caps.
Only users who deposited with Blink during the campaign window earn a reward. If none of a submitted user’s wallets qualified, the request is rejected with 422 NO_QUALIFYING_WALLET and no participant is created — re-submit once the user has a qualifying deposit.

Response codes

Error shape

Errors use the standard Blink error envelope: