Bot
A bot, as writing one and as reading one both report it. It carries everything a listing item does, plus the two things only a single bot's answer knows — the channels it is reached through and whether its draft carries changes — and minus who wrote each side, which a caller looking at one bot has not asked for.
- builderType: string
_version requiredWhich builder built the bot. Only the current one can be written; every version can be read.
- channelType: ChannelFamilyenum
_family requiredvalueslandbotwhatsappfacebookapichat - channelsType: array of stringFormat: uuidrequired
The channels that serve the bot. A web bot is created with one; a bot can be served by more than one, and channels are managed outside this API.
- createdType: Timestamp
_at requiredA moment, in UTC, written as
YYYY-MM-DDTHH:MM:SS. It carries no offset and no fraction of a second, so a client that reads it as local time is wrong by whatever its own offset is. - hasType: boolean
_unpublished _changes requiredWhether the draft differs from what is published. A bot that has never been published always has changes to publish.
- idType: stringFormat: uuidrequired
- isType: boolean
_active requiredWhether the bot serves conversations. This is separate from
state: a bot in theactivestate can still be deactivated, and a trashed bot never serves regardless of this flag. - isType: boolean
_published requiredWhether a published version exists
- nameType: stringmax length:50required
- previewType: boolean
_only read-onlyrequiredThe bot runs in preview only, because it needs a higher plan tier than the brand has, or because the brand's subscription has lapsed. Derived on the subscription side and never set through this API.
- requiredType: PlanTierenum
_tier requiredThe lowest plan tier that can run this bot, worked out from the blocks in its draft.
valuessandboxstarterprofessionalbusiness - editedType: Timestamp
_at When the content last changed. Absent on a bot that has never been written to.
- lastType: Timestamp
_published _at A moment, in UTC, written as
YYYY-MM-DDTHH:MM:SS. It carries no offset and no fraction of a second, so a client that reads it as local time is wrong by whatever its own offset is. - stateType: BotStateenum
Whether the bot is in use or in the trash. Reported by reading a bot and by writing one alike: the trash is a state of the bot, so a write knows which side of it the bot it left behind is on.
valuesactivetrashed - workspaceType: integer
The workspace the bot belongs to. Absent when it belongs to none. Workspaces are not managed through this API and are identified by an integer, as they have no uuid.