curl --request POST \
--url https://{domain}/api/v2/network/offers/{offer_id}/custom-params \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"status": 1,
"start_date": "2026-01-01",
"end_date": "2026-01-31",
"affiliates": "5,12",
"conditions": [
{
"type": 1,
"permission": 1,
"conditions": [
{
"id": 1149361
}
]
},
{
"type": 11,
"permission": 3,
"conditions": "promo_a, promo_b"
}
],
"parameters": [
{
"type": 2,
"cap_type": null,
"goal_id": {
"id": 1731
},
"parameter": "7.5"
},
{
"type": 3,
"cap_type": 1,
"goal_id": {
"id": 1731
},
"parameter": "100"
}
]
}
'import requests
url = "https://{domain}/api/v2/network/offers/{offer_id}/custom-params"
payload = {
"status": 1,
"start_date": "2026-01-01",
"end_date": "2026-01-31",
"affiliates": "5,12",
"conditions": [
{
"type": 1,
"permission": 1,
"conditions": [{ "id": 1149361 }]
},
{
"type": 11,
"permission": 3,
"conditions": "promo_a, promo_b"
}
],
"parameters": [
{
"type": 2,
"cap_type": None,
"goal_id": { "id": 1731 },
"parameter": "7.5"
},
{
"type": 3,
"cap_type": 1,
"goal_id": { "id": 1731 },
"parameter": "100"
}
]
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
status: 1,
start_date: '2026-01-01',
end_date: '2026-01-31',
affiliates: '5,12',
conditions: [
{type: 1, permission: 1, conditions: [{id: 1149361}]},
{type: 11, permission: 3, conditions: 'promo_a, promo_b'}
],
parameters: [
{type: 2, cap_type: null, goal_id: {id: 1731}, parameter: '7.5'},
{type: 3, cap_type: 1, goal_id: {id: 1731}, parameter: '100'}
]
})
};
fetch('https://{domain}/api/v2/network/offers/{offer_id}/custom-params', 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://{domain}/api/v2/network/offers/{offer_id}/custom-params",
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([
'status' => 1,
'start_date' => '2026-01-01',
'end_date' => '2026-01-31',
'affiliates' => '5,12',
'conditions' => [
[
'type' => 1,
'permission' => 1,
'conditions' => [
[
'id' => 1149361
]
]
],
[
'type' => 11,
'permission' => 3,
'conditions' => 'promo_a, promo_b'
]
],
'parameters' => [
[
'type' => 2,
'cap_type' => null,
'goal_id' => [
'id' => 1731
],
'parameter' => '7.5'
],
[
'type' => 3,
'cap_type' => 1,
'goal_id' => [
'id' => 1731
],
'parameter' => '100'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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://{domain}/api/v2/network/offers/{offer_id}/custom-params"
payload := strings.NewReader("{\n \"status\": 1,\n \"start_date\": \"2026-01-01\",\n \"end_date\": \"2026-01-31\",\n \"affiliates\": \"5,12\",\n \"conditions\": [\n {\n \"type\": 1,\n \"permission\": 1,\n \"conditions\": [\n {\n \"id\": 1149361\n }\n ]\n },\n {\n \"type\": 11,\n \"permission\": 3,\n \"conditions\": \"promo_a, promo_b\"\n }\n ],\n \"parameters\": [\n {\n \"type\": 2,\n \"cap_type\": null,\n \"goal_id\": {\n \"id\": 1731\n },\n \"parameter\": \"7.5\"\n },\n {\n \"type\": 3,\n \"cap_type\": 1,\n \"goal_id\": {\n \"id\": 1731\n },\n \"parameter\": \"100\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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://{domain}/api/v2/network/offers/{offer_id}/custom-params")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"status\": 1,\n \"start_date\": \"2026-01-01\",\n \"end_date\": \"2026-01-31\",\n \"affiliates\": \"5,12\",\n \"conditions\": [\n {\n \"type\": 1,\n \"permission\": 1,\n \"conditions\": [\n {\n \"id\": 1149361\n }\n ]\n },\n {\n \"type\": 11,\n \"permission\": 3,\n \"conditions\": \"promo_a, promo_b\"\n }\n ],\n \"parameters\": [\n {\n \"type\": 2,\n \"cap_type\": null,\n \"goal_id\": {\n \"id\": 1731\n },\n \"parameter\": \"7.5\"\n },\n {\n \"type\": 3,\n \"cap_type\": 1,\n \"goal_id\": {\n \"id\": 1731\n },\n \"parameter\": \"100\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{domain}/api/v2/network/offers/{offer_id}/custom-params")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"status\": 1,\n \"start_date\": \"2026-01-01\",\n \"end_date\": \"2026-01-31\",\n \"affiliates\": \"5,12\",\n \"conditions\": [\n {\n \"type\": 1,\n \"permission\": 1,\n \"conditions\": [\n {\n \"id\": 1149361\n }\n ]\n },\n {\n \"type\": 11,\n \"permission\": 3,\n \"conditions\": \"promo_a, promo_b\"\n }\n ],\n \"parameters\": [\n {\n \"type\": 2,\n \"cap_type\": null,\n \"goal_id\": {\n \"id\": 1731\n },\n \"parameter\": \"7.5\"\n },\n {\n \"type\": 3,\n \"cap_type\": 1,\n \"goal_id\": {\n \"id\": 1731\n },\n \"parameter\": \"100\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"code": 201,
"name": "Created",
"message": "Custom Param has been added successfully",
"info": {
"custom-param": {
"id": 135,
"status": 1,
"affiliates": [
{
"id": 5,
"title": "Sample Affiliate"
},
{
"id": 12,
"title": "Second Affiliate"
}
],
"start_date": "2026-01-01",
"end_date": "2026-01-31",
"conditions": [
{
"type": 1,
"permission": 1,
"conditions": [
{
"id": 1149361,
"title": "Afghanistan",
"country_code": "AF",
"country_title": "Afghanistan"
}
]
},
{
"type": 11,
"permission": 3,
"conditions": "promo_a, promo_b"
}
],
"parameters": [
{
"type": 2,
"cap_type": null,
"goal_id": {
"id": 1731
},
"parameter": "7.5"
},
{
"type": 3,
"cap_type": 1,
"goal_id": {
"id": 1731
},
"parameter": "100"
}
],
"created": 1788869389,
"updated": 1788869389
}
}
}{
"status": "error",
"code": 400,
"name": "Bad Request",
"message": "Request could not be parsed.",
"info": {
"errors": {}
}
}{
"status": "error",
"code": 401,
"name": "Unauthorized",
"message": "API key is invalid or missing."
}{
"status": "error",
"code": 403,
"name": "Forbidden",
"message": "This endpoint is not available for your role."
}{
"status": "error",
"code": 422,
"name": "Unprocessable entity",
"message": "Validation error",
"info": {
"errors": {
"email": [
"Email cannot be blank."
],
"currency": [
"Currency must be a valid ISO code."
]
}
}
}{
"status": "error",
"code": 500,
"name": "Internal Server Error",
"message": "An unexpected error occurred.",
"info": {
"errors": {}
}
}Create custom param
Creates a custom parameter rule for an offer: conditions says which traffic the rule targets and parameters says what it overrides (revenue, payout, caps, throttle rates, trafficback / redirect). Both fields carry the full enum tables in their schemas below.
curl --request POST \
--url https://{domain}/api/v2/network/offers/{offer_id}/custom-params \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"status": 1,
"start_date": "2026-01-01",
"end_date": "2026-01-31",
"affiliates": "5,12",
"conditions": [
{
"type": 1,
"permission": 1,
"conditions": [
{
"id": 1149361
}
]
},
{
"type": 11,
"permission": 3,
"conditions": "promo_a, promo_b"
}
],
"parameters": [
{
"type": 2,
"cap_type": null,
"goal_id": {
"id": 1731
},
"parameter": "7.5"
},
{
"type": 3,
"cap_type": 1,
"goal_id": {
"id": 1731
},
"parameter": "100"
}
]
}
'import requests
url = "https://{domain}/api/v2/network/offers/{offer_id}/custom-params"
payload = {
"status": 1,
"start_date": "2026-01-01",
"end_date": "2026-01-31",
"affiliates": "5,12",
"conditions": [
{
"type": 1,
"permission": 1,
"conditions": [{ "id": 1149361 }]
},
{
"type": 11,
"permission": 3,
"conditions": "promo_a, promo_b"
}
],
"parameters": [
{
"type": 2,
"cap_type": None,
"goal_id": { "id": 1731 },
"parameter": "7.5"
},
{
"type": 3,
"cap_type": 1,
"goal_id": { "id": 1731 },
"parameter": "100"
}
]
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
status: 1,
start_date: '2026-01-01',
end_date: '2026-01-31',
affiliates: '5,12',
conditions: [
{type: 1, permission: 1, conditions: [{id: 1149361}]},
{type: 11, permission: 3, conditions: 'promo_a, promo_b'}
],
parameters: [
{type: 2, cap_type: null, goal_id: {id: 1731}, parameter: '7.5'},
{type: 3, cap_type: 1, goal_id: {id: 1731}, parameter: '100'}
]
})
};
fetch('https://{domain}/api/v2/network/offers/{offer_id}/custom-params', 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://{domain}/api/v2/network/offers/{offer_id}/custom-params",
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([
'status' => 1,
'start_date' => '2026-01-01',
'end_date' => '2026-01-31',
'affiliates' => '5,12',
'conditions' => [
[
'type' => 1,
'permission' => 1,
'conditions' => [
[
'id' => 1149361
]
]
],
[
'type' => 11,
'permission' => 3,
'conditions' => 'promo_a, promo_b'
]
],
'parameters' => [
[
'type' => 2,
'cap_type' => null,
'goal_id' => [
'id' => 1731
],
'parameter' => '7.5'
],
[
'type' => 3,
'cap_type' => 1,
'goal_id' => [
'id' => 1731
],
'parameter' => '100'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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://{domain}/api/v2/network/offers/{offer_id}/custom-params"
payload := strings.NewReader("{\n \"status\": 1,\n \"start_date\": \"2026-01-01\",\n \"end_date\": \"2026-01-31\",\n \"affiliates\": \"5,12\",\n \"conditions\": [\n {\n \"type\": 1,\n \"permission\": 1,\n \"conditions\": [\n {\n \"id\": 1149361\n }\n ]\n },\n {\n \"type\": 11,\n \"permission\": 3,\n \"conditions\": \"promo_a, promo_b\"\n }\n ],\n \"parameters\": [\n {\n \"type\": 2,\n \"cap_type\": null,\n \"goal_id\": {\n \"id\": 1731\n },\n \"parameter\": \"7.5\"\n },\n {\n \"type\": 3,\n \"cap_type\": 1,\n \"goal_id\": {\n \"id\": 1731\n },\n \"parameter\": \"100\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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://{domain}/api/v2/network/offers/{offer_id}/custom-params")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"status\": 1,\n \"start_date\": \"2026-01-01\",\n \"end_date\": \"2026-01-31\",\n \"affiliates\": \"5,12\",\n \"conditions\": [\n {\n \"type\": 1,\n \"permission\": 1,\n \"conditions\": [\n {\n \"id\": 1149361\n }\n ]\n },\n {\n \"type\": 11,\n \"permission\": 3,\n \"conditions\": \"promo_a, promo_b\"\n }\n ],\n \"parameters\": [\n {\n \"type\": 2,\n \"cap_type\": null,\n \"goal_id\": {\n \"id\": 1731\n },\n \"parameter\": \"7.5\"\n },\n {\n \"type\": 3,\n \"cap_type\": 1,\n \"goal_id\": {\n \"id\": 1731\n },\n \"parameter\": \"100\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{domain}/api/v2/network/offers/{offer_id}/custom-params")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"status\": 1,\n \"start_date\": \"2026-01-01\",\n \"end_date\": \"2026-01-31\",\n \"affiliates\": \"5,12\",\n \"conditions\": [\n {\n \"type\": 1,\n \"permission\": 1,\n \"conditions\": [\n {\n \"id\": 1149361\n }\n ]\n },\n {\n \"type\": 11,\n \"permission\": 3,\n \"conditions\": \"promo_a, promo_b\"\n }\n ],\n \"parameters\": [\n {\n \"type\": 2,\n \"cap_type\": null,\n \"goal_id\": {\n \"id\": 1731\n },\n \"parameter\": \"7.5\"\n },\n {\n \"type\": 3,\n \"cap_type\": 1,\n \"goal_id\": {\n \"id\": 1731\n },\n \"parameter\": \"100\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"code": 201,
"name": "Created",
"message": "Custom Param has been added successfully",
"info": {
"custom-param": {
"id": 135,
"status": 1,
"affiliates": [
{
"id": 5,
"title": "Sample Affiliate"
},
{
"id": 12,
"title": "Second Affiliate"
}
],
"start_date": "2026-01-01",
"end_date": "2026-01-31",
"conditions": [
{
"type": 1,
"permission": 1,
"conditions": [
{
"id": 1149361,
"title": "Afghanistan",
"country_code": "AF",
"country_title": "Afghanistan"
}
]
},
{
"type": 11,
"permission": 3,
"conditions": "promo_a, promo_b"
}
],
"parameters": [
{
"type": 2,
"cap_type": null,
"goal_id": {
"id": 1731
},
"parameter": "7.5"
},
{
"type": 3,
"cap_type": 1,
"goal_id": {
"id": 1731
},
"parameter": "100"
}
],
"created": 1788869389,
"updated": 1788869389
}
}
}{
"status": "error",
"code": 400,
"name": "Bad Request",
"message": "Request could not be parsed.",
"info": {
"errors": {}
}
}{
"status": "error",
"code": 401,
"name": "Unauthorized",
"message": "API key is invalid or missing."
}{
"status": "error",
"code": 403,
"name": "Forbidden",
"message": "This endpoint is not available for your role."
}{
"status": "error",
"code": 422,
"name": "Unprocessable entity",
"message": "Validation error",
"info": {
"errors": {
"email": [
"Email cannot be blank."
],
"currency": [
"Currency must be a valid ISO code."
]
}
}
}{
"status": "error",
"code": 500,
"name": "Internal Server Error",
"message": "An unexpected error occurred.",
"info": {
"errors": {}
}
}Authorizations
Preferred authentication method. Pass the API key in the X-API-Key HTTP request header. The user account must have api_status enabled.
Path Parameters
Offer ID.
Body
1=active, 3=inactive.
Start date (YYYY-MM-DD format).
The overrides applied when the rule matches — one entry per action.
Show child attributes
Show child attributes
End date (YYYY-MM-DD format). Optional — omit it or send an empty string for an open-ended rule; the response then reports end_date as "".
Comma-separated affiliate IDs the rule is limited to (an array of ids is also accepted). Leave empty to apply the rule to every affiliate of the offer.
Targeting conditions, AND-ed together. Send an empty array to apply the rule to all traffic of the selected affiliates.
Show child attributes
Show child attributes
Was this page helpful?