Delete user referrer relationship

Removes the user_referrers row for a user in the project derived from the API key.

Authentication:

  • Requires API key with service_role scope in the Authorization header: Authorization: Bearer <api_key>

Use cases:

  • Clear admin-imported referrer assignments created via PUT without a referral code redemption
  • Undo update_user_referrer / PUT assignments when remove_user_from_referral_code cannot apply (no matching referral code use)

Behavior:

  • Orphaned referral_code_uses rows (referrer/code no longer matches current user_referrers) are deleted automatically and actual_uses is decremented
  • If the user has matching referral_code_uses and force is not set, returns 422 — use DELETE /v1/referral_codes/{code}/referrals instead
  • With force=true, deletes all referral_code_uses for the user (matching or orphaned), decrements actual_uses, then deletes user_referrers
  • If no row exists, returns 422 User referrer relationship not found
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Query Params
string
required

The identifier of the user (referee)

string
enum
required

The type of identifier for the user

Allowed:
boolean
Defaults to false

When true, delete all referral_code_uses for the user (including matching redemptions)
before removing user_referrers. Default false keeps the 422 guard for aligned redemptions.

Responses
204

No Content - User referrer relationship deleted

400

Bad Request - Invalid user identifier

401

Unauthorized - Missing or invalid API key

403

Forbidden - API key does not have service_role scope

404

Not Found - Project not found

422

Unprocessable Entity - User referrer not found, or user has referral code redemptions

Language
Credentials
Bearer
LoadingLoading…
Response
Click Try It! to start a request and see the response here!