Channel Gateway API: schemas

The request and response bodies of the operations in this API.

ChannelAccountDto

PropertyTypeRequiredDescription
activatorUserIdstringyesThe person who created or last activated the account; the delegation the account holds was originated from their context.
agentRefstringyes
connectionIdstringyesThe connector connection (OrgConnection.id) every send of this account goes through.
createdAtstring (date-time)yes
dispatchModeDispatchModeyes
displayNamestringyes
externalAccountIdstringnoThe provider-side account id (for a personal account, the owner's own phone or email). Left out for a caller whose only path is the org-admin configure (list and revoke).
idstringyes
orgIdstringyes
ownerIdstringyesOwner subject id (the org id for an org-owned account).
ownerKindChannelOwnerKindyes
providerstringyesConnector provider key this account belongs to (UPPER_SNAKE, e.g. TELEGRAM). Open key space — the installed connector biomes decide the valid set.
sessionScopeSessionScopeyes
statusChannelAccountStatusyes
statusDetailstring or nullyesThe delegation boundary's code behind statusReason, when it gave one.
statusReasonChannelAccountStatusReason or nullyesWhy the account is not ACTIVE (null when ACTIVE). DELEGATION_* reasons need an org admin to re-activate the account.
updatedAtstring (date-time)yes

ChannelAccountDtoDataArrayEnvelope

PropertyTypeRequiredDescription
dataarray of ChannelAccountDtoyes

ChannelAccountDtoDataEnvelope

PropertyTypeRequiredDescription
dataChannelAccountDtoyes

ChannelAccountStatus

Type: one of "PENDING", "ACTIVE", "DISABLED", "ERRORED"

ChannelAccountStatusReason

Why the account is not ACTIVE (null when ACTIVE). DELEGATION_* reasons need an org admin to re-activate the account.

Type: one of "DEACTIVATED", "DELEGATION_ABSENT", "DELEGATION_RENEWAL_REFUSED", "DELEGATION_REFUSED_AT_USE", "DELEGATION_REFUSED", "DELEGATION_ENDED"

ChannelOwnerKind

Type: one of "ORG", "TEAM", "USER"

ChannelReplyDeliveryState

Type: one of "PENDING", "SENDING", "SENT", "UNCERTAIN", "EMPTY", "FAILED"

ChannelTurnDeliveryDto

PropertyTypeRequiredDescription
bindingIdstringyesThe conversation (session binding) the turn belongs to.
createdAtstring (date-time)yes
stateChannelReplyDeliveryStateyes
turnIdstringyesThe turn the reply answers (the Idempotency-Key it was relayed under).
updatedAtstring (date-time)yes

ChannelTurnDeliveryDtoDataEnvelope

PropertyTypeRequiredDescription
dataChannelTurnDeliveryDtoyes

ChannelTurnDeliveryDtoPaginatedEnvelope

PropertyTypeRequiredDescription
dataarray of ChannelTurnDeliveryDtoyes
paginationPaginationMetayes

CreateChannelAccountDto

PropertyTypeRequiredDescription
agentRefstringyesAgent ref every routed session is created with: slug (the latest published revision) or slug@<revisionNumber>, where the revision is the agent registry's generated positive integer — NOT a semantic version. Prefer the bare slug so the channel tracks the current agent.
connectionIdstringyesThe connector connection this account sends through. Must be an org-tier connection of the account's provider.
dispatchModeDispatchModenoDefault dispatch behavior for inbound turns. Defaults to COLLECT.
displayNamestringyesHuman label for this account.
externalAccountIdstringyesProvider-native account identifier (bot username, Slack team id, …). Unique per provider within an org.
ownerIdstringnoThe owner's id: the team id or the user id. Omitted for ORG; when given for ORG it must be the request organization.
ownerKindChannelOwnerKindnoWhose conversations these are: the owner SUBJECT that may READ their transcripts. Defaults to ORG (the organization, read by its administrators). A TEAM is read by its members, a USER by that user. The activating admin must pass the PDP may_delegate_for check on the owner.
ownerSenderIdstringyesProvider-native sender id of the bot owner. Auto-paired as OWNER so the owner has full access immediately.
providerstringyesConnector provider key of the conversation channel (UPPER_SNAKE, e.g. TELEGRAM, SLACK). Must name a connector registered with connector-gateway-api that declares the outbound send action — an unregistered key is refused with 400 UNKNOWN_CHANNEL_PROVIDER.
sessionScopeSessionScopenoSession granularity for inbound targets. Defaults to USER.

DispatchMode

Type: one of "COLLECT", "STEER", "FOLLOWUP"

PaginationMeta

PropertyTypeRequiredDescription
hasMorebooleanno
limitnumberno
nextCursorstring or nullno
pagenumberno
previousCursorstring or nullno
totalnumberno
totalPagesnumberno

ProblemActionableBy

Who can act on this refusal: user (correct the input, sign in), org-admin (an administrator of the organisation), platform (the operators of this installation), none (nobody — it cannot succeed). ABSENT when not known; never guessed.

Type: one of "user", "org-admin", "platform", "none"

ProblemDetailsDto

RFC 9457 problem document. The declared members are the reserved core; extension members are TOP-LEVEL and OPEN, owned by the refusing plane.

PropertyTypeRequiredDescription
actionableByProblemActionableBynoWho can act on this refusal: user (correct the input, sign in), org-admin (an administrator of the organisation), platform (the operators of this installation), none (nobody — it cannot succeed). ABSENT when not known; never guessed.
codestringyesSCREAMING_SNAKE_CASE. The machine-branchable refusal, and the value a policy rule, a retry predicate and a UI branch all name.
detailstringnoHuman-readable and specific to THIS occurrence.
errorsarray of ProblemFieldIssueDtonoField-level issues, when the refusal is about the request body.
instancestringnoURI reference identifying the occurrence — a request path, a run, a row.
paramsmap of string or number or booleannoSafe i18n interpolation values for the message keyed by code — typed and allowlisted per code by its declaration. Never server-authored copy, never internal diagnostics.
retryProblemRetrynoWhat a retry can achieve: transient (later, unchanged), after-change (only after someone changes something), never (a defect until a fixed version ships). ABSENT when not known.
statusnumberyesThe HTTP status code, repeated in the body so a logged document is self-contained.
titlestringyesShort, human-readable, and STABLE for a given type. Never per-occurrence — that is detail.
traceIdstringnoW3C trace-context trace-id, present when the caller sent a traceparent. Omitted rather than invented when it did not.
typestringyesAbsolute URI identifying the refusal TYPE. Derived one-to-one from code, so a caller may branch on either and can never be told two different things. Never about:blank.

ProblemFieldIssueDto

PropertyTypeRequiredDescription
codestringnoSCREAMING_SNAKE_CASE code of THIS issue, for a frontend i18n key. Present when the issue was minted by a declared problem.
detailstringyesProse for logs and developers. A frontend localises from code + params instead.
paramsmap of string or number or booleannoSafe i18n interpolation values for this issue's code.
pointerstringyesRFC 6901 JSON Pointer into the request body. Root is "/".

ProblemRetry

What a retry can achieve: transient (later, unchanged), after-change (only after someone changes something), never (a defect until a fixed version ships). ABSENT when not known.

Type: one of "transient", "after-change", "never"

PutResourceShareDto

PropertyTypeRequiredDescription
expiresAtstring (date-time)noWhen the share lapses.
levelstringyesThe level to grant — one of the type's share relations.
subjectIdstringyes
subjectKindShareGranteeKindyesA user grantee is bound to that user's current membership of the org (422 when not a member).

ResourceShareDto

PropertyTypeRequiredDescription
expiresAtstring (date-time) or nullyes
grantedBystringyes<kind>:<id> of the principal who granted it.
levelstringyesThe relation the share grants (a level of the type).
membershipActiveboolean or nullyesFor a membership share, whether it is still the user's current membership of the org; false means the user left and the share grants nothing (it can still be removed). Null for every other kind.
refusalCodestring or nullyesThe typed refusal code (tenant_mismatch, subject_unresolvable, ...) when state is refused, else null.
stateShareStateyesWhether the share is in force. refused: the authorization plane refused its facts for good, so it grants nothing; re-put it with a valid subject, or remove it.
subjectIdstringyesFor a membership share, the membership id (one stay of the user in the org).
subjectKindShareSubjectKindyes
userIdstring or nullyesThe user of a membership share; null for every other kind.

ResourceSharesDto

PropertyTypeRequiredDescription
canManagebooleanyesWhether the caller may share or unshare this resource.
expirablebooleanyesWhether a share of this type may carry an expiry; when false an expiry is refused.
levelsarray of stringyesThe levels a share of this type may grant, lowest first. A sharer may grant only a level it holds.
sharesarray of ResourceShareDtoyes

ResourceSharesDtoDataEnvelope

PropertyTypeRequiredDescription
dataResourceSharesDtoyes

SessionScope

Type: one of "USER", "THREAD", "SINGLE"

ShareGranteeKind

A user grantee is bound to that user's current membership of the org (422 when not a member).

Type: one of "user", "agent", "external-subject", "team", "role"

ShareState

Whether the share is in force. refused: the authorization plane refused its facts for good, so it grants nothing; re-put it with a valid subject, or remove it.

Type: one of "active", "refused"

ShareSubjectKind

Type: one of "membership", "agent", "external-subject", "team", "role"