Skip to main content
POST
/
api
/
public
/
v1
/
games
/
{game}
/
sideboard-guides
/
{id}
/
decks
Attach a deck to a sideboard guide
curl --request POST \
  --url https://api.flexslot.gg/api/public/v1/games/{game}/sideboard-guides/{id}/decks \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'X-Partner-Id: <api-key>' \
  --header 'X-Signature: <api-key>' \
  --data '
{
  "deck_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'
import requests

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

payload = { "deck_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a" }
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({deck_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'})
};

fetch('https://api.flexslot.gg/api/public/v1/games/{game}/sideboard-guides/{id}/decks', 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}/sideboard-guides/{id}/decks",
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([
'deck_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]),
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}/sideboard-guides/{id}/decks"

payload := strings.NewReader("{\n \"deck_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\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}/sideboard-guides/{id}/decks")
.header("X-Signature", "<api-key>")
.header("X-Partner-Id", "<api-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"deck_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
.asString();
require 'uri'
require 'net/http'

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

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 \"deck_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}"

response = http.request(request)
puts response.read_body
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "<string>",
  "author": {},
  "game": "<string>",
  "visibility": [
    "<string>"
  ],
  "deck_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "format": "<string>",
  "views": 123,
  "likes": 123,
  "hasMatchups": true,
  "thumbnail": "<string>",
  "editedAt": "2023-11-07T05:31:56Z",
  "createdAt": "2023-11-07T05:31:56Z",
  "sourceProvider": "<string>",
  "description": "<string>",
  "notes": "<string>",
  "youtube_url": "<string>",
  "premium": true,
  "is_archived": true,
  "tags": [
    "<string>"
  ],
  "matchups": [
    {}
  ],
  "decks": [
    {}
  ],
  "attached_deck_ids": [
    "<string>"
  ]
}

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

deck_id
string<uuid>
required

Response

id
string<uuid>
required
read-only
name
string
required
read-only
author
object | null
required
read-only
game
string
required
read-only
visibility
string[]
required
read-only
deck_id
string<uuid>
required
read-only
format
string
required
read-only
views
integer
required
read-only
likes
integer
required
read-only
hasMatchups
boolean
required
read-only
thumbnail
string | null
required
read-only
editedAt
string<date-time>
required
read-only
createdAt
string<date-time>
required
read-only
sourceProvider
string | null
required
read-only
description
string | null
required
read-only
notes
string | null
required
read-only
youtube_url
string<uri> | null
required
read-only
premium
boolean
required
read-only
is_archived
boolean
required
read-only
tags
string[]
required
read-only
matchups
object[]
required
read-only
decks
object[]
required
read-only
attached_deck_ids
string[]
required
read-only