Newsletter referral
Newsletter subscribers
Manage subscribers in Newsletter Referral programs
POST
/
v1
/
subscribers
Newsletter subscribers
curl --request POST \
--url https://api.example.com/v1/subscribersimport requests
url = "https://api.example.com/v1/subscribers"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.example.com/v1/subscribers', 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://api.example.com/v1/subscribers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/subscribers"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/v1/subscribers")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/subscribers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body{
"data": {
"id": "[email protected]",
"name": "John Doe",
"email": "[email protected]",
"is_referred": false,
"tos": true,
"marketing_consent": true,
"status": "Active",
"approved": true,
"portal_link": "https://partnero.referral.site/portal/xxx",
"share_link": "https://partnero.referral.site/share/xxx",
"referrals_count": 0,
"reward": [],
"created_at": "2025-05-12T22:03:20.000000Z"
},
"status": 1
}
Create Subscriber
POST https://api.partnero.com/v1/subscribers
Subscribers are automatically created when signing up via the Partnero portal or through ESP sync.
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | No | Unique ID (auto-generated, or synced from ESP) |
email | string | Yes | Unique email address |
name | string | No | Subscriber’s name |
tos | boolean | No | Terms of service accepted |
marketing_consent | boolean | No | Marketing consent given |
status | string | No | active, rejected, suspended |
approved | boolean | No | Whether subscriber is approved |
referral | object | No | The subscriber who referred this person |
referral.id | string | Yes* | Referring subscriber’s ID |
referral.email | string | Yes* | Referring subscriber’s email |
Request
cURL
curl --location 'https://api.partnero.com/v1/subscribers' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"email": "[email protected]",
"name": "John Doe",
"tos": true,
"marketing_consent": true,
"status": "active",
"approved": true
}'
Response
{
"data": {
"id": "[email protected]",
"name": "John Doe",
"email": "[email protected]",
"is_referred": false,
"tos": true,
"marketing_consent": true,
"status": "Active",
"approved": true,
"portal_link": "https://partnero.referral.site/portal/xxx",
"share_link": "https://partnero.referral.site/share/xxx",
"referrals_count": 0,
"reward": [],
"created_at": "2025-05-12T22:03:20.000000Z"
},
"status": 1
}
Response Fields
| Field | Type | Description |
|---|---|---|
portal_link | string | Link to subscriber’s portal |
share_link | string | Subscriber’s referral link to share |
referrals_count | integer | Number of referred subscribers |
is_referred | boolean | Whether this subscriber was referred |
reward | array | Earned rewards |
List Subscribers
GET https://api.partnero.com/v1/subscribers
| Parameter | Type | Description |
|---|---|---|
limit | integer | Results per page (10-100, default: 10) |
page | integer | Page number |
refer_status | string | Filter: referred or non_referred |
Get Subscriber
GET https://api.partnero.com/v1/subscribers/{id|email}
Search Subscribers
GET https://api.partnero.com/v1/subscribers:[email protected]
Update Subscriber
PUT https://api.partnero.com/v1/subscribers/{id|email}
{
"update": {
"name": "Updated Name",
"status": "active",
"approved": true
}
}
Delete Subscriber
DELETE https://api.partnero.com/v1/subscribers/{id|email}
⌘I
Newsletter subscribers
curl --request POST \
--url https://api.example.com/v1/subscribersimport requests
url = "https://api.example.com/v1/subscribers"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.example.com/v1/subscribers', 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://api.example.com/v1/subscribers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/subscribers"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/v1/subscribers")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/subscribers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body{
"data": {
"id": "[email protected]",
"name": "John Doe",
"email": "[email protected]",
"is_referred": false,
"tos": true,
"marketing_consent": true,
"status": "Active",
"approved": true,
"portal_link": "https://partnero.referral.site/portal/xxx",
"share_link": "https://partnero.referral.site/share/xxx",
"referrals_count": 0,
"reward": [],
"created_at": "2025-05-12T22:03:20.000000Z"
},
"status": 1
}
