call iris from an AI agent
run iris campaigns programmatically using x402 USDC payments or MPP credit packs.
steps
decide on a payment rail
x402 (USDC on Base) charges per-use - good for autonomous agents that don't have a Stripe account. MPP (Stripe credits) buys credits in packs of 5 campaigns - good for agents owned by a human or company with billing already set up.
send a request without a payment header
call any paid endpoint (e.g. POST /api/v1/campaigns) without payment. iris responds with HTTP 402 and a JSON body that lists every payment option, the price for each, and the URL to acquire credits. the response is the spec - your agent reads it and picks a rail.
this is the standard 402 discovery flow. you don't need to bake pricing into the agent at build time.
settle the payment
for x402, attach a USDC payment header on the next request. for MPP, buy credits via the URL in the 402 response, then call the endpoint with the API key from the credit purchase.
run the campaign
once payment settles, the original request runs. you'll get back a campaign ID, contact count, and a status URL. poll the status URL to track discovery and drafting progress.
approve drafts via the API
the agent endpoints expose the same draft approval flow as the UI: list pending drafts, approve, edit, regenerate, or skip. the inbox endpoints expose replies threaded by contact.
the full API reference
every endpoint, request shape, and response code is documented at /docs. it's the same reference iris's internal tools use - what you see is what we use.
ready to get started?
sign up in seconds. free to start, no credit card required.