POST
/
rewards
/
trigger
cURL
curl --request POST \
  --url https://api-dev.withflock.com/rewards/trigger \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
  "externalUserId": "<string>",
  "rewardFor": [
    "self",
    "referral_partner"
  ],
  "environment": "production"
}'
[
  {
    "id": "<string>"
  }
]

Authorizations

Authorization
string
header
required

Body

application/json
externalUserId
string
required
environment
enum<string>
required
Available options:
production,
test
rewardFor
string[]

Specifies which party or parties should receive a reward. - self: Reward the user specified in externalUserId - referralPartner: Reward the user linked through the referral relationship (i.e., the referrer if userId is an invitee, or the invitee if userId is a referrer) You can include one or both values. Default value: ['self', 'referralPartner']

Response

201 - application/json
id
string
required