Skip to content
Chatto v0.5.0

BotService

Chatto exposes this service below /api/connect.

Shared message and enum definitions are documented in Shared Types And Enums.

Creates and manages bot accounts owned by human users. Bot API keys can call this service with explicit permissions, bounded by their owner’s authority.

List retained failures for an endpoint of a bot you can manage. Returns full records in recording order, oldest first. Expired records are omitted. This history is diagnostic; an empty result does not prove successful delivery.

POST /api/connect/chatto.api.v1.BotService/ListBotWebhookFailures

Read the retained failure history for a current endpoint.

FieldTypeDescription
bot_user_idstringNo field description provided.
webhook_idstringNo field description provided.
page_sizeuint32Maximum records, from 1 to 100. Zero selects 20.
cursorstringOpaque continuation from the previous response. Bound to viewer and endpoint.

A bounded page of complete failure records. No per-record hydration is needed.

FieldTypeDescription
failuresrepeated BotWebhookFailureNo field description provided.
next_cursorstringEmpty at the end. Refresh without a cursor to include newer records.

Lists all endpoints, including paused endpoints. Requires bot ownership or bot.manage. Returns the complete bounded collection, so callers do not need batch hydration.

POST /api/connect/chatto.api.v1.BotService/ListBotOutboundWebhooks

Read all endpoints for one managed bot. At most 20 endpoints are returned.

FieldTypeDescription
bot_user_idstringRequired managed bot ID.

All current endpoints, including paused ones.

FieldTypeDescription
webhooksrepeated BotOutboundWebhookComplete collection, ordered by creation time and ID. No pagination is needed.

Gets one endpoint. Requires bot ownership or bot.manage. Missing endpoints return NOT_FOUND.

POST /api/connect/chatto.api.v1.BotService/GetBotOutboundWebhook

Read one endpoint belonging to the given managed bot.

FieldTypeDescription
bot_user_idstringRequired managed bot ID.
webhook_idstringRequired endpoint ID within this bot.

Metadata for the requested endpoint.

FieldTypeDescription
webhookBotOutboundWebhookEndpoint metadata without Authorization or signing credentials.

Creates an endpoint and returns its signing secret once. Requires bot ownership or bot.manage.

POST /api/connect/chatto.api.v1.BotService/CreateBotOutboundWebhook

Create an independent endpoint with its own signing secret.

FieldTypeDescription
bot_user_idstringRequired managed bot ID.
urlstringAbsolute HTTPS destination; HTTP is also allowed for localhost names.
authorizationstringOptional complete Authorization header value.
enabledboolFalse creates a paused endpoint.
namestringDisplay name, fixed after creation.

New endpoint and its show-once request verification secret.

FieldTypeDescription
webhookBotOutboundWebhookEndpoint metadata without Authorization or signing credentials.
signing_secretstringReturned only at creation. Configure the receiver with this HMAC secret if it verifies requests.

Edits delivery settings or pauses/resumes delivery. Requires ownership or bot.manage.

POST /api/connect/chatto.api.v1.BotService/UpdateBotOutboundWebhook

Patch delivery settings or pause/resume one endpoint. update_mask selects fields to apply or reset. Name and signing secret stay fixed.

FieldTypeDescription
bot_user_idstringRequired managed bot ID.
webhook_idstringRequired endpoint ID within this bot.
enabledoptional boolSelected enabled state. False pauses delivery; resume accepts only new messages.
urloptional stringSelected new destination. Changing settings cancels queued retries.
authorizationoptional stringSelected Authorization header. Absent or empty removes it. Never returned.
update_maskgoogle.protobuf.FieldMaskEditable fields to apply or reset: enabled, url, authorization. Omit to infer populated fields; * selects all editable fields. An explicit empty mask is invalid. Unselected values are ignored. Selected absent values reset the field to its default, subject to field validation.

Endpoint state after the update.

FieldTypeDescription
webhookBotOutboundWebhookEndpoint metadata without Authorization or signing credentials.

Permanently revokes an endpoint. Requires ownership or bot.manage.

POST /api/connect/chatto.api.v1.BotService/RevokeBotOutboundWebhook

Revoke one endpoint and cancel its queued retries. In-flight HTTP may finish.

FieldTypeDescription
bot_user_idstringRequired managed bot ID.
webhook_idstringRequired endpoint ID within this bot.

Revocation completed, or this endpoint was already absent.

Lists bots visible to the authenticated caller.

POST /api/connect/chatto.api.v1.BotService/ListBots

Request bots visible to the caller. Owners see their own bots. Callers with bot.manage or user.manage-accounts see every bot.

FieldTypeDescription
searchstringOptional case-insensitive login or display-name search.
pagePageRequestDefaults to 20 results when absent or limit is zero. Maximum: 100.

Page of visible bots.

FieldTypeDescription
botsrepeated BotVisible bots by case-insensitive login, then user ID, in ascending order.
pagePageInfoPage metadata.

Gets one visible bot. Returns NOT_FOUND for an unknown bot. Returns PERMISSION_DENIED when the caller is not the owner and has neither bot.manage nor user.manage-accounts.

POST /api/connect/chatto.api.v1.BotService/GetBot

Request one bot by stable user ID.

FieldTypeDescription
bot_user_idstringRequired bot user ID.

Response containing one bot.

FieldTypeDescription
botBotRequested bot.

Gets several visible bots. Missing and inaccessible bots are omitted.

POST /api/connect/chatto.api.v1.BotService/BatchGetBots

Request several bots by stable user ID.

FieldTypeDescription
bot_user_idsrepeated stringRequired bot user IDs. Missing or inaccessible bots are omitted.

Response containing accessible bots in first-seen request order.

FieldTypeDescription
botsrepeated BotFound bots.

Creates a bot owned by the human caller or a bot caller’s human owner. Requires bot.create. The new bot starts without permission grants.

POST /api/connect/chatto.api.v1.BotService/CreateBot

Request creation of a bot owned by the human caller or a bot caller’s human owner.

FieldTypeDescription
loginstringBot login. Uses the same username rules as a human account.
display_namestringPublic display name.
api_key_nameoptional stringOptional name for the initial API key. Defaults to “Default key”.

Result of creating a bot. api_key is shown once and cannot be retrieved.

FieldTypeDescription
botBotCreated bot.
api_keystringNewly issued API key.
api_key_metadataBotApiKeySafe metadata for the newly issued API key.

Deletes a bot and invalidates all of its API keys.

POST /api/connect/chatto.api.v1.BotService/DeleteBot

Request deletion of a bot account.

FieldTypeDescription
bot_user_idstringRequired bot user ID.

Result of deleting a bot account.

FieldTypeDescription
deletedboolTrue when the bot was deleted.

Creates one named API key. A bot can have at most 20 active API keys. Requires bot ownership or bot.manage. The key uses the target bot’s authority, which can exceed the caller’s authority.

POST /api/connect/chatto.api.v1.BotService/CreateBotApiKey

Request creation of one named API key for a bot.

FieldTypeDescription
bot_user_idstringRequired bot user ID.
namestringRequired manager-defined name. Names do not need to be unique.

Result of creating one API key. api_key is shown once and cannot be retrieved later.

FieldTypeDescription
botBotUpdated bot metadata.
api_keystringNewly issued API key.
api_key_metadataBotApiKeySafe metadata for the newly issued API key.

Revokes one API key without changing other active keys.

POST /api/connect/chatto.api.v1.BotService/RevokeBotApiKey

Request irreversible revocation of one bot API key.

FieldTypeDescription
bot_user_idstringRequired bot user ID.
key_idstringRequired API-key credential ID.

Result of revoking one bot API key.

FieldTypeDescription
botBotUpdated bot metadata.

Creates a named incoming webhook. A bot can have at most 20 active incoming webhooks.

POST /api/connect/chatto.api.v1.BotService/CreateBotIncomingWebhook

Request creation of one named incoming webhook for a bot.

FieldTypeDescription
bot_user_idstringRequired bot user ID.
namestringRequired manager-defined name. Names do not need to be unique.

Result of creating an incoming webhook. webhook_url is shown once and cannot be retrieved later.

FieldTypeDescription
botBotUpdated bot metadata.
webhook_urlstringNewly issued incoming webhook URL.

Revokes one incoming webhook without changing other webhooks.

POST /api/connect/chatto.api.v1.BotService/RevokeBotIncomingWebhook

Request irreversible revocation of one incoming webhook credential.

FieldTypeDescription
bot_user_idstringRequired bot user ID.
webhook_idstringRequired webhook credential ID.

Result of revoking an incoming webhook.

FieldTypeDescription
botBotUpdated bot metadata.

Reassigns a bot to another active human owner. Requires bot.manage. The current API keys and configured permission allowlist remain unchanged, while effective permissions immediately use the new owner’s ceiling.

POST /api/connect/chatto.api.v1.BotService/ReassignBotOwner

Request an administrative reassignment of a bot to another human owner.

FieldTypeDescription
bot_user_idstringRequired bot user ID.
owner_user_idstringRequired user ID of the new human owner.

Result of reassigning a bot owner. The bot’s API keys and configured permission allowlist are unchanged.

FieldTypeDescription
botBotReassigned bot.