Skip to content
Konstera
Capability catalogue
inboxinternal

inbox.upsert_thread

Create or update a thread in the reviewer inbox

Create a new thread or update an existing one keyed by (tenant, channel_type, external_ref). Platform-shipped write primitive used by ThreadMirrorService internally and callable by agents directly for non-mirrored writes.

Effect
internal
Fanout
no
Cache TTL
none
Traits
inbox_writer

Request arguments

Passed as the args parameter to ctx.capability.call("inbox.upsert_thread", …).

FieldTypeRequiredDescription
statusstringno
enum: ["open","waiting_reviewer","waiting_counterparty","closed"]
subjectstringyes
channelTypestringyes
enum: ["email","ticket","chat","agent_direct"]
externalRefstringyes
participantsarray<object>no

Response

Returned by ctx.capability.call("inbox.upsert_thread", …).

FieldTypeRequiredDescription
createdbooleannotrue if a new row was inserted; false if an existing row matched (externalRef, channelType) and was updated
threadIdstringyes
format: uuid

Example call

From inside your agent's handle(). The kernel resolves inbox.upsert_thread to the tenant's connector binding at invocation time.

response = await ctx.capability.call(
    "inbox.upsert_thread",
    args={
        "status": "open",
        "subject": "...",
        "channelType": "email",
        "externalRef": "...",
        "participants": [],
    },
)

See SDK quickstart for the full agent handler template; code examples covers invocation patterns including fanout and error handling.