Characters
Update an existing character
Same body shape as create-character but id is required. Forbidden keys (id, created_at, content_source_id, user_id) are stripped server-side.
POST
/
update-character
Update an existing character
curl --request POST \
--url https://api.wanderersguide.app/functions/v1/update-character \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": 123,
"name": "<string>",
"level": 123,
"created_at": "2023-11-07T05:31:56Z",
"campaign_id": 123,
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"experience": 123,
"hero_points": 123,
"hp_current": 123,
"hp_temp": 123,
"stamina_current": 123,
"resolve_current": 123,
"inventory": {},
"details": {},
"notes": {},
"roll_history": {},
"spells": {},
"operation_data": {},
"meta_data": {},
"custom_operations": [
{}
],
"options": {},
"variants": {},
"content_sources": {
"enabled": [
123
]
},
"companions": {},
"expected_updated_at": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://api.wanderersguide.app/functions/v1/update-character"
payload = {
"id": 123,
"name": "<string>",
"level": 123,
"created_at": "2023-11-07T05:31:56Z",
"campaign_id": 123,
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"experience": 123,
"hero_points": 123,
"hp_current": 123,
"hp_temp": 123,
"stamina_current": 123,
"resolve_current": 123,
"inventory": {},
"details": {},
"notes": {},
"roll_history": {},
"spells": {},
"operation_data": {},
"meta_data": {},
"custom_operations": [{}],
"options": {},
"variants": {},
"content_sources": { "enabled": [123] },
"companions": {},
"expected_updated_at": "2023-11-07T05:31:56Z"
}
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({
id: 123,
name: '<string>',
level: 123,
created_at: '2023-11-07T05:31:56Z',
campaign_id: 123,
user_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
experience: 123,
hero_points: 123,
hp_current: 123,
hp_temp: 123,
stamina_current: 123,
resolve_current: 123,
inventory: {},
details: {},
notes: {},
roll_history: {},
spells: {},
operation_data: {},
meta_data: {},
custom_operations: [{}],
options: {},
variants: {},
content_sources: {enabled: [123]},
companions: {},
expected_updated_at: '2023-11-07T05:31:56Z'
})
};
fetch('https://api.wanderersguide.app/functions/v1/update-character', 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/update-character",
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([
'id' => 123,
'name' => '<string>',
'level' => 123,
'created_at' => '2023-11-07T05:31:56Z',
'campaign_id' => 123,
'user_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'experience' => 123,
'hero_points' => 123,
'hp_current' => 123,
'hp_temp' => 123,
'stamina_current' => 123,
'resolve_current' => 123,
'inventory' => [
],
'details' => [
],
'notes' => [
],
'roll_history' => [
],
'spells' => [
],
'operation_data' => [
],
'meta_data' => [
],
'custom_operations' => [
[
]
],
'options' => [
],
'variants' => [
],
'content_sources' => [
'enabled' => [
123
]
],
'companions' => [
],
'expected_updated_at' => '2023-11-07T05:31:56Z'
]),
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/update-character"
payload := strings.NewReader("{\n \"id\": 123,\n \"name\": \"<string>\",\n \"level\": 123,\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"campaign_id\": 123,\n \"user_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"experience\": 123,\n \"hero_points\": 123,\n \"hp_current\": 123,\n \"hp_temp\": 123,\n \"stamina_current\": 123,\n \"resolve_current\": 123,\n \"inventory\": {},\n \"details\": {},\n \"notes\": {},\n \"roll_history\": {},\n \"spells\": {},\n \"operation_data\": {},\n \"meta_data\": {},\n \"custom_operations\": [\n {}\n ],\n \"options\": {},\n \"variants\": {},\n \"content_sources\": {\n \"enabled\": [\n 123\n ]\n },\n \"companions\": {},\n \"expected_updated_at\": \"2023-11-07T05:31:56Z\"\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/update-character")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": 123,\n \"name\": \"<string>\",\n \"level\": 123,\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"campaign_id\": 123,\n \"user_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"experience\": 123,\n \"hero_points\": 123,\n \"hp_current\": 123,\n \"hp_temp\": 123,\n \"stamina_current\": 123,\n \"resolve_current\": 123,\n \"inventory\": {},\n \"details\": {},\n \"notes\": {},\n \"roll_history\": {},\n \"spells\": {},\n \"operation_data\": {},\n \"meta_data\": {},\n \"custom_operations\": [\n {}\n ],\n \"options\": {},\n \"variants\": {},\n \"content_sources\": {\n \"enabled\": [\n 123\n ]\n },\n \"companions\": {},\n \"expected_updated_at\": \"2023-11-07T05:31:56Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wanderersguide.app/functions/v1/update-character")
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 \"id\": 123,\n \"name\": \"<string>\",\n \"level\": 123,\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"campaign_id\": 123,\n \"user_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"experience\": 123,\n \"hero_points\": 123,\n \"hp_current\": 123,\n \"hp_temp\": 123,\n \"stamina_current\": 123,\n \"resolve_current\": 123,\n \"inventory\": {},\n \"details\": {},\n \"notes\": {},\n \"roll_history\": {},\n \"spells\": {},\n \"operation_data\": {},\n \"meta_data\": {},\n \"custom_operations\": [\n {}\n ],\n \"options\": {},\n \"variants\": {},\n \"content_sources\": {\n \"enabled\": [\n 123\n ]\n },\n \"companions\": {},\n \"expected_updated_at\": \"2023-11-07T05:31:56Z\"\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"data": true
}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
Show child attributes
Show child attributes
Optimistic-concurrency token: the character's updated_at from your last read. When provided, the update only applies if the row is unchanged.
⌘I
Update an existing character
curl --request POST \
--url https://api.wanderersguide.app/functions/v1/update-character \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": 123,
"name": "<string>",
"level": 123,
"created_at": "2023-11-07T05:31:56Z",
"campaign_id": 123,
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"experience": 123,
"hero_points": 123,
"hp_current": 123,
"hp_temp": 123,
"stamina_current": 123,
"resolve_current": 123,
"inventory": {},
"details": {},
"notes": {},
"roll_history": {},
"spells": {},
"operation_data": {},
"meta_data": {},
"custom_operations": [
{}
],
"options": {},
"variants": {},
"content_sources": {
"enabled": [
123
]
},
"companions": {},
"expected_updated_at": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://api.wanderersguide.app/functions/v1/update-character"
payload = {
"id": 123,
"name": "<string>",
"level": 123,
"created_at": "2023-11-07T05:31:56Z",
"campaign_id": 123,
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"experience": 123,
"hero_points": 123,
"hp_current": 123,
"hp_temp": 123,
"stamina_current": 123,
"resolve_current": 123,
"inventory": {},
"details": {},
"notes": {},
"roll_history": {},
"spells": {},
"operation_data": {},
"meta_data": {},
"custom_operations": [{}],
"options": {},
"variants": {},
"content_sources": { "enabled": [123] },
"companions": {},
"expected_updated_at": "2023-11-07T05:31:56Z"
}
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({
id: 123,
name: '<string>',
level: 123,
created_at: '2023-11-07T05:31:56Z',
campaign_id: 123,
user_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
experience: 123,
hero_points: 123,
hp_current: 123,
hp_temp: 123,
stamina_current: 123,
resolve_current: 123,
inventory: {},
details: {},
notes: {},
roll_history: {},
spells: {},
operation_data: {},
meta_data: {},
custom_operations: [{}],
options: {},
variants: {},
content_sources: {enabled: [123]},
companions: {},
expected_updated_at: '2023-11-07T05:31:56Z'
})
};
fetch('https://api.wanderersguide.app/functions/v1/update-character', 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/update-character",
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([
'id' => 123,
'name' => '<string>',
'level' => 123,
'created_at' => '2023-11-07T05:31:56Z',
'campaign_id' => 123,
'user_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'experience' => 123,
'hero_points' => 123,
'hp_current' => 123,
'hp_temp' => 123,
'stamina_current' => 123,
'resolve_current' => 123,
'inventory' => [
],
'details' => [
],
'notes' => [
],
'roll_history' => [
],
'spells' => [
],
'operation_data' => [
],
'meta_data' => [
],
'custom_operations' => [
[
]
],
'options' => [
],
'variants' => [
],
'content_sources' => [
'enabled' => [
123
]
],
'companions' => [
],
'expected_updated_at' => '2023-11-07T05:31:56Z'
]),
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/update-character"
payload := strings.NewReader("{\n \"id\": 123,\n \"name\": \"<string>\",\n \"level\": 123,\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"campaign_id\": 123,\n \"user_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"experience\": 123,\n \"hero_points\": 123,\n \"hp_current\": 123,\n \"hp_temp\": 123,\n \"stamina_current\": 123,\n \"resolve_current\": 123,\n \"inventory\": {},\n \"details\": {},\n \"notes\": {},\n \"roll_history\": {},\n \"spells\": {},\n \"operation_data\": {},\n \"meta_data\": {},\n \"custom_operations\": [\n {}\n ],\n \"options\": {},\n \"variants\": {},\n \"content_sources\": {\n \"enabled\": [\n 123\n ]\n },\n \"companions\": {},\n \"expected_updated_at\": \"2023-11-07T05:31:56Z\"\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/update-character")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": 123,\n \"name\": \"<string>\",\n \"level\": 123,\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"campaign_id\": 123,\n \"user_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"experience\": 123,\n \"hero_points\": 123,\n \"hp_current\": 123,\n \"hp_temp\": 123,\n \"stamina_current\": 123,\n \"resolve_current\": 123,\n \"inventory\": {},\n \"details\": {},\n \"notes\": {},\n \"roll_history\": {},\n \"spells\": {},\n \"operation_data\": {},\n \"meta_data\": {},\n \"custom_operations\": [\n {}\n ],\n \"options\": {},\n \"variants\": {},\n \"content_sources\": {\n \"enabled\": [\n 123\n ]\n },\n \"companions\": {},\n \"expected_updated_at\": \"2023-11-07T05:31:56Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wanderersguide.app/functions/v1/update-character")
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 \"id\": 123,\n \"name\": \"<string>\",\n \"level\": 123,\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"campaign_id\": 123,\n \"user_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"experience\": 123,\n \"hero_points\": 123,\n \"hp_current\": 123,\n \"hp_temp\": 123,\n \"stamina_current\": 123,\n \"resolve_current\": 123,\n \"inventory\": {},\n \"details\": {},\n \"notes\": {},\n \"roll_history\": {},\n \"spells\": {},\n \"operation_data\": {},\n \"meta_data\": {},\n \"custom_operations\": [\n {}\n ],\n \"options\": {},\n \"variants\": {},\n \"content_sources\": {\n \"enabled\": [\n 123\n ]\n },\n \"companions\": {},\n \"expected_updated_at\": \"2023-11-07T05:31:56Z\"\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"data": true
}
