Bots

class matterapi.endpoints.async_api.BotsApi(client: matterapi.client.base.BaseClient, skip_response_parsing: bool = False)

Endpoints for creating, getting and updating bot users.

async assign_bot(bot_user_id: str, user_id: str) matterapi.models.Bot

Assign a bot to a user

Assign a bot to a specified user.

Permissions:

Must have manage_bots permission.

Minimum Server Version:

5.10

Api Reference:

AssignBot

async convert_bot_to_user(bot_user_id: str, *, json_body: Union[matterapi.models.ConvertBotToUserJsonBody, Dict], set_system_admin: Optional[bool] = False) matterapi.models.StatusOK

Convert a bot into a user

Convert a bot into a user.

Permissions:

Must have manage_system permission.

Minimum Server Version:

5.26

Api Reference:

ConvertBotToUser

async convert_user_to_bot(user_id: str) matterapi.models.StatusOK

Convert a user into a bot

Convert a user into a bot.

Permissions:

Must have manage_system permission.

Minimum Server Version:

5.26

Api Reference:

ConvertUserToBot

async create_bot(*, json_body: Union[matterapi.models.CreateBotJsonBody, Dict]) matterapi.models.Bot

Create a bot

Create a new bot account on the system. Username is required.

Permissions:

Must have create_bot permission.

Minimum Server Version:

5.10

Api Reference:

CreateBot

async delete_bot_icon_image(bot_user_id: str) matterapi.models.StatusOK

Delete bot’s LHS icon image

Delete bot’s LHS icon image based on bot_user_id string parameter.

Permissions:

Must have manage_bots permission.

Minimum Server Version:

5.14

Api Reference:

DeleteBotIconImage

async disable_bot(bot_user_id: str) matterapi.models.Bot

Disable a bot

Disable a bot.

Permissions:

Must have manage_bots permission.

Minimum Server Version:

5.10

Api Reference:

DisableBot

async enable_bot(bot_user_id: str) matterapi.models.Bot

Enable a bot

Enable a bot.

Permissions:

Must have manage_bots permission.

Minimum Server Version:

5.10

Api Reference:

EnableBot

async get_bot(bot_user_id: str, *, include_deleted: Optional[bool] = None) matterapi.models.Bot

Get a bot

Get a bot specified by its bot id.

Permissions:

Must have read_bots permission for bots you are managing, and read_others_bots permission for bots others are managing.

Minimum Server Version:

5.10

Api Reference:

GetBot

async get_bot_icon_image(bot_user_id: str) None

Get bot’s LHS icon

Get a bot’s LHS icon image based on bot_user_id string parameter.

Permissions:

Must be logged in.

Minimum Server Version:

5.14

Api Reference:

GetBotIconImage

async get_bots(*, page: Optional[int] = 0, per_page: Optional[int] = 60, include_deleted: Optional[bool] = None, only_orphaned: Optional[bool] = None) List[matterapi.models.Bot]

Get bots

Get a page of a list of bots.

Permissions:

Must have read_bots permission for bots you are managing, and read_others_bots permission for bots others are managing.

Minimum Server Version:

5.10

Api Reference:

GetBots

async patch_bot(bot_user_id: str, *, json_body: Union[matterapi.models.PatchBotJsonBody, Dict]) matterapi.models.Bot

Patch a bot

Partially update a bot by providing only the fields you want to update. Omitted fields will not be updated. The fields that can be updated are defined in the request body, all other provided fields will be ignored.

Permissions:

Must have manage_bots permission.

Minimum Server Version:

5.10

Api Reference:

PatchBot

async set_bot_icon_image(bot_user_id: str, *, multipart_data: Union[matterapi.models.SetBotIconImageMultipartData, Dict]) matterapi.models.StatusOK

Set bot’s LHS icon image

Set a bot’s LHS icon image based on bot_user_id string parameter. Icon image must be SVG format, all other formats are rejected.

Permissions:

Must have manage_bots permission.

Minimum Server Version:

5.14

Api Reference:

SetBotIconImage