Skip to main content
POST
/
referrals
Create a new referral
curl --request POST \
  --url https://www.pushlapgrowth.com/api/v1/referrals \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "affiliateId": "<string>",
  "affiliateEmail": "jsmith@example.com",
  "promoCode": "<string>",
  "name": "<string>",
  "email": "jsmith@example.com",
  "referredUserExternalId": "<string>",
  "plan": "<string>",
  "status": "<string>"
}'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "affiliateId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "<string>",
  "email": "jsmith@example.com",
  "referredUserExternalId": "<string>",
  "plan": "<string>",
  "status": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Referral details

name
string
required

Name of the referred user

email
string<email>
required

Email of the referred user

referredUserExternalId
string
required

The external ID of the referred user

affiliateId
string

The affiliate ID/Link associated with the referral (required if affiliateEmail and promoCode are not provided)

affiliateEmail
string<email>

The affiliate email associated with the referral (required if affiliateId and promoCode are not provided)

promoCode
string

The promotional code associated with an affiliate (required if affiliateId and affiliateEmail are not provided). When used, the promo code will be validated and its redemption count will be incremented.

plan
string

The plan associated with the referred user

status
string

Status of the referral (active/inactive)

Response

Referral created successfully

id
string<uuid>

The referral ID

affiliateId
string<uuid>

The affiliate ID associated with the referral

name
string

Name of the referred user

email
string<email>

Email of the referred user

referredUserExternalId
string

The external ID of the referred user. This will be an ID you actively maintain that identifies the user on your server (for example, the User ID in your database, or Stripe Customer ID)

plan
string

The plan associated with the referred user

status
string

Status of the referral (active/inactive)

I