curl --request PATCH \
--url https://allocait.app/api/v1/playbooks/{id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"name": "<string>",
"description": "<string>",
"default_date": "2023-12-25",
"source_watchlist_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"custom_symbols": [
"<string>"
],
"input_columns": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"default_sort_input_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "https://allocait.app/api/v1/playbooks/{id}"
payload = {
"name": "<string>",
"description": "<string>",
"default_date": "2023-12-25",
"source_watchlist_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"custom_symbols": ["<string>"],
"input_columns": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"default_sort_input_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
default_date: '2023-12-25',
source_watchlist_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
custom_symbols: ['<string>'],
input_columns: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
default_sort_input_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
})
};
fetch('https://allocait.app/api/v1/playbooks/{id}', 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://allocait.app/api/v1/playbooks/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'description' => '<string>',
'default_date' => '2023-12-25',
'source_watchlist_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'custom_symbols' => [
'<string>'
],
'input_columns' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'default_sort_input_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <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://allocait.app/api/v1/playbooks/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"default_date\": \"2023-12-25\",\n \"source_watchlist_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"custom_symbols\": [\n \"<string>\"\n ],\n \"input_columns\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"default_sort_input_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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.patch("https://allocait.app/api/v1/playbooks/{id}")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"default_date\": \"2023-12-25\",\n \"source_watchlist_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"custom_symbols\": [\n \"<string>\"\n ],\n \"input_columns\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"default_sort_input_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://allocait.app/api/v1/playbooks/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"default_date\": \"2023-12-25\",\n \"source_watchlist_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"custom_symbols\": [\n \"<string>\"\n ],\n \"input_columns\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"default_sort_input_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"playbook": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"portfolio_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"default_date": "2023-12-25",
"source_type": "watchlist",
"source_watchlist_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"custom_symbols": [
"<string>"
],
"input_columns": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"default_sort_input_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"default_sort_direction": "asc",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"error": "Portfolio not found or access denied",
"error_code": "NOT_FOUND"
}{
"error": "Portfolio not found or access denied",
"error_code": "NOT_FOUND"
}{
"error": "Portfolio not found or access denied",
"error_code": "NOT_FOUND"
}{
"error": "Portfolio not found or access denied",
"error_code": "NOT_FOUND"
}{
"error": "Portfolio not found or access denied",
"error_code": "NOT_FOUND"
}{
"error": "Portfolio not found or access denied",
"error_code": "NOT_FOUND"
}{
"error": "Internal error",
"error_code": "INTERNAL_ERROR",
"request_id": "5b1e7c52-3f4a-4d0e-9a55-2d5cbe6f0a11"
}Update a playbook
Every field is optional and independently no-op when omitted.
source_watchlist_id and every input_columns id must belong to
the caller.
default_sort_input_id names the column the app opens the sheet
sorted by: one of the playbook’s own columns that has a symbol, and
null clears it. default_sort_direction alone changes the direction
of the stored sort; a new column without a direction opens asc. A
sort is refused for a direction that is not asc, desc or rank, a
column the playbook does not have, a value with no symbol, rank on a
column that is not a number, or a direction when no sort is stored
(INVALID_INPUT); an id that is not yours is NOT_FOUND. Taking the
sorted column off the playbook, or deleting its Input, clears the sort.
It orders the app’s sheet only: the rows GET /playbooks/{id} returns
keep their order (ADR-197).
Requires the API key to have the write permission.
curl --request PATCH \
--url https://allocait.app/api/v1/playbooks/{id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"name": "<string>",
"description": "<string>",
"default_date": "2023-12-25",
"source_watchlist_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"custom_symbols": [
"<string>"
],
"input_columns": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"default_sort_input_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "https://allocait.app/api/v1/playbooks/{id}"
payload = {
"name": "<string>",
"description": "<string>",
"default_date": "2023-12-25",
"source_watchlist_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"custom_symbols": ["<string>"],
"input_columns": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"default_sort_input_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
default_date: '2023-12-25',
source_watchlist_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
custom_symbols: ['<string>'],
input_columns: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
default_sort_input_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
})
};
fetch('https://allocait.app/api/v1/playbooks/{id}', 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://allocait.app/api/v1/playbooks/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'description' => '<string>',
'default_date' => '2023-12-25',
'source_watchlist_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'custom_symbols' => [
'<string>'
],
'input_columns' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'default_sort_input_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <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://allocait.app/api/v1/playbooks/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"default_date\": \"2023-12-25\",\n \"source_watchlist_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"custom_symbols\": [\n \"<string>\"\n ],\n \"input_columns\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"default_sort_input_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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.patch("https://allocait.app/api/v1/playbooks/{id}")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"default_date\": \"2023-12-25\",\n \"source_watchlist_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"custom_symbols\": [\n \"<string>\"\n ],\n \"input_columns\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"default_sort_input_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://allocait.app/api/v1/playbooks/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"default_date\": \"2023-12-25\",\n \"source_watchlist_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"custom_symbols\": [\n \"<string>\"\n ],\n \"input_columns\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"default_sort_input_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"playbook": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"portfolio_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"default_date": "2023-12-25",
"source_type": "watchlist",
"source_watchlist_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"custom_symbols": [
"<string>"
],
"input_columns": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"default_sort_input_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"default_sort_direction": "asc",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"error": "Portfolio not found or access denied",
"error_code": "NOT_FOUND"
}{
"error": "Portfolio not found or access denied",
"error_code": "NOT_FOUND"
}{
"error": "Portfolio not found or access denied",
"error_code": "NOT_FOUND"
}{
"error": "Portfolio not found or access denied",
"error_code": "NOT_FOUND"
}{
"error": "Portfolio not found or access denied",
"error_code": "NOT_FOUND"
}{
"error": "Portfolio not found or access denied",
"error_code": "NOT_FOUND"
}{
"error": "Internal error",
"error_code": "INTERNAL_ERROR",
"request_id": "5b1e7c52-3f4a-4d0e-9a55-2d5cbe6f0a11"
}Authorizations
Raw API key shown once when created in the Allocait app (Settings > API keys). Send it verbatim in this header; the server stores and compares only its SHA-256 hash. Allocait generates every key: alc_ followed by 64 lowercase hex characters. Keys issued before 2026-10-10 are 64 hex characters with no prefix and keep working. A key may carry an expiry (90 days or 1 year, or never). A malformed, unknown, revoked or expired key gets 401 with no further detail, and a malformed one is refused before any lookup. Keys cannot be created through this API.
Path Parameters
playbook_id
Body
A date pins the sheet. null follows today in US Eastern. Left out, the stored date stays (ADR-189).
watchlist, positions, custom The column the app opens the sheet sorted by. null clears the sort. Left out, the stored sort stays (ADR-197).
rank puts 1 first, then 0 and the rest, then blank cells (a number column only). Alone, it changes the stored sort's direction (ADR-197).
asc, desc, rank