Approve partner
curl --request POST \
--url https://api.example.com/v1/partners/{id}/approveimport requests
url = "https://api.example.com/v1/partners/{id}/approve"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.example.com/v1/partners/{id}/approve', 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}/approve",
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}/approve"
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}/approve")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/partners/{id}/approve")
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": "partner_123",
"email": "[email protected]",
"name": "John",
"surname": "Doe",
"approved": true,
"status": "active",
"created_at": "2025-04-30T16:44:13.000000Z",
"updated_at": "2025-05-02T09:12:40.000000Z"
},
"status": 1
}
Partners
Approve partner
Approve a partner who is pending approval and give them access to the partner portal
POST
/
v1
/
partners
/
{id}
/
approve
Approve partner
curl --request POST \
--url https://api.example.com/v1/partners/{id}/approveimport requests
url = "https://api.example.com/v1/partners/{id}/approve"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.example.com/v1/partners/{id}/approve', 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}/approve",
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}/approve"
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}/approve")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/partners/{id}/approve")
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": "partner_123",
"email": "[email protected]",
"name": "John",
"surname": "Doe",
"approved": true,
"status": "active",
"created_at": "2025-04-30T16:44:13.000000Z",
"updated_at": "2025-05-02T09:12:40.000000Z"
},
"status": 1
}
Endpoint
POST https://api.partnero.com/v1/partners/{id}/approve
This endpoint is available for affiliate programs only.
partner.approved webhook is sent.
The call is safe to retry. Approving a partner who is already approved changes nothing and returns the partner as is.
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Partner’s ID, key or email |
Request
cURL
curl --location --request POST 'https://api.partnero.com/v1/partners/partner_123/approve' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY'
Response
Returns the updated partner, in the same format as Get partner.{
"data": {
"id": "partner_123",
"email": "[email protected]",
"name": "John",
"surname": "Doe",
"approved": true,
"status": "active",
"created_at": "2025-04-30T16:44:13.000000Z",
"updated_at": "2025-05-02T09:12:40.000000Z"
},
"status": 1
}
Behavior
- Rejected partners can be approved. This reactivates them, as in the dashboard.
- Suspended partners who are already approved are not unsuspended. The call is a no-op.
- Partners without an approval request (for example, partners who signed up through an instant link, or programs that don’t require approval) can be approved, but the
partner.approvedwebhook is not sent for them, because that event is tied to the approval request. The dashboard behaves the same way.
Error responses
| Status | Error | Solution |
|---|---|---|
| 401 | Unauthenticated | Check your API key is set in the Authorization header |
| 404 | Partner not found | Check the partner ID, key or email. Archived partners can’t be approved; restore them first |
| 422 | Failed to approve partner | The approval couldn’t be completed. The reason is in the message field |
Was this page helpful?
