Create sign-in URL
curl --request POST \
--url https://api.example.com/v1/partners/{id}/sign-in-urlimport requests
url = "https://api.example.com/v1/partners/{id}/sign-in-url"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.example.com/v1/partners/{id}/sign-in-url', 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/partners/{id}/sign-in-url",
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/partners/{id}/sign-in-url"
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/partners/{id}/sign-in-url")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/partners/{id}/sign-in-url")
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": {
"url": "https://partners.yourdomain.com/sso/8f3c...redacted",
"expires_at": "2026-07-16T13:22:00.000000Z"
},
"status": 1
}
Partners
Create sign-in URL
Mint a single-use, short-lived URL that logs a partner straight into their portal dashboard
POST
/
v1
/
partners
/
{id}
/
sign-in-url
Create sign-in URL
curl --request POST \
--url https://api.example.com/v1/partners/{id}/sign-in-urlimport requests
url = "https://api.example.com/v1/partners/{id}/sign-in-url"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.example.com/v1/partners/{id}/sign-in-url', 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/partners/{id}/sign-in-url",
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/partners/{id}/sign-in-url"
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/partners/{id}/sign-in-url")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/partners/{id}/sign-in-url")
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": {
"url": "https://partners.yourdomain.com/sso/8f3c...redacted",
"expires_at": "2026-07-16T13:22:00.000000Z"
},
"status": 1
}
Endpoint
POST https://api.partnero.com/v1/partners/{id}/sign-in-url
url and they are logged into their portal dashboard without entering a password or one-time code. See the Auto-login guide for the full flow.
Available for affiliate and refer-a-friend programs. For refer-a-friend, the “partner” is the referring customer. Call this endpoint server-side — it requires your secret API key.
Identifying the partner
You can pass the partner’s ID in the path, or identify the partner in the request body. Use whichever fits your integration:POST https://api.partnero.com/v1/partners/{id}/sign-in-url # id in the path
POST https://api.partnero.com/v1/partners:sign-in-url # identifier in the body
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | No | Partner’s unique ID. Required unless the partner is identified in the request body. |
Request body
Provide at least one identifier (id, key, or email) unless the id is supplied in the path.
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | No | Partner’s unique ID. |
key | string | No | Partner’s referral key. |
email | string | No | Partner’s email address. |
expires_in | integer | No | Link lifetime in seconds. Defaults to 120. Min 30, max 900. Values outside the range are clamped. |
Identifiers are resolved by priority:
id, then key, then email. Provide the one you have.Request
cURL
curl --location 'https://api.partnero.com/v1/partners:sign-in-url' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"email": "[email protected]",
"expires_in": 120
}'
Response
{
"data": {
"url": "https://partners.yourdomain.com/sso/8f3c...redacted",
"expires_at": "2026-07-16T13:22:00.000000Z"
},
"status": 1
}
| Field | Type | Description |
|---|---|---|
url | string | The single-use sign-in URL on your portal’s domain. Redirect the partner here. |
expires_at | string | ISO-8601 timestamp when the link expires. |
Error responses
| Status | Error | Solution |
|---|---|---|
| 400 | Partner “id”, “key” or “email” must be provided | Include an identifier in the path or body |
| 404 | Partner not found | Check the identifier is correct for this program |
| 422 | Validation failed | expires_in must be an integer between 30 and 900 |
| 429 | Too many requests | Limited to 60 requests per minute; retry after a short delay |
Treat the returned
url as a credential — it signs the partner in on first use. Deliver it only to the intended user and avoid logging it.Generate the link on demand, immediately before redirecting the partner. Because it is single-use and expires quickly, links created ahead of time are usually no longer valid when needed.
Was this page helpful?
