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.
Summary
Functions
Gets several visible bots. Missing and inaccessible bots are omitted.
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.
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.
Creates a named incoming webhook. A bot can have at most 20 active incoming webhooks.
Creates an endpoint and returns its signing secret once. Requires bot ownership or bot.manage.
Deletes a bot and invalidates all of its API keys.
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.
Gets one endpoint. Requires bot ownership or bot.manage. Missing endpoints return NOT_FOUND.
Lists all endpoints, including paused endpoints. Requires bot ownership or bot.manage. Returns the complete bounded collection, so callers do not need batch hydration.
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.
Lists bots visible to the authenticated caller.
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.
Revokes one API key without changing other active keys.
Revokes one incoming webhook without changing other webhooks.
Permanently revokes an endpoint. Requires ownership or bot.manage.
Edits delivery settings or pauses/resumes delivery. Requires ownership or bot.manage.
Functions
@spec batch_get_bots(Req.Request.t(), Chatto.Api.V1.BatchGetBotsRequest.t()) :: {:ok, Chatto.Api.V1.BatchGetBotsResponse.t()} | {:error, Chatto.Connect.Error.t()}
Gets several visible bots. Missing and inaccessible bots are omitted.
@spec create_bot(Req.Request.t(), Chatto.Api.V1.CreateBotRequest.t()) :: {:ok, Chatto.Api.V1.CreateBotResponse.t()} | {:error, Chatto.Connect.Error.t()}
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.
@spec create_bot_api_key(Req.Request.t(), Chatto.Api.V1.CreateBotApiKeyRequest.t()) :: {:ok, Chatto.Api.V1.CreateBotApiKeyResponse.t()} | {:error, Chatto.Connect.Error.t()}
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.
@spec create_bot_incoming_webhook( Req.Request.t(), Chatto.Api.V1.CreateBotIncomingWebhookRequest.t() ) :: {:ok, Chatto.Api.V1.CreateBotIncomingWebhookResponse.t()} | {:error, Chatto.Connect.Error.t()}
Creates a named incoming webhook. A bot can have at most 20 active incoming webhooks.
@spec create_bot_outbound_webhook( Req.Request.t(), Chatto.Api.V1.CreateBotOutboundWebhookRequest.t() ) :: {:ok, Chatto.Api.V1.CreateBotOutboundWebhookResponse.t()} | {:error, Chatto.Connect.Error.t()}
Creates an endpoint and returns its signing secret once. Requires bot ownership or bot.manage.
@spec delete_bot(Req.Request.t(), Chatto.Api.V1.DeleteBotRequest.t()) :: {:ok, Chatto.Api.V1.DeleteBotResponse.t()} | {:error, Chatto.Connect.Error.t()}
Deletes a bot and invalidates all of its API keys.
@spec get_bot(Req.Request.t(), Chatto.Api.V1.GetBotRequest.t()) :: {:ok, Chatto.Api.V1.GetBotResponse.t()} | {:error, Chatto.Connect.Error.t()}
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.
@spec get_bot_outbound_webhook( Req.Request.t(), Chatto.Api.V1.GetBotOutboundWebhookRequest.t() ) :: {:ok, Chatto.Api.V1.GetBotOutboundWebhookResponse.t()} | {:error, Chatto.Connect.Error.t()}
Gets one endpoint. Requires bot ownership or bot.manage. Missing endpoints return NOT_FOUND.
@spec list_bot_outbound_webhooks( Req.Request.t(), Chatto.Api.V1.ListBotOutboundWebhooksRequest.t() ) :: {:ok, Chatto.Api.V1.ListBotOutboundWebhooksResponse.t()} | {:error, Chatto.Connect.Error.t()}
Lists all endpoints, including paused endpoints. Requires bot ownership or bot.manage. Returns the complete bounded collection, so callers do not need batch hydration.
@spec list_bot_webhook_failures( Req.Request.t(), Chatto.Api.V1.ListBotWebhookFailuresRequest.t() ) :: {:ok, Chatto.Api.V1.ListBotWebhookFailuresResponse.t()} | {:error, Chatto.Connect.Error.t()}
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.
@spec list_bots(Req.Request.t(), Chatto.Api.V1.ListBotsRequest.t()) :: {:ok, Chatto.Api.V1.ListBotsResponse.t()} | {:error, Chatto.Connect.Error.t()}
Lists bots visible to the authenticated caller.
@spec reassign_bot_owner(Req.Request.t(), Chatto.Api.V1.ReassignBotOwnerRequest.t()) :: {:ok, Chatto.Api.V1.ReassignBotOwnerResponse.t()} | {:error, Chatto.Connect.Error.t()}
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.
@spec revoke_bot_api_key(Req.Request.t(), Chatto.Api.V1.RevokeBotApiKeyRequest.t()) :: {:ok, Chatto.Api.V1.RevokeBotApiKeyResponse.t()} | {:error, Chatto.Connect.Error.t()}
Revokes one API key without changing other active keys.
@spec revoke_bot_incoming_webhook( Req.Request.t(), Chatto.Api.V1.RevokeBotIncomingWebhookRequest.t() ) :: {:ok, Chatto.Api.V1.RevokeBotIncomingWebhookResponse.t()} | {:error, Chatto.Connect.Error.t()}
Revokes one incoming webhook without changing other webhooks.
@spec revoke_bot_outbound_webhook( Req.Request.t(), Chatto.Api.V1.RevokeBotOutboundWebhookRequest.t() ) :: {:ok, Chatto.Api.V1.RevokeBotOutboundWebhookResponse.t()} | {:error, Chatto.Connect.Error.t()}
Permanently revokes an endpoint. Requires ownership or bot.manage.
@spec update_bot_outbound_webhook( Req.Request.t(), Chatto.Api.V1.UpdateBotOutboundWebhookRequest.t() ) :: {:ok, Chatto.Api.V1.UpdateBotOutboundWebhookResponse.t()} | {:error, Chatto.Connect.Error.t()}
Edits delivery settings or pauses/resumes delivery. Requires ownership or bot.manage.