8DNA API

Set Dna Data By Key

Set value at key (project.data.* or user.data.*). For built apps using sdk.db.set(key, value).

This endpoint is an immediate leaf write (jsonb_set), same grammar as PATCH /api/projects/{id}/data. Query commit_mode=dirty is accepted for compatibility but does not make KV write-behind — use the protein command bus for dirty journals. Prefer MCP projects.patch_data when the client speaks MCP.

post/api/dna/data

Request

  • Base URL: https://api.agentstack.tech (the document declares no server; this is the origin it was published from)
  • URL: https://api.agentstack.tech/api/dna/data
  • Auth: one of:
    • API key in header X-API-Key
    • HTTP bearer

Query parameters

commit_modestring nullable

Optional: dirty only if domain allowlisted; DNA KV still defaults to immediate SoT

Headers

Idempotency-Keystring

Client-generated key to make mutating requests idempotent.

Request body

keystring

project.data.* or user.data.* dotted suffix

project_idinteger nullable
commit_modestring nullable

Compatibility hint only; KV writes stay immediate leaf SoT

valueunknown
write_modestring nullable
allow_shrinkboolean
replacementsobject[] nullable
unified_diffstring nullable
strict_diffboolean nullable
opsobject[] nullable
dry_runboolean
expected_sha256string nullable
missingstring nullable

Response

Successful Response

unknown required

Changes

No recorded changes to this operation across all 1 revision of this API.