Skip to content

Upsert a tenant-config entry

PATCH
/v1/tenant/config
curl --request PATCH \
--url https://example.com/v1/tenant/config \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "kind": "env", "key": "example", "value": "example", "sensitive": true, "ifRevision": 1 }'

Set / update an entry keyed by (kind, key). Optional ifRevision provides optimistic-concurrency: the write fails with tenant-config-revision-conflict (409) unless the stored revision matches. Omit for last-write-wins.

Idempotency-Key
string
>= 1 characters

Caller-supplied idempotency key. Retries with the same key return the original response byte-identical (per docs/API-ROUTE-CONVENTIONS.md §3.1).

Media typeapplication/json
object
kind
required

Slot for a tenant config entry (tenant-scoped). env and config both address EnvBinding; secret addresses SecretBinding. Prefer /v1/env/* + /v1/secrets/* for new callers.

string
Allowed values: env config secret
key
required
string
>= 1 characters
value
required
string
sensitive

When true, the write is routed to SecretBinding regardless of kind. kind: "secret" implies sensitive: true.

boolean
ifRevision

Optimistic-concurrency guard — the write fails with tenant-config-revision-conflict (409) unless the stored revision matches. Omit for last-write-wins.

integer

Entry upserted.

Media typeapplication/json
object
entry
required
object
tenantId
required
string
kind
required

Slot for a tenant config entry (tenant-scoped). env and config both address EnvBinding; secret addresses SecretBinding. Prefer /v1/env/* + /v1/secrets/* for new callers.

string
Allowed values: env config secret
key
required
string
value
required

Entry value. For kind: "secret" this is ALWAYS [redacted] on this admin surface; use the /v1/secrets/* routes and SecretBinding.resolve on the dispatch path to read plaintext.

string
sensitive
required
boolean
revision
required
integer
updatedAt
required
string
Example
{
"entry": {
"kind": "env"
}
}

Malformed request body.

Media typeapplication/json
object
error
required
object
code
required

Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).

string
message
required
string
details

Optional, kind-specific.

object
key
additional properties
any
requestId
required

Server-assigned request id; also echoed via X-Request-Id header.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"details": {},
"requestId": "example"
}
}

Missing / malformed / expired / revoked bearer token.

Media typeapplication/json
object
error
required
object
code
required

Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).

string
message
required
string
details

Optional, kind-specific.

object
key
additional properties
any
requestId
required

Server-assigned request id; also echoed via X-Request-Id header.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"details": {},
"requestId": "example"
}
}

ifRevision was set and did not match the stored revision.

Media typeapplication/json
object
error
required
object
code
required

Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).

string
message
required
string
details

Optional, kind-specific.

object
key
additional properties
any
requestId
required

Server-assigned request id; also echoed via X-Request-Id header.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"details": {},
"requestId": "example"
}
}

Server error (unmapped domain code or framework crash).

Media typeapplication/json
object
error
required
object
code
required

Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).

string
message
required
string
details

Optional, kind-specific.

object
key
additional properties
any
requestId
required

Server-assigned request id; also echoed via X-Request-Id header.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"details": {},
"requestId": "example"
}
}