Skip to main content
PUT
/
api
/
public
/
v1
/
games
/
{game}
/
decks
/
{id}
/
guide
Create or replace a deck's strategy guide
curl --request PUT \
  --url https://api.flexslot.gg/api/public/v1/games/{game}/decks/{id}/guide \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'X-Partner-Id: <api-key>' \
  --header 'X-Signature: <api-key>' \
  --data '
{
  "content": "<unknown>",
  "is_premium": false
}
'
import requests

url = "https://api.flexslot.gg/api/public/v1/games/{game}/decks/{id}/guide"

payload = {
"content": "<unknown>",
"is_premium": False
}
headers = {
"X-Signature": "<api-key>",
"X-Partner-Id": "<api-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'PUT',
headers: {
'X-Signature': '<api-key>',
'X-Partner-Id': '<api-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({content: '<unknown>', is_premium: false})
};

fetch('https://api.flexslot.gg/api/public/v1/games/{game}/decks/{id}/guide', 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}/guide",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'content' => '<unknown>',
'is_premium' => false
]),
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}/guide"

payload := strings.NewReader("{\n \"content\": \"<unknown>\",\n \"is_premium\": false\n}")

req, _ := http.NewRequest("PUT", 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.put("https://api.flexslot.gg/api/public/v1/games/{game}/decks/{id}/guide")
.header("X-Signature", "<api-key>")
.header("X-Partner-Id", "<api-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"content\": \"<unknown>\",\n \"is_premium\": false\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.flexslot.gg/api/public/v1/games/{game}/decks/{id}/guide")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.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 \"content\": \"<unknown>\",\n \"is_premium\": false\n}"

response = http.request(request)
puts response.read_body
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "deck_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "content_type": "<string>",
  "content": "<unknown>",
  "is_premium": true,
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "is_truncated": false
}
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"deck_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"content_type": "<string>",
"content": "<unknown>",
"is_premium": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"is_truncated": false
}

Authorizations

X-Signature
string
header
required

HMAC-SHA256 over canonical request string. Format: v1.<unix_seconds>.<hex_hmac_sha256>.

X-Partner-Id
string
header
required

Partner identifier slug. Required alongside X-Signature for HMAC auth.

Authorization
string
header
required

User-issued personal access token (format: flx_pat_).

Path Parameters

game
string
required
id
string<uuid>
required

Body

content_type
enum<string>
required
  • markdown - markdown
  • tiptap - tiptap
Available options:
markdown,
tiptap
content
any
required
is_premium
boolean
default:false

Response

id
string<uuid>
required
deck_id
string<uuid>
required
content_type
string
required
content
any
required
is_premium
boolean
required
created_at
string<date-time>
required
updated_at
string<date-time>
required
is_truncated
boolean
default:false