Referrals
Create a referral
POST
/
api
/
v1
/
app
/
referrals
Create a referral
curl --request POST \
--url https://{subdomain}.easyflows.io/api/v1/app/referrals \
--header 'Content-Type: application/json' \
--data '
{
"invite": "ABC123"
}
'import requests
url = "https://{subdomain}.easyflows.io/api/v1/app/referrals"
payload = { "invite": "ABC123" }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({invite: 'ABC123'})
};
fetch('https://{subdomain}.easyflows.io/api/v1/app/referrals', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{subdomain}.easyflows.io/api/v1/app/referrals",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'invite' => 'ABC123'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{subdomain}.easyflows.io/api/v1/app/referrals"
payload := strings.NewReader("{\n \"invite\": \"ABC123\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{subdomain}.easyflows.io/api/v1/app/referrals")
.header("Content-Type", "application/json")
.body("{\n \"invite\": \"ABC123\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{subdomain}.easyflows.io/api/v1/app/referrals")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"invite\": \"ABC123\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "0b0abfba-18a4-4b7e-9179-e0cec1f2994f",
"member": {
"id": "f804cfec-39ec-45cc-845a-4fe51b80d2f0",
"name": "John Doe"
},
"invite": "ABC123",
"reward": {
"id": "d9f8a7c6-5b4e-4c3d-9a2b-1e0f2a3b4c5d",
"type": "coupon",
"name": "10% Off Coupon",
"description": "Get 10% off your next purchase.",
"image": "https://example.com/reward.jpg",
"code": "10-OFF",
"expires_at": "2026-12-31T23:59:59Z",
"revoked_at": null,
"created_at": "2026-01-01T12:00:00Z"
},
"enabled": true,
"created_at": "2026-01-01T12:00:00Z"
}
}{
"error": "<string>"
}⌘I
Create a referral
curl --request POST \
--url https://{subdomain}.easyflows.io/api/v1/app/referrals \
--header 'Content-Type: application/json' \
--data '
{
"invite": "ABC123"
}
'import requests
url = "https://{subdomain}.easyflows.io/api/v1/app/referrals"
payload = { "invite": "ABC123" }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({invite: 'ABC123'})
};
fetch('https://{subdomain}.easyflows.io/api/v1/app/referrals', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{subdomain}.easyflows.io/api/v1/app/referrals",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'invite' => 'ABC123'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{subdomain}.easyflows.io/api/v1/app/referrals"
payload := strings.NewReader("{\n \"invite\": \"ABC123\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{subdomain}.easyflows.io/api/v1/app/referrals")
.header("Content-Type", "application/json")
.body("{\n \"invite\": \"ABC123\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{subdomain}.easyflows.io/api/v1/app/referrals")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"invite\": \"ABC123\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "0b0abfba-18a4-4b7e-9179-e0cec1f2994f",
"member": {
"id": "f804cfec-39ec-45cc-845a-4fe51b80d2f0",
"name": "John Doe"
},
"invite": "ABC123",
"reward": {
"id": "d9f8a7c6-5b4e-4c3d-9a2b-1e0f2a3b4c5d",
"type": "coupon",
"name": "10% Off Coupon",
"description": "Get 10% off your next purchase.",
"image": "https://example.com/reward.jpg",
"code": "10-OFF",
"expires_at": "2026-12-31T23:59:59Z",
"revoked_at": null,
"created_at": "2026-01-01T12:00:00Z"
},
"enabled": true,
"created_at": "2026-01-01T12:00:00Z"
}
}{
"error": "<string>"
}