Export a deck as plain text
curl --request POST \
--url https://api.flexslot.gg/api/public/v1/games/{game}/decks/export/text \
--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",
"deck_payload": {}
}
'import requests
url = "https://api.flexslot.gg/api/public/v1/games/{game}/decks/export/text"
payload = {
"deck_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"deck_payload": {}
}
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', deck_payload: {}})
};
fetch('https://api.flexslot.gg/api/public/v1/games/{game}/decks/export/text', 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/export/text",
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',
'deck_payload' => [
]
]),
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/export/text"
payload := strings.NewReader("{\n \"deck_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"deck_payload\": {}\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/export/text")
.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 \"deck_payload\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.flexslot.gg/api/public/v1/games/{game}/decks/export/text")
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 \"deck_payload\": {}\n}"
response = http.request(request)
puts response.read_body"<string>"Exports
Export a deck as plain text
Renders a deck as an MTG Arena / Moxfield-compatible text list. Pass deck_id to export an existing Flexslot deck (visibility / IDOR rules apply) OR deck_payload to render an inline deck supplied by the partner. Inline-payload requests surface any card-resolution warnings via the X-Flexslot-Export-Warnings response header. Responses are cached for 24h keyed by (deck_id, deck.updated_at) — inline-payload renders bypass the cache.
POST
/
api
/
public
/
v1
/
games
/
{game}
/
decks
/
export
/
text
Export a deck as plain text
curl --request POST \
--url https://api.flexslot.gg/api/public/v1/games/{game}/decks/export/text \
--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",
"deck_payload": {}
}
'import requests
url = "https://api.flexslot.gg/api/public/v1/games/{game}/decks/export/text"
payload = {
"deck_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"deck_payload": {}
}
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', deck_payload: {}})
};
fetch('https://api.flexslot.gg/api/public/v1/games/{game}/decks/export/text', 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/export/text",
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',
'deck_payload' => [
]
]),
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/export/text"
payload := strings.NewReader("{\n \"deck_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"deck_payload\": {}\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/export/text")
.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 \"deck_payload\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.flexslot.gg/api/public/v1/games/{game}/decks/export/text")
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 \"deck_payload\": {}\n}"
response = http.request(request)
puts response.read_body"<string>"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_).
Path Parameters
Game slug (e.g. magic-the-gathering).
Body
application/jsonapplication/x-www-form-urlencodedmultipart/form-data
Response
Plain-text deck list.
Was this page helpful?
⌘I