Create Referral Link
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
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/referral-links" \ -H "Content-Type: application/json" \ -d '{ "projectId": "string", "participant": { "kind": "individual", "externalId": "string" }, "programId": "string", "slug": "string" }'{ "success": true}Create Referral Code POST
Previous Page
Create Webhook Endpoint POST
Subscribes a URL to webhook events of the Project. An automation app subscribes with it and unsubscribes with DELETE. The endpoint keeps the current apiVersion. Its fulfillmentMode is on_delivery by default: a 2xx other than 202 to reward.earned records the Reward's fulfillment. Use explicit when the receiver confirms each grant through POST /v1/rewards/{rewardId}/fulfillment. The URL must use https and reach a public address.