Rekey Participant
Renames the participant that the body names by kind and external ID to newExternalId, for example when your user IDs change. The kind stays. The old ID is retired: it keeps naming the same participant in every call, and it never names another participant of the Project and kind. Name the participant by its current external ID. A retry that names the old ID again returns the participant and changes nothing. An unknown or deleted participant returns 404; the call creates no participant. A new ID that another participant has, or that a rename retired, returns 409, and so does a name that is no longer the current ID. A fact keeps the participant reference that it was sent with: a retry of an earlier fact must name the participant as the first request did.
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/participants/rekey" \ -H "Content-Type: application/json" \ -d '{ "projectId": "string", "participant": { "kind": "individual", "externalId": "string" }, "newExternalId": "string" }'{ "participantId": "string", "kind": "individual", "externalId": "string", "name": "string", "email": "string", "billingIds": { "property1": "string", "property2": "string" }, "success": true}Voided Webhook
An operator voided a referral. Its Rewards are voided, and later Events of the referee get no referral. RefRef POSTs the event to each enabled endpoint of the Project that subscribes to referral.voided, and retries for about 72 hours until the endpoint answers 2xx.
Rename Benefit Rule PUT
Change the name of a benefit rule. The rule and its terms do not change. A write applies at once. Needs the programs:write key permission.