curl --request PATCH \
--url https://api.superx.so/v1/context \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"rules": "Never use hashtags. Keep posts under 200 characters.",
"interests": [
"indie hacking",
"SaaS",
"AI agents"
],
"style_guide": {
"audience_override": null
}
}
'import requests
url = "https://api.superx.so/v1/context"
payload = {
"rules": "Never use hashtags. Keep posts under 200 characters.",
"interests": ["indie hacking", "SaaS", "AI agents"],
"style_guide": { "audience_override": None }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
rules: 'Never use hashtags. Keep posts under 200 characters.',
interests: ['indie hacking', 'SaaS', 'AI agents'],
style_guide: {audience_override: null}
})
};
fetch('https://api.superx.so/v1/context', 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.superx.so/v1/context",
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([
'rules' => 'Never use hashtags. Keep posts under 200 characters.',
'interests' => [
'indie hacking',
'SaaS',
'AI agents'
],
'style_guide' => [
'audience_override' => null
]
]),
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.superx.so/v1/context"
payload := strings.NewReader("{\n \"rules\": \"Never use hashtags. Keep posts under 200 characters.\",\n \"interests\": [\n \"indie hacking\",\n \"SaaS\",\n \"AI agents\"\n ],\n \"style_guide\": {\n \"audience_override\": null\n }\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.superx.so/v1/context")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"rules\": \"Never use hashtags. Keep posts under 200 characters.\",\n \"interests\": [\n \"indie hacking\",\n \"SaaS\",\n \"AI agents\"\n ],\n \"style_guide\": {\n \"audience_override\": null\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.superx.so/v1/context")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"rules\": \"Never use hashtags. Keep posts under 200 characters.\",\n \"interests\": [\n \"indie hacking\",\n \"SaaS\",\n \"AI agents\"\n ],\n \"style_guide\": {\n \"audience_override\": null\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"profile_description": {
"text": "<string>",
"enabled": true
},
"interests": [
"<string>"
],
"rules": "<string>",
"reply": {
"custom_instructions": "<string>",
"include_author_name": true
},
"voice": {
"favorite_creators": [
{
"screen_name": "<string>",
"id": "<string>",
"name": "<string>",
"profile_image_url_https": "<string>"
}
],
"use_own_posts_as_examples": true
},
"style_guide": {
"audience_override": "<string>",
"vocabulary_override": "<string>",
"generated": {
"audience": "<string>",
"vocabulary": "<string>",
"generated_at": "2023-11-07T05:31:56Z"
}
},
"products": [
{
"id": 123,
"url": "<string>",
"name": "<string>",
"description": "<string>",
"positioning": "<string>",
"features": "<string>",
"updates": "<string>",
"last_scraped_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
]
},
"note": "<string>"
}{
"error": {
"code": "invalid_parameter",
"message": "since must be a UTC ISO-8601 timestamp"
}
}{
"error": {
"code": "invalid_api_key",
"message": "Unknown or revoked API key"
}
}{
"error": {
"code": "editor_restricted",
"message": "This account is shared with you with Editor permission. Only the account owner can change these settings."
}
}{
"error": {
"code": "account_not_found",
"message": "No account with that id belongs to this key"
}
}{
"error": {
"code": "rate_limited",
"message": "Rate limit exceeded for the Pro plan (30 requests/min). Upgrade for higher limits.",
"retry_after": 42
}
}{
"error": {
"code": "internal_error",
"message": "Failed to fetch posts"
}
}{
"error": {
"code": "upstream_error",
"message": "Failed to fetch scheduled posts. Try again shortly."
}
}{
"error": {
"code": "upstream_unavailable",
"message": "The scheduling service is temporarily unavailable. Retry with the same Idempotency-Key."
}
}Update context settings
Edit any subset of the Context settings; only the fields you send change. Strings accept null to clear (style-guide overrides then revert to the generated guide). Arrays fully REPLACE the stored list: send every value the account should keep, [] clears. voice.favorite_creators takes X usernames (with or without @, as bare strings or as the objects GET returns); SuperX resolves names and avatars. Unlike most write endpoints, context writes accept account_id for any linked or shared account; on a share with editor permission they return 403 editor_restricted, because only the account owner may change what the AI knows. These settings shape all future AI output for the account. Returns the full updated document.
curl --request PATCH \
--url https://api.superx.so/v1/context \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"rules": "Never use hashtags. Keep posts under 200 characters.",
"interests": [
"indie hacking",
"SaaS",
"AI agents"
],
"style_guide": {
"audience_override": null
}
}
'import requests
url = "https://api.superx.so/v1/context"
payload = {
"rules": "Never use hashtags. Keep posts under 200 characters.",
"interests": ["indie hacking", "SaaS", "AI agents"],
"style_guide": { "audience_override": None }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
rules: 'Never use hashtags. Keep posts under 200 characters.',
interests: ['indie hacking', 'SaaS', 'AI agents'],
style_guide: {audience_override: null}
})
};
fetch('https://api.superx.so/v1/context', 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.superx.so/v1/context",
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([
'rules' => 'Never use hashtags. Keep posts under 200 characters.',
'interests' => [
'indie hacking',
'SaaS',
'AI agents'
],
'style_guide' => [
'audience_override' => null
]
]),
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.superx.so/v1/context"
payload := strings.NewReader("{\n \"rules\": \"Never use hashtags. Keep posts under 200 characters.\",\n \"interests\": [\n \"indie hacking\",\n \"SaaS\",\n \"AI agents\"\n ],\n \"style_guide\": {\n \"audience_override\": null\n }\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.superx.so/v1/context")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"rules\": \"Never use hashtags. Keep posts under 200 characters.\",\n \"interests\": [\n \"indie hacking\",\n \"SaaS\",\n \"AI agents\"\n ],\n \"style_guide\": {\n \"audience_override\": null\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.superx.so/v1/context")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"rules\": \"Never use hashtags. Keep posts under 200 characters.\",\n \"interests\": [\n \"indie hacking\",\n \"SaaS\",\n \"AI agents\"\n ],\n \"style_guide\": {\n \"audience_override\": null\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"profile_description": {
"text": "<string>",
"enabled": true
},
"interests": [
"<string>"
],
"rules": "<string>",
"reply": {
"custom_instructions": "<string>",
"include_author_name": true
},
"voice": {
"favorite_creators": [
{
"screen_name": "<string>",
"id": "<string>",
"name": "<string>",
"profile_image_url_https": "<string>"
}
],
"use_own_posts_as_examples": true
},
"style_guide": {
"audience_override": "<string>",
"vocabulary_override": "<string>",
"generated": {
"audience": "<string>",
"vocabulary": "<string>",
"generated_at": "2023-11-07T05:31:56Z"
}
},
"products": [
{
"id": 123,
"url": "<string>",
"name": "<string>",
"description": "<string>",
"positioning": "<string>",
"features": "<string>",
"updates": "<string>",
"last_scraped_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
]
},
"note": "<string>"
}{
"error": {
"code": "invalid_parameter",
"message": "since must be a UTC ISO-8601 timestamp"
}
}{
"error": {
"code": "invalid_api_key",
"message": "Unknown or revoked API key"
}
}{
"error": {
"code": "editor_restricted",
"message": "This account is shared with you with Editor permission. Only the account owner can change these settings."
}
}{
"error": {
"code": "account_not_found",
"message": "No account with that id belongs to this key"
}
}{
"error": {
"code": "rate_limited",
"message": "Rate limit exceeded for the Pro plan (30 requests/min). Upgrade for higher limits.",
"retry_after": 42
}
}{
"error": {
"code": "internal_error",
"message": "Failed to fetch posts"
}
}{
"error": {
"code": "upstream_error",
"message": "Failed to fetch scheduled posts. Try again shortly."
}
}{
"error": {
"code": "upstream_unavailable",
"message": "The scheduling service is temporarily unavailable. Retry with the same Idempotency-Key."
}
}Authorizations
A SuperX API key ("sxk_..."), created in the SuperX app under Account > API / MCP / CLI. Keys are server-side secrets.
Query Parameters
Account to act on, from GET /v1/accounts. Defaults to your main account. An id outside your accounts returns 404 account_not_found.
Body
Response
The full updated context document. If the save landed but the read-back failed, data is null and note says to fetch GET /v1/context for the updated document.