Create a level
curl --request POST \
--url https://api.rigaly.com/api/v1/tiers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Gold",
"threshold_points": 10000,
"manual_only": false,
"points_multiplier_enabled": true,
"points_multiplier": 1.5
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Gold',
threshold_points: 10000,
manual_only: false,
points_multiplier_enabled: true,
points_multiplier: 1.5
})
};
fetch('https://api.rigaly.com/api/v1/tiers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.rigaly.com/api/v1/tiers"
payload = {
"name": "Gold",
"threshold_points": 10000,
"manual_only": False,
"points_multiplier_enabled": True,
"points_multiplier": 1.5
}
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/tiers",
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([
'name' => 'Gold',
'threshold_points' => 10000,
'manual_only' => false,
'points_multiplier_enabled' => true,
'points_multiplier' => 1.5
]),
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\""
}
}Levels (tiers)
Create a level
POST
/
api
/
v1
/
tiers
Create a level
curl --request POST \
--url https://api.rigaly.com/api/v1/tiers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Gold",
"threshold_points": 10000,
"manual_only": false,
"points_multiplier_enabled": true,
"points_multiplier": 1.5
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Gold',
threshold_points: 10000,
manual_only: false,
points_multiplier_enabled: true,
points_multiplier: 1.5
})
};
fetch('https://api.rigaly.com/api/v1/tiers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.rigaly.com/api/v1/tiers"
payload = {
"name": "Gold",
"threshold_points": 10000,
"manual_only": False,
"points_multiplier_enabled": True,
"points_multiplier": 1.5
}
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/tiers",
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([
'name' => 'Gold',
'threshold_points' => 10000,
'manual_only' => false,
'points_multiplier_enabled' => true,
'points_multiplier' => 1.5
]),
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
⌘I