Create a referral code
POST/referral_codes
Mints a referral code for your application. No relationship with the company is needed.
Put it on any wefunder.com link as ?wfr=<id>.
Before its first code, your organization must accept the referral attribution terms once:
Wefunder does not pay partners per referral, and a partner may not be compensated per
referral unless it is a registered broker-dealer. Until an owner or admin accepts them in
the developer portal, this returns 422 attribution_terms_required with
details.acceptance_url.
An application may have at most 500 active codes (422 quota_exceeded); deactivate codes
you no longer use. UTM presets fill blank utm_* fields on visits that carry the code. A
source or campaign starting with wf_ is reserved for Wefunder's own channels and
returns 422 reserved_utm_prefix. Idempotency keys are not supported here: a retried
request may create a second code, which you can deactivate.
Request
Responses
- 201
- 401
- 403
- 404
- 422
Referral code created
Authentication required or token is invalid/expired. This error occurs when:
- No Authorization header is provided
- The access token is invalid or malformed
- The access token has expired
- The access token has been revoked
To resolve: Obtain a new access token using the OAuth 2.0 flow.
The authenticated user does not have permission to access this resource. This typically means:
- The user is authenticated but lacks the required OAuth scope
- The resource belongs to a different user
- The user's role doesn't allow this operation
Check that your OAuth token includes the necessary scopes for this endpoint.
The requested resource does not exist or is not visible to this token.
attribution_terms_required (with details.acceptance_url), quota_exceeded,
reserved_utm_prefix, invalid_params, or validation_error.