Skip to main content
POST
Python SDK

Authorizations

Authorization
string
header
required

Enter your API key (e.g. dai_sk_test_key_001)

Headers

Authorization
string
X-Workspace-Id
string | null

Cookies

decimal_session
string | null

Body

application/json

Validated request for POST /skills/sync.

Single endpoint covers both CLI (bidirectional reconciliation) and SDK (one-way upsert) — the difference is the response_mode flag (rich actions array for CLI, summary counts for SDK) and the conflict_policy (CLI defaults to newer_wins for human-in-the-loop, CI/SDK should set local_wins because the repo is the source of truth).

skills
SyncSkillItem · object[]
required
Required array length: 1 - 200 elements
author
string | null

Author display name recorded on every SkillVersion created by this sync.

install_id
string | null

Project-local install identity (persisted by the SDK in .decimal/install.json). When present, the sync records per-install divergence state so GET /skills/installs can flag local/remote drift. Omit for back-compat: the sync then behaves exactly as before.

Maximum string length: 128
install_label
string | null

Human-friendly install label (hostname, 'ci', …) for the dashboard.

Maximum string length: 200
conflict_policy
enum<string>
default:newer_wins

newer_wins: compare timestamps (default; right for interactive CLI). local_wins: always overwrite remote (right for CI / build artifacts). remote_wins: never overwrite local; conflicts return pulled actions.

Available options:
newer_wins,
local_wins,
remote_wins
response_mode
enum<string>
default:summary

summary: return counts only (cheap; SDK default). diff: return per-skill actions array including bodies for pulled skills (CLI).

Available options:
summary,
diff

Response

Successful Response

status
string
required
Allowed value: "ok"
created
integer
required

Number of new skills created.

updated
integer
required

Number of existing skills with a new version (pushed).

unchanged
integer
required

Number of skills whose body hash matched — no-op.

pulled
integer
default:0

Number of skills where remote was newer; caller should refresh local.

failures
Failures · object[]

Per-skill failures with name + error.

actions
SyncSkillAction · object[] | null

Per-skill action list — present only when response_mode='diff'.