POST
/
referrals
cURL
curl --request POST \
  --url https://api-dev.withflock.com/referrals \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
  "campaignId": "<string>",
  "refereeId": "<string>",
  "refereeExternalUserId": "<string>",
  "referralCode": "<string>"
}'
{
  "id": "<string>",
  "campaignId": "<string>",
  "refereeId": "<string>",
  "referrerId": "<string>",
  "status": {},
  "suspectedFrauds": [
    {
      "message": "<string>",
      "type": "<string>"
    }
  ],
  "environment": "production",
  "organizationId": "<string>",
  "applicationId": "<string>",
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "deletedAt": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

Body

application/json
campaignId
string
required
referralCode
string
required
refereeId
string

The ID of the customer being invited. Use this or refereeExternalUserId to identify the customer

refereeExternalUserId
string

The external ID of the customer being invited. Use this or refereeId to identify the customer

Response

201 - application/json
id
string
required
campaignId
string
required
refereeId
string | null
required
referrerId
string
required
status
object
required
suspectedFrauds
object[] | null
required
environment
enum<string>
required
Available options:
production,
test
organizationId
string
required
applicationId
string
required
createdAt
string<date-time>
required
updatedAt
string<date-time>
required
deletedAt
string<date-time> | null
required