BotService
Chatto exposes this service below /api/connect.
Shared message and enum definitions are documented in Shared Types And Enums.
BotService
Section titled “BotService”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.
ListBotWebhookFailures
Section titled “ListBotWebhookFailures”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/ListBotWebhookFailuresInput: ListBotWebhookFailuresRequest
Section titled “Input: ListBotWebhookFailuresRequest”Read the retained failure history for a current endpoint.
| Field | Type | Description |
|---|---|---|
bot_user_id | string | No field description provided. |
webhook_id | string | No field description provided. |
page_size | uint32 | Maximum records, from 1 to 100. Zero selects 20. |
cursor | string | Opaque continuation from the previous response. Bound to viewer and endpoint. |
Result: ListBotWebhookFailuresResponse
Section titled “Result: ListBotWebhookFailuresResponse”A bounded page of complete failure records. No per-record hydration is needed.
| Field | Type | Description |
|---|---|---|
failures | repeated BotWebhookFailure | No field description provided. |
next_cursor | string | Empty at the end. Refresh without a cursor to include newer records. |
ListBotOutboundWebhooks
Section titled “ListBotOutboundWebhooks”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/ListBotOutboundWebhooksInput: ListBotOutboundWebhooksRequest
Section titled “Input: ListBotOutboundWebhooksRequest”Read all endpoints for one managed bot. At most 20 endpoints are returned.
| Field | Type | Description |
|---|---|---|
bot_user_id | string | Required managed bot ID. |
Result: ListBotOutboundWebhooksResponse
Section titled “Result: ListBotOutboundWebhooksResponse”All current endpoints, including paused ones.
| Field | Type | Description |
|---|---|---|
webhooks | repeated BotOutboundWebhook | Complete collection, ordered by creation time and ID. No pagination is needed. |
GetBotOutboundWebhook
Section titled “GetBotOutboundWebhook”Gets one endpoint. Requires bot ownership or bot.manage. Missing endpoints return NOT_FOUND.
POST /api/connect/chatto.api.v1.BotService/GetBotOutboundWebhookInput: GetBotOutboundWebhookRequest
Section titled “Input: GetBotOutboundWebhookRequest”Read one endpoint belonging to the given managed bot.
| Field | Type | Description |
|---|---|---|
bot_user_id | string | Required managed bot ID. |
webhook_id | string | Required endpoint ID within this bot. |
Result: GetBotOutboundWebhookResponse
Section titled “Result: GetBotOutboundWebhookResponse”Metadata for the requested endpoint.
| Field | Type | Description |
|---|---|---|
webhook | BotOutboundWebhook | Endpoint metadata without Authorization or signing credentials. |
CreateBotOutboundWebhook
Section titled “CreateBotOutboundWebhook”Creates an endpoint and returns its signing secret once. Requires bot ownership or bot.manage.
POST /api/connect/chatto.api.v1.BotService/CreateBotOutboundWebhookInput: CreateBotOutboundWebhookRequest
Section titled “Input: CreateBotOutboundWebhookRequest”Create an independent endpoint with its own signing secret.
| Field | Type | Description |
|---|---|---|
bot_user_id | string | Required managed bot ID. |
url | string | Absolute HTTPS destination; HTTP is also allowed for localhost names. |
authorization | string | Optional complete Authorization header value. |
enabled | bool | False creates a paused endpoint. |
name | string | Display name, fixed after creation. |
Result: CreateBotOutboundWebhookResponse
Section titled “Result: CreateBotOutboundWebhookResponse”New endpoint and its show-once request verification secret.
| Field | Type | Description |
|---|---|---|
webhook | BotOutboundWebhook | Endpoint metadata without Authorization or signing credentials. |
signing_secret | string | Returned only at creation. Configure the receiver with this HMAC secret if it verifies requests. |
UpdateBotOutboundWebhook
Section titled “UpdateBotOutboundWebhook”Edits delivery settings or pauses/resumes delivery. Requires ownership or bot.manage.
POST /api/connect/chatto.api.v1.BotService/UpdateBotOutboundWebhookInput: UpdateBotOutboundWebhookRequest
Section titled “Input: UpdateBotOutboundWebhookRequest”Patch delivery settings or pause/resume one endpoint. update_mask selects fields to apply or reset. Name and signing secret stay fixed.
| Field | Type | Description |
|---|---|---|
bot_user_id | string | Required managed bot ID. |
webhook_id | string | Required endpoint ID within this bot. |
enabled | optional bool | Selected enabled state. False pauses delivery; resume accepts only new messages. |
url | optional string | Selected new destination. Changing settings cancels queued retries. |
authorization | optional string | Selected Authorization header. Absent or empty removes it. Never returned. |
update_mask | google.protobuf.FieldMask | Editable 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. |
Result: UpdateBotOutboundWebhookResponse
Section titled “Result: UpdateBotOutboundWebhookResponse”Endpoint state after the update.
| Field | Type | Description |
|---|---|---|
webhook | BotOutboundWebhook | Endpoint metadata without Authorization or signing credentials. |
RevokeBotOutboundWebhook
Section titled “RevokeBotOutboundWebhook”Permanently revokes an endpoint. Requires ownership or bot.manage.
POST /api/connect/chatto.api.v1.BotService/RevokeBotOutboundWebhookInput: RevokeBotOutboundWebhookRequest
Section titled “Input: RevokeBotOutboundWebhookRequest”Revoke one endpoint and cancel its queued retries. In-flight HTTP may finish.
| Field | Type | Description |
|---|---|---|
bot_user_id | string | Required managed bot ID. |
webhook_id | string | Required endpoint ID within this bot. |
Result: RevokeBotOutboundWebhookResponse
Section titled “Result: RevokeBotOutboundWebhookResponse”Revocation completed, or this endpoint was already absent.
ListBots
Section titled “ListBots”Lists bots visible to the authenticated caller.
POST /api/connect/chatto.api.v1.BotService/ListBotsInput: ListBotsRequest
Section titled “Input: ListBotsRequest”Request bots visible to the caller. Owners see their own bots. Callers with bot.manage or user.manage-accounts see every bot.
| Field | Type | Description |
|---|---|---|
search | string | Optional case-insensitive login or display-name search. |
page | PageRequest | Defaults to 20 results when absent or limit is zero. Maximum: 100. |
Result: ListBotsResponse
Section titled “Result: ListBotsResponse”Page of visible bots.
| Field | Type | Description |
|---|---|---|
bots | repeated Bot | Visible bots by case-insensitive login, then user ID, in ascending order. |
page | PageInfo | Page metadata. |
GetBot
Section titled “GetBot”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/GetBotInput: GetBotRequest
Section titled “Input: GetBotRequest”Request one bot by stable user ID.
| Field | Type | Description |
|---|---|---|
bot_user_id | string | Required bot user ID. |
Result: GetBotResponse
Section titled “Result: GetBotResponse”Response containing one bot.
| Field | Type | Description |
|---|---|---|
bot | Bot | Requested bot. |
BatchGetBots
Section titled “BatchGetBots”Gets several visible bots. Missing and inaccessible bots are omitted.
POST /api/connect/chatto.api.v1.BotService/BatchGetBotsInput: BatchGetBotsRequest
Section titled “Input: BatchGetBotsRequest”Request several bots by stable user ID.
| Field | Type | Description |
|---|---|---|
bot_user_ids | repeated string | Required bot user IDs. Missing or inaccessible bots are omitted. |
Result: BatchGetBotsResponse
Section titled “Result: BatchGetBotsResponse”Response containing accessible bots in first-seen request order.
| Field | Type | Description |
|---|---|---|
bots | repeated Bot | Found bots. |
CreateBot
Section titled “CreateBot”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/CreateBotInput: CreateBotRequest
Section titled “Input: CreateBotRequest”Request creation of a bot owned by the human caller or a bot caller’s human owner.
| Field | Type | Description |
|---|---|---|
login | string | Bot login. Uses the same username rules as a human account. |
display_name | string | Public display name. |
api_key_name | optional string | Optional name for the initial API key. Defaults to “Default key”. |
Result: CreateBotResponse
Section titled “Result: CreateBotResponse”Result of creating a bot. api_key is shown once and cannot be retrieved.
| Field | Type | Description |
|---|---|---|
bot | Bot | Created bot. |
api_key | string | Newly issued API key. |
api_key_metadata | BotApiKey | Safe metadata for the newly issued API key. |
DeleteBot
Section titled “DeleteBot”Deletes a bot and invalidates all of its API keys.
POST /api/connect/chatto.api.v1.BotService/DeleteBotInput: DeleteBotRequest
Section titled “Input: DeleteBotRequest”Request deletion of a bot account.
| Field | Type | Description |
|---|---|---|
bot_user_id | string | Required bot user ID. |
Result: DeleteBotResponse
Section titled “Result: DeleteBotResponse”Result of deleting a bot account.
| Field | Type | Description |
|---|---|---|
deleted | bool | True when the bot was deleted. |
CreateBotApiKey
Section titled “CreateBotApiKey”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/CreateBotApiKeyInput: CreateBotApiKeyRequest
Section titled “Input: CreateBotApiKeyRequest”Request creation of one named API key for a bot.
| Field | Type | Description |
|---|---|---|
bot_user_id | string | Required bot user ID. |
name | string | Required manager-defined name. Names do not need to be unique. |
Result: CreateBotApiKeyResponse
Section titled “Result: CreateBotApiKeyResponse”Result of creating one API key. api_key is shown once and cannot be retrieved later.
| Field | Type | Description |
|---|---|---|
bot | Bot | Updated bot metadata. |
api_key | string | Newly issued API key. |
api_key_metadata | BotApiKey | Safe metadata for the newly issued API key. |
RevokeBotApiKey
Section titled “RevokeBotApiKey”Revokes one API key without changing other active keys.
POST /api/connect/chatto.api.v1.BotService/RevokeBotApiKeyInput: RevokeBotApiKeyRequest
Section titled “Input: RevokeBotApiKeyRequest”Request irreversible revocation of one bot API key.
| Field | Type | Description |
|---|---|---|
bot_user_id | string | Required bot user ID. |
key_id | string | Required API-key credential ID. |
Result: RevokeBotApiKeyResponse
Section titled “Result: RevokeBotApiKeyResponse”Result of revoking one bot API key.
| Field | Type | Description |
|---|---|---|
bot | Bot | Updated bot metadata. |
CreateBotIncomingWebhook
Section titled “CreateBotIncomingWebhook”Creates a named incoming webhook. A bot can have at most 20 active incoming webhooks.
POST /api/connect/chatto.api.v1.BotService/CreateBotIncomingWebhookInput: CreateBotIncomingWebhookRequest
Section titled “Input: CreateBotIncomingWebhookRequest”Request creation of one named incoming webhook for a bot.
| Field | Type | Description |
|---|---|---|
bot_user_id | string | Required bot user ID. |
name | string | Required manager-defined name. Names do not need to be unique. |
Result: CreateBotIncomingWebhookResponse
Section titled “Result: CreateBotIncomingWebhookResponse”Result of creating an incoming webhook. webhook_url is shown once and cannot be retrieved later.
| Field | Type | Description |
|---|---|---|
bot | Bot | Updated bot metadata. |
webhook_url | string | Newly issued incoming webhook URL. |
RevokeBotIncomingWebhook
Section titled “RevokeBotIncomingWebhook”Revokes one incoming webhook without changing other webhooks.
POST /api/connect/chatto.api.v1.BotService/RevokeBotIncomingWebhookInput: RevokeBotIncomingWebhookRequest
Section titled “Input: RevokeBotIncomingWebhookRequest”Request irreversible revocation of one incoming webhook credential.
| Field | Type | Description |
|---|---|---|
bot_user_id | string | Required bot user ID. |
webhook_id | string | Required webhook credential ID. |
Result: RevokeBotIncomingWebhookResponse
Section titled “Result: RevokeBotIncomingWebhookResponse”Result of revoking an incoming webhook.
| Field | Type | Description |
|---|---|---|
bot | Bot | Updated bot metadata. |
ReassignBotOwner
Section titled “ReassignBotOwner”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/ReassignBotOwnerInput: ReassignBotOwnerRequest
Section titled “Input: ReassignBotOwnerRequest”Request an administrative reassignment of a bot to another human owner.
| Field | Type | Description |
|---|---|---|
bot_user_id | string | Required bot user ID. |
owner_user_id | string | Required user ID of the new human owner. |
Result: ReassignBotOwnerResponse
Section titled “Result: ReassignBotOwnerResponse”Result of reassigning a bot owner. The bot’s API keys and configured permission allowlist are unchanged.
| Field | Type | Description |
|---|---|---|
bot | Bot | Reassigned bot. |