Affiliates
Cria ou retoma um afiliado de demonstração
Cria (ou reconcilia) um afiliado técnico de ativação com e-mail determinístico @activation.repass.test, status approved e link padrão ativo. Não escreve no event store nem dispara webhooks.
POST
/
programs
/
{programId}
/
demo-affiliates
Cria ou retoma um afiliado de demonstração
curl --request POST \
--url https://api.userepass.com/programs/{programId}/demo-affiliates \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"slot": "a",
"name": "<string>"
}
'import requests
url = "https://api.userepass.com/programs/{programId}/demo-affiliates"
payload = {
"slot": "a",
"name": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({slot: 'a', name: '<string>'})
};
fetch('https://api.userepass.com/programs/{programId}/demo-affiliates', 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.userepass.com/programs/{programId}/demo-affiliates",
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([
'slot' => 'a',
'name' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"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.userepass.com/programs/{programId}/demo-affiliates"
payload := strings.NewReader("{\n \"slot\": \"a\",\n \"name\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.post("https://api.userepass.com/programs/{programId}/demo-affiliates")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"slot\": \"a\",\n \"name\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.userepass.com/programs/{programId}/demo-affiliates")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"slot\": \"a\",\n \"name\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"affiliate": {
"id": "aff_01J9Z3K8N2QF4T7B9XP0WMD5RC",
"organizationId": "org_01J9Z3K8N2QF4T7B9XP0WMD5RC",
"programId": "prog_01J9Z3K8N2QF4T7B9XP0WMD5RC",
"affiliateUserId": "user_01J9Z3K8N2QF4T7B9XP0WMD5RC",
"name": "Maria Silva",
"email": "[email protected]",
"status": "approved",
"tier": "gold",
"customCommissionRuleId": "comm_01J9Z3K8N2QF4T7B9XP0WMD5RC",
"acceptedTermsVersion": 3,
"payoutMethod": "pix",
"pixKey": "[email protected]",
"pixKeyType": "email",
"cnpj": "11222333000181",
"importedTotalEarnedCents": 1990,
"importedSince": "2026-06-13T12:00:00.000Z",
"createdAt": "2026-06-13T12:00:00.000Z",
"updatedAt": "2026-06-13T12:00:00.000Z"
},
"defaultLink": {
"id": "link_01J9Z3K7Qn8vYwT2bX4cE6dF8g",
"organizationId": "org_01J9Z3K7Qn8vYwT2bX4cE6dF8g",
"programId": "prog_01J9Z3K7Qn8vYwT2bX4cE6dF8g",
"affiliateId": "aff_01J9Z3K7Qn8vYwT2bX4cE6dF8g",
"token": "maria-silva",
"subId": "instagram-bio",
"destinationUrl": "https://loja.exemplo.com/produto",
"isDefault": true,
"status": "active",
"deactivatedAt": "2026-06-13T12:00:00.000Z",
"createdAt": "2026-06-13T12:00:00.000Z",
"updatedAt": "2026-06-13T12:00:00.000Z",
"url": "https://go.userepass.com/t/maria-silva"
}
}Authorizations
bearerAuthapiKeyAuth
Chave de API (prefixo rstr_) enviada como Authorization: Bearer rstr_....
Path Parameters
Pattern:
^prog_[0-9A-HJKMNP-TV-Z]{26}$Body
application/json
⌘I
Cria ou retoma um afiliado de demonstração
curl --request POST \
--url https://api.userepass.com/programs/{programId}/demo-affiliates \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"slot": "a",
"name": "<string>"
}
'import requests
url = "https://api.userepass.com/programs/{programId}/demo-affiliates"
payload = {
"slot": "a",
"name": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({slot: 'a', name: '<string>'})
};
fetch('https://api.userepass.com/programs/{programId}/demo-affiliates', 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.userepass.com/programs/{programId}/demo-affiliates",
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([
'slot' => 'a',
'name' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"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.userepass.com/programs/{programId}/demo-affiliates"
payload := strings.NewReader("{\n \"slot\": \"a\",\n \"name\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.post("https://api.userepass.com/programs/{programId}/demo-affiliates")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"slot\": \"a\",\n \"name\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.userepass.com/programs/{programId}/demo-affiliates")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"slot\": \"a\",\n \"name\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"affiliate": {
"id": "aff_01J9Z3K8N2QF4T7B9XP0WMD5RC",
"organizationId": "org_01J9Z3K8N2QF4T7B9XP0WMD5RC",
"programId": "prog_01J9Z3K8N2QF4T7B9XP0WMD5RC",
"affiliateUserId": "user_01J9Z3K8N2QF4T7B9XP0WMD5RC",
"name": "Maria Silva",
"email": "[email protected]",
"status": "approved",
"tier": "gold",
"customCommissionRuleId": "comm_01J9Z3K8N2QF4T7B9XP0WMD5RC",
"acceptedTermsVersion": 3,
"payoutMethod": "pix",
"pixKey": "[email protected]",
"pixKeyType": "email",
"cnpj": "11222333000181",
"importedTotalEarnedCents": 1990,
"importedSince": "2026-06-13T12:00:00.000Z",
"createdAt": "2026-06-13T12:00:00.000Z",
"updatedAt": "2026-06-13T12:00:00.000Z"
},
"defaultLink": {
"id": "link_01J9Z3K7Qn8vYwT2bX4cE6dF8g",
"organizationId": "org_01J9Z3K7Qn8vYwT2bX4cE6dF8g",
"programId": "prog_01J9Z3K7Qn8vYwT2bX4cE6dF8g",
"affiliateId": "aff_01J9Z3K7Qn8vYwT2bX4cE6dF8g",
"token": "maria-silva",
"subId": "instagram-bio",
"destinationUrl": "https://loja.exemplo.com/produto",
"isDefault": true,
"status": "active",
"deactivatedAt": "2026-06-13T12:00:00.000Z",
"createdAt": "2026-06-13T12:00:00.000Z",
"updatedAt": "2026-06-13T12:00:00.000Z",
"url": "https://go.userepass.com/t/maria-silva"
}
}