API reference
Design system
The brand rules every draft is validated against — voice, banned terms, hashtags, emoji policy, per-channel overrides. Versioned; writes need If-Match.
The brand rules every draft is validated against: voice, banned terms, hashtags, emoji policy, per-channel overrides. Versioned; writes need If-Match.
| Method | Endpoint | Summary |
|---|---|---|
| GET | /v1/workspaces/{ws}/design-system |
Get the design system |
| PUT | /v1/workspaces/{ws}/design-system |
Replace the design system |
| PATCH | /v1/workspaces/{ws}/design-system |
Partially update the design system |
| GET | /v1/workspaces/{ws}/design-system/versions |
Design system history |
| POST | /v1/workspaces/{ws}/design-system/import |
Import a design system from markdown |
| POST | /v1/workspaces/{ws}/design-system/versions/{number}/restore |
Restore a design system version |
Get the design system#
GET/v1/workspaces/{ws}/design-system
?format=prompt returns LLM-ready markdown sized for a system prompt (Accept: text/markdown for raw). ?version=N for history. ETag "ds:N".
Auth: API key (Authorization: Bearer obx_live_…). Requires scope design_system:read with workspace role owner / admin / editor / contributor / viewer / agent.
Path parameters
| Name | Required | Description |
|---|---|---|
ws |
yes | Workspace id (ws_…) or slug |
Query parameters
| Name | Required | Description |
|---|---|---|
format |
no | |
version |
no |
Response 200 — DesignSystem. Errors: RFC 9457 Problem with a stable code (error codes).
curl -X GET "https://api.outboxer.dev/v1/workspaces/acme/design-system?format=prompt" \
-H "Authorization: Bearer $OUTBOXER_API_KEY"const res = await fetch('https://api.outboxer.dev/v1/workspaces/acme/design-system?format=prompt', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.OUTBOXER_API_KEY}`,
},
});
if (!res.ok) throw new Error((await res.json()).code); // RFC 9457 problem
const data = await res.json();import os, uuid, requests
res = requests.request(
"GET",
"https://api.outboxer.dev/v1/workspaces/acme/design-system?format=prompt",
headers={"Authorization": f"Bearer {os.environ['OUTBOXER_API_KEY']}"},
)
res.raise_for_status() # problem details: res.json()["code"]
data = res.json()Replace the design system#
PUT/v1/workspaces/{ws}/design-system
Requires If-Match: "ds:
Auth: API key (Authorization: Bearer obx_live_…). Requires scope design_system:write with workspace role owner / admin / editor / agent.
Path parameters
| Name | Required | Description |
|---|---|---|
ws |
yes | Workspace id (ws_…) or slug |
Headers
| Name | Required | Description |
|---|---|---|
If-Match |
yes | ETag or version from your last read (optimistic concurrency). |
Request body
| Field | Type | Description |
|---|---|---|
data |
object | |
change_note |
string |
Response 200 — DesignSystem. Errors: RFC 9457 Problem with a stable code (error codes).
curl -X PUT "https://api.outboxer.dev/v1/workspaces/acme/design-system" \
-H "Authorization: Bearer $OUTBOXER_API_KEY" \
-H 'If-Match: "ds:3"' \
-H "Content-Type: application/json" \
-d '{
"data": {},
"change_note": "example"
}'const res = await fetch('https://api.outboxer.dev/v1/workspaces/acme/design-system', {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.OUTBOXER_API_KEY}`,
'If-Match': '"ds:3"',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"data": {},
"change_note": "example"
}),
});
if (!res.ok) throw new Error((await res.json()).code); // RFC 9457 problem
const data = await res.json();import os, uuid, requests
res = requests.request(
"PUT",
"https://api.outboxer.dev/v1/workspaces/acme/design-system",
headers={"Authorization": f"Bearer {os.environ['OUTBOXER_API_KEY']}", "If-Match": '"ds:3"'},
json={
"data": {},
"change_note": "example"
},
)
res.raise_for_status() # problem details: res.json()["code"]
data = res.json()Partially update the design system#
PATCH/v1/workspaces/{ws}/design-system
JSON Merge Patch (RFC 7396) on data: objects merge, null deletes a key, arrays replace. Requires If-Match: "ds:
Auth: API key (Authorization: Bearer obx_live_…). Requires scope design_system:write with workspace role owner / admin / editor / agent.
Path parameters
| Name | Required | Description |
|---|---|---|
ws |
yes | Workspace id (ws_…) or slug |
Headers
| Name | Required | Description |
|---|---|---|
If-Match |
yes | ETag or version from your last read (optimistic concurrency). |
Request body
| Field | Type | Description |
|---|---|---|
data |
object | |
change_note |
string |
Response 200 — DesignSystem. Errors: RFC 9457 Problem with a stable code (error codes).
curl -X PATCH "https://api.outboxer.dev/v1/workspaces/acme/design-system" \
-H "Authorization: Bearer $OUTBOXER_API_KEY" \
-H 'If-Match: "ds:3"' \
-H "Content-Type: application/json" \
-d '{
"data": {
"language": {
"banned_terms": [
"cheap",
"guaranteed"
]
},
"emoji": {
"policy": "none"
}
},
"change_note": "No emoji for the B2B relaunch"
}'const res = await fetch('https://api.outboxer.dev/v1/workspaces/acme/design-system', {
method: 'PATCH',
headers: {
Authorization: `Bearer ${process.env.OUTBOXER_API_KEY}`,
'If-Match': '"ds:3"',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"data": {
"language": {
"banned_terms": [
"cheap",
"guaranteed"
]
},
"emoji": {
"policy": "none"
}
},
"change_note": "No emoji for the B2B relaunch"
}),
});
if (!res.ok) throw new Error((await res.json()).code); // RFC 9457 problem
const data = await res.json();import os, uuid, requests
res = requests.request(
"PATCH",
"https://api.outboxer.dev/v1/workspaces/acme/design-system",
headers={"Authorization": f"Bearer {os.environ['OUTBOXER_API_KEY']}", "If-Match": '"ds:3"'},
json={
"data": {
"language": {
"banned_terms": [
"cheap",
"guaranteed"
]
},
"emoji": {
"policy": "none"
}
},
"change_note": "No emoji for the B2B relaunch"
},
)
res.raise_for_status() # problem details: res.json()["code"]
data = res.json()Design system history#
GET/v1/workspaces/{ws}/design-system/versions
Auth: API key (Authorization: Bearer obx_live_…). Requires scope design_system:read with workspace role owner / admin / editor / contributor / viewer / agent.
Path parameters
| Name | Required | Description |
|---|---|---|
ws |
yes | Workspace id (ws_…) or slug |
Response 200 — List. Errors: RFC 9457 Problem with a stable code (error codes).
curl -X GET "https://api.outboxer.dev/v1/workspaces/acme/design-system/versions" \
-H "Authorization: Bearer $OUTBOXER_API_KEY"const res = await fetch('https://api.outboxer.dev/v1/workspaces/acme/design-system/versions', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.OUTBOXER_API_KEY}`,
},
});
if (!res.ok) throw new Error((await res.json()).code); // RFC 9457 problem
const data = await res.json();import os, uuid, requests
res = requests.request(
"GET",
"https://api.outboxer.dev/v1/workspaces/acme/design-system/versions",
headers={"Authorization": f"Bearer {os.environ['OUTBOXER_API_KEY']}"},
)
res.raise_for_status() # problem details: res.json()["code"]
data = res.json()Import a design system from markdown#
POST/v1/workspaces/{ws}/design-system/import
Parses a brand / design-system markdown document (## Colors, ## Typography, ## Logo, ## Do, ## Don't, …) into design-system fields; unrecognized sections are kept in extra_sections. dry_run: true returns the parsed sections and resulting data without saving (needs design_system:read). Otherwise saves a new version: requires If-Match "ds:mode: merge (default; keeps sections the document doesn't mention) or replace.
Auth: API key (Authorization: Bearer obx_live_…).
Path parameters
| Name | Required | Description |
|---|---|---|
ws |
yes | Workspace id (ws_…) or slug |
Headers
| Name | Required | Description |
|---|---|---|
Idempotency-Key |
no | Replays within 24 h return the original response. |
Request body
| Field | Type | Description |
|---|---|---|
markdown |
string | |
mode |
string | |
dry_run |
boolean | |
change_note |
string |
Response 200 — Object. Errors: RFC 9457 Problem with a stable code (error codes).
curl -X POST "https://api.outboxer.dev/v1/workspaces/acme/design-system/import" \
-H "Authorization: Bearer $OUTBOXER_API_KEY" \
-H "Idempotency-Key: $(uuidgen)"const res = await fetch('https://api.outboxer.dev/v1/workspaces/acme/design-system/import', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.OUTBOXER_API_KEY}`,
'Idempotency-Key': crypto.randomUUID(),
},
});
if (!res.ok) throw new Error((await res.json()).code); // RFC 9457 problem
const data = await res.json();import os, uuid, requests
res = requests.request(
"POST",
"https://api.outboxer.dev/v1/workspaces/acme/design-system/import",
headers={"Authorization": f"Bearer {os.environ['OUTBOXER_API_KEY']}", "Idempotency-Key": str(uuid.uuid4())},
)
res.raise_for_status() # problem details: res.json()["code"]
data = res.json()Restore a design system version#
POST/v1/workspaces/{ws}/design-system/versions/{number}/restore
Creates a new version whose data equals version {number}. Requires If-Match.
Auth: API key (Authorization: Bearer obx_live_…). Requires scope design_system:write with workspace role owner / admin / editor / agent.
Path parameters
| Name | Required | Description |
|---|---|---|
ws |
yes | Workspace id (ws_…) or slug |
number |
yes | Revision or version number. |
Headers
| Name | Required | Description |
|---|---|---|
Idempotency-Key |
no | Replays within 24 h return the original response. |
If-Match |
yes | ETag or version from your last read (optimistic concurrency). |
Request body
| Field | Type | Description |
|---|---|---|
change_note |
string |
Response 201 — DesignSystem. Errors: RFC 9457 Problem with a stable code (error codes).
curl -X POST "https://api.outboxer.dev/v1/workspaces/acme/design-system/versions/2/restore" \
-H "Authorization: Bearer $OUTBOXER_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H 'If-Match: "ds:3"'const res = await fetch('https://api.outboxer.dev/v1/workspaces/acme/design-system/versions/2/restore', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.OUTBOXER_API_KEY}`,
'Idempotency-Key': crypto.randomUUID(),
'If-Match': '"ds:3"',
},
});
if (!res.ok) throw new Error((await res.json()).code); // RFC 9457 problem
const data = await res.json();import os, uuid, requests
res = requests.request(
"POST",
"https://api.outboxer.dev/v1/workspaces/acme/design-system/versions/2/restore",
headers={"Authorization": f"Bearer {os.environ['OUTBOXER_API_KEY']}", "Idempotency-Key": str(uuid.uuid4()), "If-Match": '"ds:3"'},
)
res.raise_for_status() # problem details: res.json()["code"]
data = res.json()