Publish Reward Terms
Authorization
WorkspaceApiKey Workspace-owned Better Auth API key of one environment (Sandbox or Live); it authorizes the Projects of that environment in its Workspace. A Project of the other environment returns 403 ENVIRONMENT_MISMATCH. Never expose it in the browser.
In: header
Path Parameters
\S1 <= length <= 512Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/benefit-rules/string/terms" \ -H "Content-Type: application/json" \ -d '{ "projectId": "string", "terms": { "benefitKind": "cash", "changeNote": "string", "calculation": "fixed", "fixedAmountMinor": "string", "currency": "string", "currencyExponent": 0 } }'{ "success": true}Publish Referee Offer POST
Publish a new referee offer version: what a referred person gets, as shown in the Widget and join page. A write applies at once. Needs the programs:write key permission.
Record Referral POST
Record a referral that you already know, for example from a support ticket or a sales call: the referee (by kind and your external ID; RefRef creates it when it does not know it), the referrer (by kind and external ID, or by its referral code, the only way to name a partner), and the Program. The referrer must be enrolled in the Program now. A referee that already has a referral is a conflict, and so is a referee with a purchase when the attribution policy accepts only new customers. The referral has no binding fact: Events that RefRef receives after it use it. A write applies at once. Needs the referrals:write key permission.