Roll a deck back to a historical version
curl --request POST \
--url https://api.flexslot.gg/api/public/v1/games/{game}/decks/{id}/rollback \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Partner-Id: <api-key>' \
--header 'X-Signature: <api-key>' \
--data '
{
"version_number": 2
}
'import requests
url = "https://api.flexslot.gg/api/public/v1/games/{game}/decks/{id}/rollback"
payload = { "version_number": 2 }
headers = {
"X-Signature": "<api-key>",
"X-Partner-Id": "<api-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Signature': '<api-key>',
'X-Partner-Id': '<api-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({version_number: 2})
};
fetch('https://api.flexslot.gg/api/public/v1/games/{game}/decks/{id}/rollback', 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.flexslot.gg/api/public/v1/games/{game}/decks/{id}/rollback",
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([
'version_number' => 2
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"X-Partner-Id: <api-key>",
"X-Signature: <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://api.flexslot.gg/api/public/v1/games/{game}/decks/{id}/rollback"
payload := strings.NewReader("{\n \"version_number\": 2\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Signature", "<api-key>")
req.Header.Add("X-Partner-Id", "<api-key>")
req.Header.Add("Authorization", "Bearer <token>")
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://api.flexslot.gg/api/public/v1/games/{game}/decks/{id}/rollback")
.header("X-Signature", "<api-key>")
.header("X-Partner-Id", "<api-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"version_number\": 2\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.flexslot.gg/api/public/v1/games/{game}/decks/{id}/rollback")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Signature"] = '<api-key>'
request["X-Partner-Id"] = '<api-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"version_number\": 2\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"notes": "<string>",
"visibility": [
"<string>"
],
"format": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"youtube_url": "<string>",
"thumbnail": "<string>",
"legal": true,
"is_archived": true,
"likes": 123,
"pageviews": 123,
"version": 123,
"source_provider": "<string>",
"source_external_id": "<string>",
"source_external_version": "<string>",
"source_external_url": "<string>",
"source_imported_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}Decks
Roll a deck back to a historical version
Restores the deck’s field state from the historical version at the given 1-based version_number (matching the order returned by GET /decks/<id>/versions). The rollback is a forward-saving event — the historical chain GROWS by one record. Owners only; non-owners and out-of-range versions alike return 404 FLEXSLOT_NOT_FOUND.
POST
/
api
/
public
/
v1
/
games
/
{game}
/
decks
/
{id}
/
rollback
Roll a deck back to a historical version
curl --request POST \
--url https://api.flexslot.gg/api/public/v1/games/{game}/decks/{id}/rollback \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Partner-Id: <api-key>' \
--header 'X-Signature: <api-key>' \
--data '
{
"version_number": 2
}
'import requests
url = "https://api.flexslot.gg/api/public/v1/games/{game}/decks/{id}/rollback"
payload = { "version_number": 2 }
headers = {
"X-Signature": "<api-key>",
"X-Partner-Id": "<api-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Signature': '<api-key>',
'X-Partner-Id': '<api-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({version_number: 2})
};
fetch('https://api.flexslot.gg/api/public/v1/games/{game}/decks/{id}/rollback', 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.flexslot.gg/api/public/v1/games/{game}/decks/{id}/rollback",
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([
'version_number' => 2
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"X-Partner-Id: <api-key>",
"X-Signature: <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://api.flexslot.gg/api/public/v1/games/{game}/decks/{id}/rollback"
payload := strings.NewReader("{\n \"version_number\": 2\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Signature", "<api-key>")
req.Header.Add("X-Partner-Id", "<api-key>")
req.Header.Add("Authorization", "Bearer <token>")
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://api.flexslot.gg/api/public/v1/games/{game}/decks/{id}/rollback")
.header("X-Signature", "<api-key>")
.header("X-Partner-Id", "<api-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"version_number\": 2\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.flexslot.gg/api/public/v1/games/{game}/decks/{id}/rollback")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Signature"] = '<api-key>'
request["X-Partner-Id"] = '<api-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"version_number\": 2\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"notes": "<string>",
"visibility": [
"<string>"
],
"format": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"youtube_url": "<string>",
"thumbnail": "<string>",
"legal": true,
"is_archived": true,
"likes": 123,
"pageviews": 123,
"version": 123,
"source_provider": "<string>",
"source_external_id": "<string>",
"source_external_version": "<string>",
"source_external_url": "<string>",
"source_imported_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}Authorizations
PartnerHmac & PartnerSlug & PersonalAccessTokenPartnerHmac & PartnerSlugApiKeyPersonalAccessTokenOAuth2DPoP & OAuth2DPoPProofOAuth2Bearer
HMAC-SHA256 over canonical request string. Format: v1.<unix_seconds>.<hex_hmac_sha256>.
Partner identifier slug. Required alongside X-Signature for HMAC auth.
User-issued personal access token (format: flx_pat_).
Body
application/jsonapplication/x-www-form-urlencodedmultipart/form-data
Required range:
x >= 1Response
Was this page helpful?