Deletes a referral relationship for a specific user, decrementing the usage counter of the referral code.
This allows the referrer to remove a user who used their referral code, making the code available for use again.
The signature is required to verify ownership of the referrer identifier (the owner of the referral code).
Required API Key Scope: referral_codes:read (requires signature) or service_role (no signature required)
Message to sign: The message must be exactly "I am deleting referral for user {user_identifier} from code {code}" where {user_identifier} is the identifier of the user being removed and {code} is the referral code.
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
204No Content - Referral successfully deleted
400Bad Request - Invalid identifier or signature is required (when API key doesn't have service_role scope)
401Unauthorized - Missing or invalid API key, or insufficient scope
422Unprocessable Entity - Invalid signature, invalid signature message, code not found, user has not used this referral code, referral code does not belong to referrer, or user referrer relationship not found