API Documentation
Introduction
Welcome to the ReplyCorp API documentation. This guide will help you integrate conversion tracking into your application.
Looking for programmatic reads — campaign stats, per-post analytics, conversion exports — or want to connect an AI agent? See Reporting API & MCP (Growth+). Conversion posting and reconciliation documented on this page are available on every tier.
Table of Contents
Getting Started
API Version
Current Version: v2.3.0
Base URL
All API requests should be made to:
Prerequisites
Before you can use the ReplyCorp API, you need to:
Register an organization account
Obtain your API key
Create a campaign
Authentication
Step 1: Request Access
Important: Organization registration requires email whitelisting. Before you can register, your email address must be approved by an administrator.
To request access, please contact support at support@replycorp.io with:
Your organization name
Your email address (this will be used as the admin email)
Brief description of your use case
Once your email is whitelisted, you can proceed with registration.
Step 2: Register Your Organization
After your email has been whitelisted, register your organization and receive an API key.
Endpoint: POST /api/v1/auth/register
Request Body:
Example Request:
Error Response (403 Forbidden) - Email Not Whitelisted:
Success Response:
Important: Save your apiKey securely. You'll need it for all API requests.
Note: If you receive a 403 error indicating your email is not whitelisted, please contact support to request access before attempting registration again.
Step 3: Login (Alternative Method)
If you already have an account, you can log in to retrieve your API key.
Endpoint: POST /api/v1/auth/login
Request Body:
Example Request:
Response:
Note: To retrieve your API key after login, you'll need to make an authenticated request to get your organization details.
Step 4: Using Your API Key
Once you have your API key, include it in all API requests using the X-API-Key header:
API Key Format:
Format:
rweb_{plan-tier}_{organization-slug}_{random-string}Plan tiers:
basic,standard,professional,enterpriseExamples:
rweb_basic_replycorp_tGF9jIsFpQJPkcUUwQqkaYqG(Basic plan)rweb_standard_replycorp_tGF9jIsFpQJPkcUUwQqkaYqG(Standard plan)rweb_professional_replycorp_tGF9jIsFpQJPkcUUwQqkaYqG(Professional plan)rweb_enterprise_replycorp_tGF9jIsFpQJPkcUUwQqkaYqG(Enterprise plan)
The tier prefix indicates your organization's subscription plan level
Conversion Tracking
Overview
The conversion tracking API allows you to record purchases or other conversion events. When a conversion is recorded, ReplyCorp automatically:
Identifies the buyer's Twitter/X account
Calculates attribution to influencers who drove the conversion
Distributes points to attributed influencers (positive for positive events, negative for negative events)
Event Types
The API supports multiple event types to track both positive and negative events:
Positive Events (require positive amount):
lock- REPPO tokens lockedbuy- Tokens purchasedpurchase- Purchase made (default ifeventTypeis omitted)
Zero-Amount Events (amount is optional, defaults to 0):
signup- Waitlist or registration signup. No commission required, influence points are not generated. Attribution is tracked normally.
Negative Events (require negative amount):
unlock- REPPO tokens unlockedsell- Tokens soldrefund- Purchase refunded
Net Volume Calculation:
Net volume is calculated by summing all conversion values (locks minus unlocks, purchases minus refunds)
Attribution points are distributed as positive points for positive events and negative points for negative events
This maintains accurate net attribution tracking
Post a Conversion
Endpoint: POST /api/v1/campaigns/{campaignId}/conversions
Authentication: Required (API Key)
Using both Conversion Intelligence and Rewards? Current setups run both in a single organization (one API key, one campaign ID) — Rewards is enabled as an add-on, and the only API difference is sending
commissionon eligible conversions once Rewards is activated. Only legacy customers who were explicitly set up with two separate organizations need dual reporting; see Integration Guide → Legacy: two-organization dual reporting.
Request Headers:
Request Body:
Field Descriptions:
twitterId
string
Yes*
The X (Twitter) user ID of the person who made the purchase/lock/unlock. *Either twitterId or verificationCode must be provided — use verificationCode for Instagram-verified buyers.
verificationCode
string
Yes*
Instagram buyers: the unique discount code issued to the buyer through ReplyCorp's Instagram DM verification (e.g. YOURBRAND-4F9A2C). The code carries the buyer's verified Instagram identity, so no twitterId is needed. Codes are campaign-scoped and single-use: the first attributed conversion marks the code redeemed. If both fields are sent, twitterId takes precedence. See Identifying Instagram Buyers.
eventType
string
No
Event type: lock, unlock, buy, sell, purchase, refund, signup. Defaults to purchase if omitted (backward compatibility)
amount
number
Yes*
The conversion/sale amount (revenue). Used for attribution calculation (who influenced the sale). Must be positive for lock/buy/purchase, negative for unlock/sell/refund, non-negative for signup. *Optional for signup events (defaults to 0).
commission
number
Yes*
The commission amount the brand is paying on this conversion. Used to calculate influence points. *Required when an attributed conversion has influence points enabled (not required for signup events). Must be non-negative and cannot exceed amount. Send 0 to retain the conversion and attribution record without generating billing, fees, or reward batches.
currency
string
No
Currency the monetary fields (amount, commission, totalVolume, netProfit) are denominated in. Defaults to USD. Supported token codes (e.g. APE) are listed at GET /api/v1/conversions/supported-currencies. Non-USD amounts are converted to USD at ingest using a DIA spot quote; the applied rate is stored on the conversion and returned in the response fx object. Points, billing, and payments remain USD-denominated.
transactionHash
string
No
Stable chain transaction identifier, strongly recommended for chain conversions. It is unique within the campaign and makes retries idempotent. EVM hashes are normalized to lowercase.
walletAddress
string
No
Optional wallet address (EVM or Solana) associated with the buyer
metadata
object
No
Optional metadata object for storing additional conversion data. Will be merged with server-generated metadata (eventType, walletAddress). Server fields take precedence if conflicts occur
metadata.txHash
string
Yes (for lock/unlock)
Unique transaction hash identifying the lock. Required for lock and unlock events to enable expiry tracking and prevent duplicate unlocks
metadata.expiresAt
number
No (for lock)
Expiry timestamp in epoch seconds. When provided for lock events, the system will automatically create an unlock event at expiry time if the lock hasn't been manually unlocked
metadata.userId
string
No
Optional user identifier (e.g., Privy user ID)
originalConversionId
string
No
For refund events: the ID of the original conversion being refunded. When provided, any pending or active influence point batches for the original conversion are cancelled.
Example Requests:
Positive Event (Lock with Expiry):
Negative Event (Manual Unlock):
Standard Purchase (with commission for influence points):
Instagram Buyer (identified by verification code instead of twitterId):
The code resolves to the buyer's DM-verified Instagram identity and the conversion attributes against their Instagram engagement history. See Identifying Instagram Buyers for how buyers obtain codes and how to resolve them ahead of time.
Purchase Recorded Without Billing or Rewards:
The zero-commission request still records the purchase and attribution analytics. It does not create a brand charge, ReplyCorp fee, buyer reward, poster reward, referral reward, or fee-router transaction.
Transaction idempotency
When transactionHash is supplied, (campaignId, transactionHash) identifies one conversion. A retry with the same X user, event type, amount, and commission returns HTTP 200, the original conversion.id, and "idempotentReplay": true. The first request returns HTTP 201.
If the same transaction hash is submitted with different identifying data, the API returns HTTP 409. Treat that as a data conflict requiring review; do not retry it as a new conversion. Concurrent requests are protected by the same database uniqueness constraint, so they cannot create duplicate conversions or rewards.
Token-Denominated Purchase (amounts in APE, converted to USD at ingest):
The response includes an fx object with the applied APE/USD rate; conversion.conversionValue, attribution amounts, and influence points are all calculated from the converted USD values. For refund events posted with originalConversionId, the rate stored on the original conversion is reused so the USD reversal matches what was originally credited.
Waitlist Signup (no amount or commission needed):
With Custom Metadata:
Success Response (201 Created):
The pendingInfluencePoints field is only included when the campaign has influence points enabled. Points start as PENDING and activate after the refund window closes (default 30 days) and brand payment is verified.
Response Fields:
conversion.id
Unique identifier for the conversion
conversion.conversionType
Type of conversion event (lock, unlock, buy, sell, purchase, refund)
conversion.eventType
Event type (same as conversionType, included for clarity)
conversion.conversionValue
The event amount (positive for positive events, negative for negative events)
conversion.convertedAt
ISO 8601 timestamp of when the conversion was recorded
conversion.participant
Participant information for the user who triggered the event
conversion.participant.id
Unique identifier for the participant
conversion.participant.twitterId
Twitter/X user ID
conversion.participant.twitterHandle
Twitter/X handle
conversion.participant.hasEngaged
Boolean indicating if the buyer has actually engaged with tagged posts (commented, replied, or engaged with posts mentioning your campaign). Only counts actual post interactions, not other ways of joining the campaign.
conversion.participant.hasConnected
Boolean indicating if the buyer has connected their X account and wallet
attribution.pointsDistributed
Boolean indicating if points were distributed to influencers
attribution.totalPointsDistributed
Total points distributed (positive for positive events, negative for negative events)
attribution.firstDegreeCount
Number of 1st degree connections that received attribution
attribution.secondDegreeCount
Number of 2nd degree connections that received attribution
attribution.attributions
Array of detailed attribution information for each attributed user (new in v1.1.0)
attribution.attributions[].twitterId
X (Twitter) account ID of the attributed user
attribution.attributions[].twitterHandle
X (Twitter) handle of the attributed user
attribution.attributions[].walletAddress
Wallet address if connected, null if not connected
attribution.attributions[].attributedAmount
Dollar amount attributed to this user (positive for positive events, negative for negative events)
attribution.attributions[].attributionPercentage
Percentage of transaction amount attributed to this user (0-100, always positive)
attribution.attributions[].degree
Attribution degree: 1 for 1st degree connections, 2 for 2nd degree connections
attribution.eligibleAttributions
Array of attributions filtered by threshold (if enabled), with percentages recalculated to sum to 100% across eligible users only (new in v1.4.1)
attribution.eligibleAttributions[].twitterId
X (Twitter) account ID of the eligible attributed user
attribution.eligibleAttributions[].twitterHandle
X (Twitter) handle of the eligible attributed user
attribution.eligibleAttributions[].walletAddress
Wallet address if connected, null if not connected
attribution.eligibleAttributions[].attributedAmount
Dollar amount attributed to this user (same as in attributions array)
attribution.eligibleAttributions[].attributionPercentage
Recalculated percentage that sums to 100% across eligible users only
attribution.eligibleAttributions[].degree
Attribution degree: 1 for 1st degree connections, 2 for 2nd degree connections
pendingInfluencePoints
Array of pending influence point batches (only present when campaign has influence points enabled and attributions exist)
pendingInfluencePoints[].twitterId
X (Twitter) account ID of the influencer receiving points
pendingInfluencePoints[].pointsPending
Number of influence points pending activation. Calculated from the commission after ReplyCorp fee, proportional to the influencer's attribution share.
pendingInfluencePoints[].batchId
Unique identifier for the point batch
cancelledInfluencePoints
Present on refund events when originalConversionId is provided and batches were cancelled
cancelledInfluencePoints.pendingCancelled
Number of pending batches cancelled
cancelledInfluencePoints.activeCancelled
Number of active points reversed
fx
Present when the request used a non-USD currency. FX audit record; also stored on the conversion (metadata.fx).
fx.currency
Currency code the request was denominated in (e.g. APE)
fx.rate
USD per 1 token — the rate applied to all monetary fields
fx.rateSource
Always DIA (spot quote from diadata.org)
fx.diaBlockchain / fx.diaAddress
Token contract the quote was sourced from
fx.quoteTime
Timestamp of the DIA quote
fx.rateReusedFromConversionId
Present on refunds when the rate was reused from the original conversion instead of a fresh quote
fx.originalAmount / fx.originalTotalVolume / fx.originalNetProfit / fx.originalCommission
The token-denominated values as posted, before conversion (null when not provided)
fx.convertedAt
ISO 8601 timestamp of when the conversion to USD was performed
Attributions Array Details:
The attributions array provides detailed information for each user who received attribution from the conversion. This enables partners to calculate revenue share payouts.
Key Features:
Wallet Addresses: Returns wallet address if the user has connected their wallet,
nullotherwisePercentage Calculation: Percentage is always positive (0-100), even for negative events (unlock, sell, refund)
Attributed Amount: Can be negative for negative events (unlock, sell, refund)
Empty Array: Returns empty array
[]when there are no attributions (isolated users)
Handling Missing Wallet Addresses:
When walletAddress is null, partners can:
Match wallet address on their side: If they have a wallet linked to the X account, they can map it directly
Hold rewards in smart contract: Escrow rewards for a fixed period (e.g., 30 days) until wallet address is provided
Register webhook for updates: Receive webhook notifications when participants register or update their wallet address (coming soon)
Payout Calculation Example:
Eligible Attributions (Threshold Filtering):
When a campaign has rewardThreshold set in its customBranding metadata, the response includes an eligibleAttributions array. This array contains only users who meet the minimum cumulative attribution points threshold (same threshold used for weekly rewards eligibility). If rewardThreshold is not set (or is null/undefined), eligibleAttributions will be an empty array.
Key Features:
Threshold Check: Users must have cumulative total attribution points >=
rewardThreshold(fromcustomBranding) across all conversions in the campaignRecalculated Percentages: Percentages in
eligibleAttributionsare recalculated to sum to 100% across eligible users onlyOriginal Amounts Preserved:
attributedAmountvalues remain the same as in theattributionsarrayEmpty Array: Returns empty array
[]whenrewardThresholdis not set or no users meet the thresholdSame Threshold: Uses the same
rewardThresholdvalue configured in "Edit Campaign Metadata" for weekly rewards eligibility
Example with Threshold Enabled:
If a campaign has customBranding.rewardThreshold: 100 and a conversion has 3 attributions:
User A: 150 cumulative points → Eligible
User B: 50 cumulative points → Not eligible
User C: 200 cumulative points → Eligible
The eligibleAttributions array will contain only User A and User C, with percentages recalculated to sum to 100%.
Error Responses:
400 Bad Request - Invalid request body:
400 Bad Request - Invalid event type:
400 Bad Request - Amount sign mismatch:
400 Bad Request - Zero amount (not applicable to signup events):
400 Bad Request - Unsupported currency:
503 Service Unavailable - FX rate temporarily unavailable (non-USD currency only; retry the request):
400 Bad Request - Invalid metadata:
400 Bad Request - Missing txHash for lock event:
400 Bad Request - Missing txHash for unlock event:
400 Bad Request - Invalid expiresAt:
400 Bad Request - ExpiresAt in the past:
400 Bad Request - Lock not found for unlock:
409 Conflict - Lock already unlocked:
401 Unauthorized - Missing or invalid API key:
403 Forbidden - Email not whitelisted (registration) or campaign belongs to different organization:
403 Forbidden - Campaign belongs to different organization:
404 Not Found - Campaign not found:
409 Conflict - Duplicate conversion:
500 Internal Server Error:
Identifying Instagram Buyers (Verification Codes)
X buyers are identified by twitterId. Instagram buyers are identified by a verification code — a unique, single-use discount code that carries the buyer's DM-verified Instagram identity, because Instagram offers no OAuth path your checkout can rely on for public identity.
How a buyer gets a code:
The buyer is shown a short keyword (e.g.
RC-X7K2MP) — via ReplyCorp's Social Connect widget with the Instagram provider enabled, or a ReplyCorp-powered Shopify flow — and asked to DM it to a ReplyCorp-controlled Instagram account.ReplyCorp verifies the sender's Instagram identity from the DM and replies with a unique one-off discount code prefixed with your campaign handle (e.g.
YOURBRAND-4F9A2C).The buyer enters that code at your checkout. The code itself is the attribution carrier — no session token, cookie, or cart attribute is needed.
Two ways to use the code at checkout:
Simple: post the conversion with
verificationCodeinstead oftwitterId(see the example above). ReplyCorp resolves the identity, attributes the conversion against the buyer's Instagram engagement history, and marks the code redeemed.Resolve first: if you want to validate the code and apply your own discount before completing checkout, resolve it explicitly:
Endpoint: POST /api/v1/codes/resolve
Authentication: Required (API Key)
Request Body:
Success Response (200 OK):
statusisVERIFIED(not yet used for a conversion) orREDEEMED(already used). Codes remain resolvable after redemption so order-processing retries stay deterministic — checkstatusif single-use enforcement matters to your flow.Unknown, unverified, or other-organization codes return
404.ReplyCorp does not create discount codes inside your shop (except on ReplyCorp-powered Shopify setups) — the resolve endpoint lets your backend validate the code and apply its own discount, then post the conversion with
verificationCodeas usual.
Behavior notes:
Codes are campaign-scoped: a code issued for one campaign is rejected on another.
Codes are single-use for attribution: the first successful conversion marks the code
REDEEMED.If you send both
twitterIdandverificationCode,twitterIdtakes precedence for identity (and a stale code will not fail the request).Everything else about the conversion —
amount,commission,transactionHashidempotency,currency, refunds — works identically for Instagram-identified buyers.
Supported Currencies
Endpoint: GET /api/v1/conversions/supported-currencies
Authentication: Required (API Key)
Returns the currencies accepted in the conversion API currency field. Non-USD (token) amounts are converted to USD at ingest using a DIA spot quote sourced from the listed token contract.
Success Response (200 OK):
How Attribution Works
When you post a conversion:
Buyer Identification: The system looks up the buyer by their
twitterIdin your campaign's participant list.Attribution Calculation: If the buyer is a participant, the system identifies all of their 1st and 2nd degree connections. Attribution is distributed to all connections based on their degree of separation.
Points Distribution:
Attribution Modes: Campaigns can use one of two attribution modes (configured via
attributionConfig.pointsSplitMode):Whole Mode (default): Each participant gets 100% of the conversion amount attributed to them
Split Mode: Attribution is split between upstream (influencers) and downstream (influenced) pools, then distributed proportionally
Positive Events (lock, buy, purchase):
Points are calculated at 10 points per $1 for 1st degree connections (default)
Points are calculated at 1.5 points per $1 for 2nd degree connections (default)
Example (Whole Mode): A $123.45 lock = 1,235 points to each 1st degree connection, 185 points to each 2nd degree connection
Example (Split Mode): A $100 conversion with 80/20 split and 10 upstream 1st degree connections (8 with Person A, 2 with Person B):
Upstream pool: $80
Each connection: $80 × (1.0 / 10.0) = $8.00
Person A: 8 × $8.00 = $64.00 attribution
Person B: 2 × $8.00 = $16.00 attribution
Negative Events (unlock, sell, refund):
Negative points are distributed using the same rates and mode
Example: A -$50.00 unlock = -500 points to 1st degree, -75 points to 2nd degree (in whole mode)
This maintains net attribution tracking (positive points offset by negative points)
Points are automatically distributed to all attributed influencers based on their connection degree and campaign configuration
Net Volume Calculation:
Net volume is calculated by summing all
conversionValueamountsExample: $100 lock + (-$30 unlock) = $70 net volume
Attribution points are summed to get net points per influencer
Note: If the buyer is not yet a participant in your campaign, a participant record will be created automatically, but no attribution will be calculated until they have connections in the network.
Split Mode Benefits: Split mode prevents point dilution when many people comment on comment threads. Instead of each participant getting 100% attribution, the conversion amount is split proportionally among all connections, ensuring that participants with more connections (more influence paths) receive proportionally more attribution.
Influence Points Marketplace
When a campaign has influence points enabled (influencePointsEnabled: true), conversions automatically create influence point batches for attributed influencers. The commission field is required for these campaigns.
Points economics:
The brand pays a commission on each conversion. ReplyCorp takes a percentage (default 15%), and the remainder is converted to points for influencers.
Example: $10 sale with $2 commission:
ReplyCorp fee (15% of commission): $0.30
Commission for points: $2.00 - $0.30 = $1.70
Points issued: $1.70 × 10,000 points/$1 = 17,000 points
Points are distributed proportionally among attributed influencers based on their attribution share
Points formula: commission × (1 − replyCorpFeePct) × attributionShare × influencePointsPerDollar
Buyer-loyalty points (paused by default):
If BUYER_LOYALTY_RATE is configured above 0, buyers who have already linked their X/Twitter account before the purchase (twitterLinkedAt ≤ convertedAt) and whose conversion produced at least one attributed poster can receive a small buyer-loyalty batch:
Amount:
BUYER_LOYALTY_RATE× the ReplyCorp-fee slice of the commission. The default rate is0, so no buyer-loyalty points are issued unless explicitly enabled.Funded from ReplyCorp's own cut, so it does not increase what the brand pays.
One loyalty batch per conversion, cancelled alongside attribution batches on refund.
Batch
kindisBUYER_LOYALTY(vsATTRIBUTIONfor poster batches).
Points lifecycle:
PENDING: Point batches are created immediately when a conversion is recorded. Points are not yet spendable. The batch enters a refund window (configurable per campaign, default 30 days).
Activation: After the refund window closes AND brand payment is verified, batches transition to ACTIVE and points are credited to the influencer's balance.
Redemption: Influencers can redeem active points for gift cards in the marketplace. Redemptions use FIFO batch deduction. Internal value: 10,000 points = $1 in gift card face value.
Expiry: Unredeemed points expire 12 months after being earned.
Cancellation: If a refund event is recorded with
originalConversionId, any PENDING batches for that conversion are cancelled and any ACTIVE points are reversed.
Brand payment rails:
Point batches stay PENDING until the brand's commission is verified as paid. Each organization picks one rail (configured in the ReplyWeb admin panel):
Stripe ACH — the brand links a US bank account via Stripe Financial Connections; ReplyCorp auto-debits accrued commission every
paymentFrequencyDays(default 10 days).USDC Prepaid — the brand deposits USDC on Ethereum mainnet into ReplyCorp's
BrandPrepaidLedgercontract; commission is consumed from the prepaid balance when batches are due to activate. A daily email alert fires if the balance is too low to cover upcoming activations.
Either rail unlocks the same PENDING → ACTIVE points lifecycle.
Tax compliance and OFAC screening:
US recipients who cross the IRS reporting threshold (default $600/year, lower for some states) are prompted to complete a W-9 (or W-8BEN for non-US persons) through TaxBandits before redemptions over the threshold can complete. They are also asked for electronic-1099 delivery consent. At redemption time, recipients are screened against the OFAC SDN list; matches are blocked with the error code OFAC_BLOCKED.
Campaign settings: influencePointsPerDollar (default 10,000), refundWindowDays (default 30), ReplyCorp fee percentage (default 15%, configurable per campaign).
Lock Expiry and Auto-Unlock
For lock events with expiry timestamps:
Lock Creation: When a lock event is received with
metadata.expiresAt, the system schedules a background job to process the expiry exactly when the lock expires.Manual Unlock: If a manual unlock event is received before expiry, the scheduled expiry job is automatically canceled to prevent duplicate unlock events.
Automatic Expiry: When a lock expires:
The system checks if the lock has already been manually unlocked
If not unlocked, an automatic unlock event is created with
metadata.expired: trueAttribution points are distributed (negative points to offset the original lock)
The unlock event is processed exactly at expiry time (or very close, depending on Redis/BullMQ precision)
Duplicate Prevention: The system prevents duplicate unlocks by:
Requiring
txHashfor both lock and unlock eventsChecking for existing unlock events before creating new ones
Canceling scheduled expiry jobs when manual unlocks occur
Using database transactions to handle race conditions
Example Lock Expiry Flow:
Lock created with
expiresAt: 1735689600(3 months from now)System schedules job to execute at that timestamp
If user manually unlocks before expiry → scheduled job is canceled
If lock expires without manual unlock → auto-unlock event created automatically
Campaign Admin Endpoints
In addition to the conversion endpoint, the same X-API-Key can manage campaign-level settings.
Update campaign settings
Endpoint: PATCH /api/v1/campaigns/{campaignId}
Selected updatable fields:
mentionHandle
string
X/Twitter handle the campaign tracks (without @).
autoMessagesEnabled
boolean
Toggle auto rank-reply / welcome messages. BASIC plan accounts cannot enable this.
attributionConfig
object
pointsSplitMode ("whole" or "split") and pointsSplitConfig (upstreamRatio, downstreamRatio, degreeWeights.first, degreeWeights.second). See "How Attribution Works" above.
brandContentGuidelines
object | null
Per-post content rules used to gate point issuance. Shape: { disclosureFormat?, requiredPhrases?: string[], bannedPhrases?: string[], supportingCopy?, commissionSummary? }. Set to null to clear.
Example — set brand content guidelines:
When brandContentGuidelines is set, posts that don't satisfy the phrase rules are still counted as engagement but are filtered out at point-issuance time — those posters won't earn points for the affected conversions.
Banned poster accounts
A campaign can maintain a per-campaign blocklist of X accounts that are excluded from earning points (engagement is still tracked).
List banned accounts: GET /api/v1/campaigns/{campaignId}/banned-poster-accounts
Add a banned account: POST /api/v1/campaigns/{campaignId}/banned-poster-accounts
Request body accepts either:
or:
Remove a banned account: DELETE /api/v1/campaigns/{campaignId}/banned-poster-accounts/{accountId}
Resolve a Twitter handle
Use this to verify that a handle exists on X before banning it or referencing it elsewhere.
Endpoint: GET /api/v1/campaigns/{campaignId}/resolve-twitter-handle?handle=username
Returns the user's numeric Twitter ID and canonical handle on success, or a 404 if the handle is not found.
Backward Compatibility
The API maintains full backward compatibility with existing integrations:
Omitting
eventType: IfeventTypeis not provided, it defaults to"purchase"Positive amounts only: When
eventTypeis omitted, the API still requires positive amounts (existing behavior)Response format: The response includes both
conversionTypeandeventTypefields, but existing consumers can continue usingconversionTypeNumeric fields (
amount,commission): Accept JSON numbers or string-encoded numbers. Use strings when you need to preserve precision for large token amounts (e.g."123456789012345.6789").
Campaign Points Configuration
ReplyCorp uses a temporal, append-only configuration system for campaign points settings. This design provides several powerful capabilities:
How It Works:
Campaign points configurations are stored in a database table with rows for each campaign
When you update attribution settings, new rows are added instead of updating existing ones
The system always uses the current active configuration when calculating attribution
All historical configurations are preserved for analysis and backtesting
Key Benefits:
Temporal Queries: You can query attribution calculations as they were at any point in time. When a conversion is recorded, the system uses the active configuration at that moment, and you can later see exactly what configuration was applied.
Multi-Layer Functionality: The
degreeOfAttributionbecomes a field in each configuration row, not a global constant. This means you can have different attribution degrees for different connection layers (1st degree, 2nd degree, etc.) and change them independently over time.Complete History: Every configuration change is preserved, allowing you to:
See how attribution rules evolved over time
Backtest different configurations to model outcomes
Audit attribution decisions by viewing the exact configuration that was active when each conversion was recorded
Compare the impact of different attribution strategies
Example Use Case:
If you change your attribution configuration from "first degree only" to "first and second degree with 50/50 split", the new configuration is added as a new row. All conversions recorded after that point will use the new configuration, while conversions recorded before will retain their original attribution based on the previous configuration. This allows you to analyze the impact of the change and even model what would have happened if you had used different settings.
Integration Examples
JavaScript/Node.js
Python
PHP
Deprecated Features
Leaderboard Endpoints (Deprecated in v1.5.0)
Status: Deprecated as of v1.5.0
The following leaderboard endpoints have been deprecated and will be removed in a future version:
GET /api/v1/campaigns/{campaignId}/leaderboard-pullGET /api/v1/campaigns/{campaignId}/leaderboard
Access requirements:
GET /api/v1/campaigns/{campaignId}/leaderboard-pullrequires authentication for every campaign, including public campaigns. API-key access additionally requires the Growth tier or above. Use the campaign organization's API key inX-API-Key(the existingapi_keyquery parameter is also supported), or an authorized organization session cookie. Organization members must have access to the requested campaign. Validated support sessions are limited to the selected organization.GET /api/v1/campaigns/{campaignId}/participants/{participantId}/conversionshas the same authentication and campaign-access requirements. The participant must belong to the requested campaign.Missing or invalid authentication on these protected endpoints returns
401. Authenticated callers without campaign access receive403.GET /api/v1/campaigns/{campaignId}/leaderboardandGET /api/v1/campaigns/{campaignId}/leaderboard-publicallow anonymous access to active public campaigns. Their responses omit email and wallet fields. Private campaigns require an authorized organization identity (403otherwise); inactive campaigns require that identity as well (400otherwise). Authorized organization users may inspect private and inactive campaigns.
For public ranking displays, use leaderboard-public. The protected leaderboard-pull response continues to include available email and wallet values for authorized integrations. These endpoints remain operational; deprecation does not mean they return 410 Gone.
Migration Path: If you are currently using leaderboard endpoints, please contact support@replycorp.io for migration assistance. We recommend using the conversion tracking API and attribution data to build custom leaderboard displays based on your specific needs.
Timeline: These endpoints will continue to function but are no longer maintained. They will be removed in a future major version release.
Error Handling
Common Error Codes
400
Bad Request
Invalid request parameters or body
401
Unauthorized
Missing or invalid API key
403
Forbidden
Access denied (e.g., campaign belongs to different organization)
404
Not Found
Resource not found (campaign, participant, etc.)
409
Conflict
Duplicate conversion or resource conflict
500
Internal Server Error
Server error occurred
Error Response Format
All error responses follow this format:
Handling Errors in Your Code
JavaScript Example:
Rate Limits
Current Limits
Conversion API: No specific rate limit (subject to fair use)
Reporting API reads (Growth+): 600 requests per hour per organization, reported via standard
RateLimit-*headers
Best Practices
Batch Conversions: If recording multiple conversions, make sequential requests rather than parallel to avoid overwhelming the system.
Error Retry: Implement exponential backoff for retries on 500 errors.
Example Retry Logic:
Support
Getting Help
Email: support@replycorp.io
Documentation: https://docs.replycorp.io
Status Page: https://status.replycorp.io
Reporting Issues
When reporting issues, please include:
API endpoint you're calling
Request headers (mask your API key)
Request body
Response status code and body
Timestamp of the request
Changelog
October 16, 2026
Documented Instagram buyer identification (the capability itself predates this entry): the conversion endpoint accepts
verificationCodeas an alternative totwitterIdfor buyers verified through ReplyCorp's Instagram DM flow, andPOST /api/v1/codes/resolvereturns the verified Instagram identity behind a code. See Identifying Instagram Buyers.Updated combined Conversion Intelligence + Rewards guidance: current setups use a single organization with Rewards as an add-on; dual reporting applies to legacy two-organization customers only.
Version 2.3.0 (October 2026)
Reporting API v1 (Growth+): programmatic read access to campaign stats, stats history, per-post analytics, recent conversions, conversion events with attribution, AI insights, and post engagers, using the same
X-API-Key. See Reporting API & MCP.MCP server: built-in Model Context Protocol endpoint at
/api/v1/mcp(Streamable HTTP) exposing the reporting reads as 8 agent tools, so AI assistants can pull live campaign insights. Growth+, read-only.Tier gating of read endpoints: API-key access to read/reporting endpoints (including the engagement read endpoints and
leaderboard-pull) now requires the Growth tier or above; denied requests return403with"code": "plan_capability_denied". Conversion posting (POST /conversions), conversion reconciliation (GET /conversions/{conversionId}), Instagram DM verification, and code resolution are unaffected and remain available on every tier. Dashboard sessions are never tier-gated.Reporting reads are rate-limited to 600 requests/hour per organization.
September 11, 2026
Clarify leaderboard authentication, campaign access, public ranking responses, and participant-conversion access requirements.
Use
YOUR_CAMPAIGN_IDas the campaign placeholder in examples.
Version 2.2.0 (September 2026)
Token-denominated conversion reporting: New optional
currencyfield on the conversion endpoint (defaultUSD). Brands in token-native ecosystems can postamount/commissionin a supported token (starting withAPE); ReplyCorp converts to USD once at ingest using a DIA spot quote. Points, billing, and payments remain USD-denominated.New
fxobject in the conversion response (and stored onmetadata.fx) with the applied rate, quote source and timestamp, and original token amounts for accounting/proofRefund events with
originalConversionIdreuse the rate stored on the original conversion, so the USD reversal matches what was credited regardless of token price movementNew
GET /api/v1/conversions/supported-currenciesendpoint publishing the supported token listNew error responses:
400for unsupported currencies,503when the FX rate is temporarily unavailable (safe to retry)
Version 2.1.0 (May 2026)
signupevent type: New zero-amount event type for tracking waitlist signups and registrations.amountis optional (defaults to0),commissionis not required, and influence points are not generated. Attribution is tracked normally, enabling brands to attribute signups to influencers before paid conversions begin.
Version 2.0.0 (May 2026)
This is a major release that consolidates the Influence Points Marketplace and adds first-class admin endpoints. There are no breaking changes to the conversion request shape; the version bump reflects the expanded scope and the new product surface around brand payment, tax compliance, and content guidelines.
Campaign admin endpoints (same
X-API-Key):PATCH /api/v1/campaigns/{id}now supportsbrandContentGuidelines(requiredPhrases,bannedPhrases,supportingCopy,commissionSummary,disclosureFormat),autoMessagesEnabled,attributionConfig(pointsSplitMode+pointsSplitConfig), andmentionHandle.GET / POST /api/v1/campaigns/{id}/banned-poster-accountsandDELETE /api/v1/campaigns/{id}/banned-poster-accounts/{accountId}to manage per-campaign poster blocklists.GET /api/v1/campaigns/{id}/resolve-twitter-handle?handle=...to verify an X username exists.
Brand content guidelines enforcement: When
brandContentGuidelinesis set on a campaign, posts must include at least one of therequiredPhrasesand none of thebannedPhrasesto earn points for an associated conversion. Engagement is still tracked either way; only point issuance is gated.Buyer-loyalty points: Buyer social-connect rewards are supported by the
BUYER_LOYALTYbatch kind but are paused by default (BUYER_LOYALTY_RATE=0). If enabled later, they are funded from ReplyCorp's cut and add no cost to the brand.Brand payment rails: Documented both supported rails for funding commission — Stripe ACH (auto-debit via Financial Connections) and USDC Prepaid (deposit into
BrandPrepaidLedgeron Ethereum mainnet). Either rail unblocks the same PENDING → ACTIVE points flow.Tax compliance and OFAC screening: US recipients are routed through TaxBandits (W-9 / W-8BEN + electronic-1099 delivery consent) when they cross IRS reporting thresholds. Redemptions are screened against the OFAC SDN list; matches are rejected with
OFAC_BLOCKED.Numeric-string support:
amountandcommissionaccept JSON numbers or string-encoded numbers, so high-precision token amounts can be sent without floating-point loss.
Version 1.8.0 (April 2026)
Influence Points Marketplace: Campaigns can now enable influence points (
influencePointsEnabled) for automatic point distribution to attributed influencersNew required
commissionfield: brands provide bothamount(sale value, for attribution) andcommission(what the brand pays, for points calculation)Points formula:
commission × (1 − replyCorpFeePct) × attributionShare × pointsPerDollarNew
pendingInfluencePointsarray in conversion response withtwitterId,pointsPending, andbatchIdfor each batch createdNew
originalConversionIdrequest field for refund events to cancel pending/active point batches from the original conversionNew
cancelledInfluencePointsresponse field on refund events showingpendingCancelledandactiveCancelledcountsPoints lifecycle: PENDING (refund window) → ACTIVE (redeemable) → redeemed for gift cards or expired after 12 months
Configurable per campaign:
influencePointsPerDollar(default 10,000),refundWindowDays(default 30), ReplyCorp fee percentage (default 15%)
Version 1.5.0 (January 2026)
Leaderboard Endpoints Deprecated: Deprecated leaderboard endpoints as part of API simplification
GET /api/v1/campaigns/{campaignId}/leaderboard-pull- DeprecatedGET /api/v1/campaigns/{campaignId}/leaderboard- DeprecatedThese endpoints will continue to function but are no longer maintained
Endpoints will be removed in a future major version release
Migration assistance available via support@replycorp.io
Recommendation: Use conversion tracking API and attribution data to build custom leaderboard displays
Version 1.4.3 (January 8, 2026)
Participant Engagement and Connection Status: Added participant status fields to conversion endpoint response
New
hasEngagedfield inconversion.participant: Boolean indicating if the buyer has actually engaged with tagged posts (commented, replied, or engaged with posts mentioning your campaign). Only counts actual post interactions (ReplyWebEvent records), not other ways of joining the campaign.New
hasConnectedfield inconversion.participant: Boolean indicating if the buyer has connected their X account and wallet (CampaignRegistrant exists with walletConnectedAt)Enables comment & connect incentive feature for customers to reward buyers who have engaged with posts and connected before purchasing
Fully backward compatible - existing response fields preserved
Version 1.4.2 (January 6, 2026)
Auto Messages Control: Added campaign-level control for automatic messages on X (Twitter)
New
autoMessagesEnabledfield in campaign configuration (default:false)When
false, campaigns will not send automatic rank replies or welcome messages on XWhen
true, campaigns will send automatic messages as configuredPlan Restriction: BASIC plan accounts cannot enable auto messages (feature unavailable)
STANDARD, PROFESSIONAL, and ENTERPRISE plans can toggle auto messages on/off
Configured via campaign update endpoint (
PATCH /api/v1/campaigns/:id) or admin dashboardExisting campaigns on non-BASIC plans default to
true(backward compatible)Existing campaigns on BASIC plans default to
false(feature unavailable)
Version 1.4.1 (January 6, 2026)
Attribution Points Threshold: Added campaign-level threshold filtering for attribution eligibility
Uses existing
rewardThresholdfield fromcustomBrandingmetadata (same threshold used for weekly rewards eligibility)New
eligibleAttributionsarray in conversion response: contains only users who meet the threshold (only present whenrewardThresholdis set)Percentages in
eligibleAttributionsare recalculated to sum to 100% across eligible users onlyThreshold is based on cumulative attribution points across all conversions in the campaign
Returns empty
eligibleAttributionsarray whenrewardThresholdis not set or no users meet the thresholdFully backward compatible - existing
attributionsarray unchangedConfigured via "Edit Campaign Metadata" page (no separate threshold field needed)
Version 1.4.0 (January 6, 2026)
Attribution Payout Schema: Added detailed attribution information to conversion endpoint response
New
attributionsarray inattributionobject containing detailed information for each attributed userEach attribution includes:
twitterId,twitterHandle,walletAddress,attributedAmount,attributionPercentage, anddegreeEnables partners to calculate revenue share payouts programmatically
walletAddressisnullwhen user hasn't connected their walletAttribution percentages are always positive (0-100), even for negative events
Empty attributions return empty array
[]for isolated usersFully backward compatible - all existing response fields preserved
Version 1.3.0 (December 30, 2025)
Attribution Split Configuration: Added campaign-level configuration to split attribution points between upstream and downstream participants
New
pointsSplitModefield inattributionConfig:"whole"(default) or"split"New
pointsSplitConfigobject with configurable ratios:upstreamRatio(default: 0.8) anddownstreamRatio(default: 0.2) - must sum to 1.0degreeWeightswithfirst(default: 1.0) andsecond(default: 0.15) multipliers
Split mode prevents point dilution when many people comment on comment threads
Attribution is calculated per-connection first, then aggregated by participant
Backward compatible: defaults to
"whole"mode for existing campaignsUpdated campaign update endpoint (
PATCH /api/v1/campaigns/:id) to support new configuration fields
Version 1.2.0 (December 26, 2025)
Lock Expiry and Auto-Unlock: Added automatic expiry handling for lock events
Lock events now support
metadata.txHash(required) andmetadata.expiresAt(optional, epoch seconds)Unlock events now require
metadata.txHashto reference the lock being unlockedSystem automatically creates unlock events when locks expire if they haven't been manually unlocked
Manual unlocks cancel scheduled expiry jobs to prevent duplicate unlocks
Expiry jobs are processed exactly at expiry time using BullMQ delayed jobs
Version 1.1.0 (December 19, 2025)
Event-Based Conversion API: Added support for multiple event types (
lock,unlock,buy,sell,purchase,refund) with positive and negative amountsEnhanced Registrants Endpoint: Updated
/registrants/userendpoint to:Return connection data (firstDegree, secondDegree, total)
Include attribution data (attributedSales, points) calculated using
calculateAttributionScore
Version 1.0.0
Initial release of ReplyCorp API
Conversion tracking endpoint
API key authentication
Appendix
Campaign ID Format
Campaign IDs are UUIDs. Replace YOUR_CAMPAIGN_ID in examples with the ID of your campaign:
Twitter ID Format
Twitter/X user IDs are numeric strings:
To get a user's Twitter ID, you can use Twitter's API or third-party tools.
Wallet Address Formats
EVM Wallets: Start with
0xand are 42 characters longExample:
0xabc123def456ghi789jkl012mno345pqr678stu901vwx234yz
Solana Wallets: Base58 encoded, typically 32-44 characters
Example:
So11111111111111111111111111111111111111112
Last Updated: May 2026 (Version 2.1.0)
Last updated

