Create a promotion
curl --request POST \
--url https://api.rigaly.com/api/v1/promotions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "Double points weekend",
"description": "Earn 2x points on everything",
"start_date": "2026-08-01",
"end_date": "2026-08-03"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: 'Double points weekend',
description: 'Earn 2x points on everything',
start_date: '2026-08-01',
end_date: '2026-08-03'
})
};
fetch('https://api.rigaly.com/api/v1/promotions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.rigaly.com/api/v1/promotions"
payload = {
"title": "Double points weekend",
"description": "Earn 2x points on everything",
"start_date": "2026-08-01",
"end_date": "2026-08-03"
}
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/promotions",
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([
'title' => 'Double points weekend',
'description' => 'Earn 2x points on everything',
'start_date' => '2026-08-01',
'end_date' => '2026-08-03'
]),
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": "<string>",
"data": {}
}{
"success": false,
"error": {
"message": "Provide exactly one of \"user_id\" or \"identifier\""
}
}Promotions
Create a promotion
POST
/
api
/
v1
/
promotions
Create a promotion
curl --request POST \
--url https://api.rigaly.com/api/v1/promotions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "Double points weekend",
"description": "Earn 2x points on everything",
"start_date": "2026-08-01",
"end_date": "2026-08-03"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: 'Double points weekend',
description: 'Earn 2x points on everything',
start_date: '2026-08-01',
end_date: '2026-08-03'
})
};
fetch('https://api.rigaly.com/api/v1/promotions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.rigaly.com/api/v1/promotions"
payload = {
"title": "Double points weekend",
"description": "Earn 2x points on everything",
"start_date": "2026-08-01",
"end_date": "2026-08-03"
}
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/promotions",
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([
'title' => 'Double points weekend',
'description' => 'Earn 2x points on everything',
'start_date' => '2026-08-01',
'end_date' => '2026-08-03'
]),
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": "<string>",
"data": {}
}{
"success": false,
"error": {
"message": "Provide exactly one of \"user_id\" or \"identifier\""
}
}Authorizations
API key from the Rigaly dashboard: Authorization: Bearer rgly_sk_...
Body
application/json
Example:
"Double points weekend"
Example:
"2026-08-01"
Example:
"2026-08-03"
Per-day time-of-day windows. Omit a day to leave it unrestricted; omit the whole field for always-active.
Show child attributes
Show child attributes
Example:
{
"monday": {
"active": true,
"start": "09:00",
"end": "17:00"
},
"tuesday": {
"active": true,
"start": "09:00",
"end": "17:00"
}
}
⌘I