curl --request POST \
--url https://api.rigaly.com/api/v1/rewards/{id}/pool/codes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"codes": [
"NFLX-A1B2C3",
"NFLX-D4E5F6",
"NFLX-G7H8J9"
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({codes: ['NFLX-A1B2C3', 'NFLX-D4E5F6', 'NFLX-G7H8J9']})
};
fetch('https://api.rigaly.com/api/v1/rewards/{id}/pool/codes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.rigaly.com/api/v1/rewards/{id}/pool/codes"
payload = { "codes": ["NFLX-A1B2C3", "NFLX-D4E5F6", "NFLX-G7H8J9"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.rigaly.com/api/v1/rewards/{id}/pool/codes",
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([
'codes' => [
'NFLX-A1B2C3',
'NFLX-D4E5F6',
'NFLX-G7H8J9'
]
]),
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;
}{
"success": true,
"message": "Pool codes uploaded successfully",
"data": {
"reward_id": "3f2b1c9e-7d4a-4f1b-8c2e-9a0d1e2f3b4c",
"submitted": 5000,
"accepted": 4990,
"rejected_duplicates_in_request": 4,
"rejected_duplicates_existing": 6,
"rejected_invalid": 0,
"total": 4990,
"available": 4990,
"consumed": 0,
"capacity": 100000
}
}{
"success": false,
"error": {
"message": "POOL_UPLOAD_EMPTY"
}
}{
"success": false,
"error": {
"message": "Reward not found"
}
}{
"success": false,
"error": {
"message": "POOL_CAPACITY_EXCEEDED:100000"
}
}Upload pool values
Adds one-time values to a pool-sourced reward — 1–5000 per request, each
1–500 characters. Send as many requests as you need up to the reward’s
capacity (100,000 stored values).
Uploading is idempotent by value. Duplicates inside the request and values the pool already holds are counted and skipped, never stored twice, so re-sending a file you are unsure about is safe.
Refilling reopens the reward. If the pool had emptied
(deactivated_by_pool: true), a successful upload switches the reward
back on — unless its redemption cap is also blocking, or you switched it
off by hand.
curl --request POST \
--url https://api.rigaly.com/api/v1/rewards/{id}/pool/codes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"codes": [
"NFLX-A1B2C3",
"NFLX-D4E5F6",
"NFLX-G7H8J9"
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({codes: ['NFLX-A1B2C3', 'NFLX-D4E5F6', 'NFLX-G7H8J9']})
};
fetch('https://api.rigaly.com/api/v1/rewards/{id}/pool/codes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.rigaly.com/api/v1/rewards/{id}/pool/codes"
payload = { "codes": ["NFLX-A1B2C3", "NFLX-D4E5F6", "NFLX-G7H8J9"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.rigaly.com/api/v1/rewards/{id}/pool/codes",
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([
'codes' => [
'NFLX-A1B2C3',
'NFLX-D4E5F6',
'NFLX-G7H8J9'
]
]),
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;
}{
"success": true,
"message": "Pool codes uploaded successfully",
"data": {
"reward_id": "3f2b1c9e-7d4a-4f1b-8c2e-9a0d1e2f3b4c",
"submitted": 5000,
"accepted": 4990,
"rejected_duplicates_in_request": 4,
"rejected_duplicates_existing": 6,
"rejected_invalid": 0,
"total": 4990,
"available": 4990,
"consumed": 0,
"capacity": 100000
}
}{
"success": false,
"error": {
"message": "POOL_UPLOAD_EMPTY"
}
}{
"success": false,
"error": {
"message": "Reward not found"
}
}{
"success": false,
"error": {
"message": "POOL_CAPACITY_EXCEEDED:100000"
}
}Authorizations
API key from the Rigaly dashboard: Authorization: Bearer rgly_sk_...
Path Parameters
Body
One-time values to add to the reward's pool.
1–5000 values per request, each 1–500 characters. Duplicates (within the request or already stored) are reported, never stored twice.
1 - 5000 elements1 - 500["NFLX-A1B2C3", "NFLX-D4E5F6", "NFLX-G7H8J9"]