Update affiliate email settings
curl --request PUT \
--url https://api.firstpromoter.com/api/v2/affiliate/email_settings/{id} \
--header 'Account-ID: <account-id>' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"e": "<string>",
"marketing_consent": true,
"emails_opt_drip": true,
"emails_opt_new_commission": true,
"emails_opt_new_referral": true,
"emails_opt_payout": true
}
'import requests
url = "https://api.firstpromoter.com/api/v2/affiliate/email_settings/{id}"
payload = {
"e": "<string>",
"marketing_consent": True,
"emails_opt_drip": True,
"emails_opt_new_commission": True,
"emails_opt_new_referral": True,
"emails_opt_payout": True
}
headers = {
"Account-ID": "<account-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
'Account-ID': '<account-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
e: '<string>',
marketing_consent: true,
emails_opt_drip: true,
emails_opt_new_commission: true,
emails_opt_new_referral: true,
emails_opt_payout: true
})
};
fetch('https://api.firstpromoter.com/api/v2/affiliate/email_settings/{id}', 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.firstpromoter.com/api/v2/affiliate/email_settings/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'e' => '<string>',
'marketing_consent' => true,
'emails_opt_drip' => true,
'emails_opt_new_commission' => true,
'emails_opt_new_referral' => true,
'emails_opt_payout' => true
]),
CURLOPT_HTTPHEADER => [
"Account-ID: <account-id>",
"Authorization: Bearer <token>",
"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://api.firstpromoter.com/api/v2/affiliate/email_settings/{id}"
payload := strings.NewReader("{\n \"e\": \"<string>\",\n \"marketing_consent\": true,\n \"emails_opt_drip\": true,\n \"emails_opt_new_commission\": true,\n \"emails_opt_new_referral\": true,\n \"emails_opt_payout\": true\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Account-ID", "<account-id>")
req.Header.Add("Authorization", "Bearer <token>")
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.put("https://api.firstpromoter.com/api/v2/affiliate/email_settings/{id}")
.header("Account-ID", "<account-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"e\": \"<string>\",\n \"marketing_consent\": true,\n \"emails_opt_drip\": true,\n \"emails_opt_new_commission\": true,\n \"emails_opt_new_referral\": true,\n \"emails_opt_payout\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.firstpromoter.com/api/v2/affiliate/email_settings/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Account-ID"] = '<account-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"e\": \"<string>\",\n \"marketing_consent\": true,\n \"emails_opt_drip\": true,\n \"emails_opt_new_commission\": true,\n \"emails_opt_new_referral\": true,\n \"emails_opt_payout\": true\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"company_domain": "<string>",
"emails_opt_drip": true,
"emails_opt_new_commission": true,
"emails_opt_new_referral": true,
"emails_opt_payout": true,
"company_name": "<string>",
"marketing_consent": true
}{
"message": "<string>",
"code": "<string>"
}{
"message": "<string>",
"code": "<string>"
}{
"message": "<string>",
"code": "<string>"
}Affiliate Email Settings
Update affiliate email settings
PUT
/
email_settings
/
{id}
Update affiliate email settings
curl --request PUT \
--url https://api.firstpromoter.com/api/v2/affiliate/email_settings/{id} \
--header 'Account-ID: <account-id>' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"e": "<string>",
"marketing_consent": true,
"emails_opt_drip": true,
"emails_opt_new_commission": true,
"emails_opt_new_referral": true,
"emails_opt_payout": true
}
'import requests
url = "https://api.firstpromoter.com/api/v2/affiliate/email_settings/{id}"
payload = {
"e": "<string>",
"marketing_consent": True,
"emails_opt_drip": True,
"emails_opt_new_commission": True,
"emails_opt_new_referral": True,
"emails_opt_payout": True
}
headers = {
"Account-ID": "<account-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
'Account-ID': '<account-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
e: '<string>',
marketing_consent: true,
emails_opt_drip: true,
emails_opt_new_commission: true,
emails_opt_new_referral: true,
emails_opt_payout: true
})
};
fetch('https://api.firstpromoter.com/api/v2/affiliate/email_settings/{id}', 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.firstpromoter.com/api/v2/affiliate/email_settings/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'e' => '<string>',
'marketing_consent' => true,
'emails_opt_drip' => true,
'emails_opt_new_commission' => true,
'emails_opt_new_referral' => true,
'emails_opt_payout' => true
]),
CURLOPT_HTTPHEADER => [
"Account-ID: <account-id>",
"Authorization: Bearer <token>",
"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://api.firstpromoter.com/api/v2/affiliate/email_settings/{id}"
payload := strings.NewReader("{\n \"e\": \"<string>\",\n \"marketing_consent\": true,\n \"emails_opt_drip\": true,\n \"emails_opt_new_commission\": true,\n \"emails_opt_new_referral\": true,\n \"emails_opt_payout\": true\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Account-ID", "<account-id>")
req.Header.Add("Authorization", "Bearer <token>")
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.put("https://api.firstpromoter.com/api/v2/affiliate/email_settings/{id}")
.header("Account-ID", "<account-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"e\": \"<string>\",\n \"marketing_consent\": true,\n \"emails_opt_drip\": true,\n \"emails_opt_new_commission\": true,\n \"emails_opt_new_referral\": true,\n \"emails_opt_payout\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.firstpromoter.com/api/v2/affiliate/email_settings/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Account-ID"] = '<account-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"e\": \"<string>\",\n \"marketing_consent\": true,\n \"emails_opt_drip\": true,\n \"emails_opt_new_commission\": true,\n \"emails_opt_new_referral\": true,\n \"emails_opt_payout\": true\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"company_domain": "<string>",
"emails_opt_drip": true,
"emails_opt_new_commission": true,
"emails_opt_new_referral": true,
"emails_opt_payout": true,
"company_name": "<string>",
"marketing_consent": true
}{
"message": "<string>",
"code": "<string>"
}{
"message": "<string>",
"code": "<string>"
}{
"message": "<string>",
"code": "<string>"
}Authorizations
Access token passed as a Bearer token in the Authorization header
Headers
Account identifier that specifies which account is making the request
Example:
"acc_123456"
Path Parameters
Promoter ID
Body
application/json
Encrypted email
General company wide marketing consent
Receive helpful emails regarding your referral/affiliate program
Receive notifications each time you get a new reward/commission
Receive notifications when a new user signs up
Receive notifications when a payment is sent to you
⌘I