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": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"opponent_deck_name": "<string>",
"special_card_overrides": [
{
"special_card_type": "<string>",
"card_id": "<string>",
"card_name": "<string>",
"sort_order": 123
}
],
"opponent_archetype": "<string>",
"difficulty": "VERY_EASY",
"notes": "<string>",
"play_notes": "<string>",
"draw_notes": "<string>",
"sort_order": 123,
"thumbnail": "<string>",
"is_featured": true
}
],
"decks": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
}
],
"attached_deck_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}Sideboard Guides
Attach a deck to a sideboard guide
Attaches a deck (other than the primary) to the guide via the SideboardGuideDeckAttachment through-table. The caller must own both the guide and the deck. Cross-game attempts return 400 FLEXSLOT_VALIDATION_ERROR. Re-attaching an already-attached deck is a no-op.
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": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"opponent_deck_name": "<string>",
"special_card_overrides": [
{
"special_card_type": "<string>",
"card_id": "<string>",
"card_name": "<string>",
"sort_order": 123
}
],
"opponent_archetype": "<string>",
"difficulty": "VERY_EASY",
"notes": "<string>",
"play_notes": "<string>",
"draw_notes": "<string>",
"sort_order": 123,
"thumbnail": "<string>",
"is_featured": true
}
],
"decks": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
}
],
"attached_deck_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}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
Response
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Was this page helpful?