Skip to main content
POST
Ensure knowledge

Restrictions

Usage

  • Idempotent: if knowledge already exists at (scope, scope_id), it is returned; otherwise it is created empty.
  • For account scope, scope_id is ignored and a default DUTY.md is written whenever the knowledge has none (including after it was deleted). The returned file_count/version are read before that write and may not include it yet.
  • account scope requires the account owner or an admin; team scope requires membership of that team — owners and admins are not exempt.
  • Every call is recorded in the account audit log.

Authorizations

app_key
string
query
required

APP Key created in the Flashduty console under My → APP Key. Send it as the app_key query parameter or in the Fd-App-Key request header. Its effective access is the intersection of the key's permission scope and the creator's current role permissions. Keep it secret.

Body

application/json

Scope at which to ensure knowledge exists.

scope
enum<string>
required

Scope of the knowledge to ensure.

  • account: the account knowledge. scope_id is replaced by the caller's account ID; only the account owner and admins may call this, even when the knowledge already exists. If the knowledge has no DUTY.md, a default one is written.
  • team: the knowledge of the team in scope_id. scope_id is required and the caller must be a member of that team.
Available options:
account,
team
scope_id
integer<int64>

Team ID. Required (non-zero) for team scope, otherwise the request fails with InvalidParameter; ignored for account scope.

Response

Success

Standard response envelope used by every Flashduty public API. On success data contains the endpoint-specific payload and error is absent. On failure error is present and data is absent. request_id is always present and is also mirrored in the Flashcat-Request-Id response header.

request_id
string
required

Unique ID for this request. Mirrored in the Flashcat-Request-Id header. Include it when reporting issues.

Example:

"01HK8XQE3Z7JM2NTFQ5YJ8P9R4"

error
object

Error payload inside the response envelope. Present only on non-2xx responses.

data
object

Knowledge — a versioned file tree staged into every AI SRE sandbox at session start. One knowledge exists per (account, scope, scope_id).