Submit a content update / errata for community review
Creates a content_update record in PENDING state. Discord moderators approve/reject via the bot, which calls /update-content-update.
POST
/
create-content-update
Submit a content update / errata for community review
curl --request POST \
--url https://api.wanderersguide.app/functions/v1/create-content-update \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"data": {},
"content_source_id": 123,
"ref_id": 123
}
'import requests
url = "https://api.wanderersguide.app/functions/v1/create-content-update"
payload = {
"data": {},
"content_source_id": 123,
"ref_id": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({data: {}, content_source_id: 123, ref_id: 123})
};
fetch('https://api.wanderersguide.app/functions/v1/create-content-update', 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.wanderersguide.app/functions/v1/create-content-update",
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([
'data' => [
],
'content_source_id' => 123,
'ref_id' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.wanderersguide.app/functions/v1/create-content-update"
payload := strings.NewReader("{\n \"data\": {},\n \"content_source_id\": 123,\n \"ref_id\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
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.wanderersguide.app/functions/v1/create-content-update")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"data\": {},\n \"content_source_id\": 123,\n \"ref_id\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wanderersguide.app/functions/v1/create-content-update")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"data\": {},\n \"content_source_id\": 123,\n \"ref_id\": 123\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"type": "trait",
"action": "UPDATE",
"data": {},
"content_source_id": 123,
"id": 123,
"created_at": "2023-11-07T05:31:56Z",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ref_id": 123,
"status": {
"state": "PENDING",
"discord_user_id": "<string>",
"discord_user_name": "<string>"
},
"upvotes": [
{
"discord_user_id": "<string>"
}
],
"downvotes": [
{
"discord_user_id": "<string>"
}
],
"discord_msg_id": "<string>"
}
}Authorizations
API key created in your Wanderer's Guide account settings. Send as Authorization: Bearer <key>. Used for direct API access from external tools and scripts.
Body
application/json
Available options:
trait, item, spell, class, archetype, versatile-heritage, class-archetype, ability-block, creature, ancestry, background, language, content-source Available options:
UPDATE, CREATE, DELETE Required for UPDATE/DELETE actions; the id of the existing row.
⌘I
Submit a content update / errata for community review
curl --request POST \
--url https://api.wanderersguide.app/functions/v1/create-content-update \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"data": {},
"content_source_id": 123,
"ref_id": 123
}
'import requests
url = "https://api.wanderersguide.app/functions/v1/create-content-update"
payload = {
"data": {},
"content_source_id": 123,
"ref_id": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({data: {}, content_source_id: 123, ref_id: 123})
};
fetch('https://api.wanderersguide.app/functions/v1/create-content-update', 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.wanderersguide.app/functions/v1/create-content-update",
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([
'data' => [
],
'content_source_id' => 123,
'ref_id' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.wanderersguide.app/functions/v1/create-content-update"
payload := strings.NewReader("{\n \"data\": {},\n \"content_source_id\": 123,\n \"ref_id\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
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.wanderersguide.app/functions/v1/create-content-update")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"data\": {},\n \"content_source_id\": 123,\n \"ref_id\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wanderersguide.app/functions/v1/create-content-update")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"data\": {},\n \"content_source_id\": 123,\n \"ref_id\": 123\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"type": "trait",
"action": "UPDATE",
"data": {},
"content_source_id": 123,
"id": 123,
"created_at": "2023-11-07T05:31:56Z",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ref_id": 123,
"status": {
"state": "PENDING",
"discord_user_id": "<string>",
"discord_user_name": "<string>"
},
"upvotes": [
{
"discord_user_id": "<string>"
}
],
"downvotes": [
{
"discord_user_id": "<string>"
}
],
"discord_msg_id": "<string>"
}
}
