Skip to content

Propose a decision record (own session token only)

POST
/v1/sessions/{session_id}/decisions
curl --request POST \
--url http://127.0.0.1:8080/v1/sessions/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/decisions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "title": "example", "context": "example", "decision": "example", "consequences": "example", "alternatives": "example", "risk": "low", "supersedes": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" }'

The server never lowers the stated risk. It raises low to high when the title or the decision names a risky area (ADR-0009, section 4), and a decision that supersedes a high one is high too. risk_reason says why. A low decision is accepted at once. A high one stays proposed until a lead or admin other than the proposer reviews it, and they get a decision_pending notice. Every field passes the secret scan, and the proposal is audited.

session_id
required
string format: uuid
Media typeapplication/json
object
title
required
string
>= 1 characters <= 200 characters
context
required
string
>= 1 characters <= 4096 characters
decision
required
string
>= 1 characters <= 4096 characters
consequences
required
string
>= 1 characters <= 4096 characters
alternatives
string
<= 4096 characters
risk
string
Allowed values: low high
supersedes

A decision of the same project this one replaces, which is not already superseded. A rejected decision stays rejected, and an accepted successor from the same session clears its merge gate.

string format: uuid

Stored.

Media typeapplication/json
object
decision
required
object
id
required
string format: uuid
project_id
required
string format: uuid
session_id
required
string format: uuid
intent_id
string | null format: uuid
proposed_by
required
object
id
required
string format: uuid
handle
required
string
title
required
string
context
required
string
decision
required
string
consequences
required
string
alternatives
string
risk
required
string
Allowed values: low high
risk_stated
required
string
Allowed values: low high
risk_reason

Why the server raised the risk. Absent when it kept the stated one.

string
status
required
string
Allowed values: proposed accepted rejected superseded
supersedes
string | null format: uuid
redacted
required
boolean
created_at
required
string format: date-time
decided_at
string format: date-time
review
object
id
required
string format: uuid
reviewer
required
object
id
required
string format: uuid
handle
required
string
verdict
required
string
Allowed values: approved rejected
comment
string
redacted
required
boolean
created_at
required
string format: date-time
score

Search only: the cosine or trigram similarity to q.

number
digest

Up to three of the session’s most urgent undelivered notices, one line each, after a “Zentri notices:” header. A last line says how many more wait. Showing a notice here marks it delivered but not acked. Absent when nothing is undelivered or the caller is not the session’s own token.

string

Example

{
"decision": {
"risk": "low",
"risk_stated": "low",
"status": "proposed",
"review": {
"verdict": "approved"
}
}
}

The request is malformed.

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string

Example generated

{
"error": {
"code": "example",
"message": "example"
}
}

No valid bearer token.

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string

Example generated

{
"error": {
"code": "example",
"message": "example"
}
}

The token may not do this.

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string

Example generated

{
"error": {
"code": "example",
"message": "example"
}
}

No such resource in the caller’s org.

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string

Example generated

{
"error": {
"code": "example",
"message": "example"
}
}

The request clashes with current state.

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string

Example generated

{
"error": {
"code": "example",
"message": "example"
}
}

The request is well formed but breaks a rule or a limit.

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string

Example generated

{
"error": {
"code": "example",
"message": "example"
}
}

A rate limit or quota stopped the request. Retry-After gives seconds to wait.

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string

Example generated

{
"error": {
"code": "example",
"message": "example"
}
}
Retry-After
integer