--- title: "Task Bot" slug: "server-api-bot-task-bot" updated: 2022-06-16T07:03:32Z published: 2022-06-16T07:03:32Z canonical: "developer.comm100.com/server-api-bot-task-bot" --- > ## Documentation Index > Fetch the complete documentation index at: https://developer.comm100.com/llms.txt > Use this file to discover all available pages before exploring further. # Task Bot ## Task Bot - `Taskbots` - Taskbots Manage - `GET bot/taskbots` - [Get the list of Taskbots](/docs/server-api-bot-task-bot#get-the-list-of-taskbots) - `GET bot/taskbots/{id}` - [Get a single Task Bot](/docs/server-api-bot-task-bot#get-a-single-task-bot) - `POST bot/taskbots` - [Create a new Task Bot](/docs/server-api-bot-task-bot#create-a-new-task-bot) - `PUT bot/taskbots/{id}` - [Update the Task Bot](/docs/server-api-bot-task-bot#update-the-task-bot) - `DELETE bot/taskbots/{id}` - [Remove the Task Bot](/docs/server-api-bot-task-bot#remove-the-task-bot) ### Task Bot JSON Format Task Bot is represented as simple flat JSON objects with the following keys: | Name | Type | Description | | --- | --- | --- | | `latestVersionId` | guid | Id of the latest taskbot version. | | `id` | guid | Id of the taskbot. | | `name` | string | Name of the chatbot. | | `ifCustomizeAvatar` | bool | Whether avatar of bot is customize or not. | | `customizeAvatar` | image | URL of the customize avatar. | | `systemAvatarId` | guid | Id of system avatar. | | `avatar` | string | | ### Get the list of Taskbots `GET bot/taskbots` - #### Parameters: No Parameters - #### Response: An array of [Task Bot](/docs/server-api-bot-task-bot#task-bot-json-format) - #### Example Sample Request: ``` curl https://api11.comm100.io/v4/bot/taskbots \ -X 'GET' \ -H 'Authorization: Bearer {access_token}' \ ``` Response: HTTP/1.1 200 OK ``` [ { "latestVersionId": "5842fc45-3154-42da-b657-5a489c96d8b5", "id": "c44fada7-961b-42fd-abac-d080355f6ed6", "name": "chatbot", "ifCustomizeAvatar": false, "customizeAvatar": "", "systemAvatarId": "00000000-0000-0000-0000-000000000001", "avatar": "https://api11.comm100.io/v4/Bot/taskbots/c44fada7-961b-42fd-abac-d080355f6ed6/avatar" } ] ``` ### Get a single Task Bot `GET bot/taskbots/{id}` - #### Parameters: No Parameters - #### Response: [Task Bot](/docs/server-api-bot-task-bot#task-bot-json-format) - #### Example Sample Request: ``` curl https://api11.comm100.io/v4/bot/taskbots/c44fada7-961b-42fd-abac-d080355f6ed6 \ -X 'GET' \ -H 'Authorization: Bearer {access_token}' \ ``` Response: HTTP/1.1 200 OK ``` { "latestVersionId": "5842fc45-3154-42da-b657-5a489c96d8b5", "id": "c44fada7-961b-42fd-abac-d080355f6ed6", "name": "chatbot", "ifCustomizeAvatar": false, "customizeAvatar": "", "systemAvatarId": "00000000-0000-0000-0000-000000000001", "avatar": "https://api11.comm100.io/v4/Bot/taskbots/c44fada7-961b-42fd-abac-d080355f6ed6/avatar" } ``` ### Create a new Task Bot `POST bot/taskbots` - #### Parameters: | Name | Type | in | Required | Description | | --- | --- | --- | --- | --- | | `latestVersionId` | guid | body | no | Id of the latest taskbot version. | | `name` | string | body | yes | Name of the chatbot. | | `ifCustomizeAvatar` | bool | body | no | Whether avatar of bot is customize or not. | | `customizeAvatar` | image | body | no | URL of the customize avatar. | | `systemAvatarId` | guid | body | no | Id of system avatar. | | `avatar` | string | body | no | | - #### Response: [Task Bot](/docs/server-api-bot-task-bot#task-bot-json-format) - #### Example Sample Request: ``` curl https://api11.comm100.io/v4/bot/taskbots \ -X 'POST' \ -H 'Authorization: Bearer {access_token}' \ -H 'Content-Type: application/json' \ -D '{"latestVersionId":"5842fc45-3154-42da-b657-5a489c96d8b5","name":"chatbot","ifCustomizeAvatar":false,"customizeAvatar":"","systemAvatarId":"00000000-0000-0000-0000-000000000001"}' ``` Response: HTTP/1.1 201 Created ``` { "latestVersionId": "5842fc45-3154-42da-b657-5a489c96d8b5", "id": "c44fada7-961b-42fd-abac-d080355f6ed6", "name": "chatbot", "ifCustomizeAvatar": false, "customizeAvatar": "", "systemAvatarId": "00000000-0000-0000-0000-000000000001", "avatar": "https://api11.comm100.io/v4/Bot/taskbots/c44fada7-961b-42fd-abac-d080355f6ed6/avatar" } ``` ### Update the Task Bot `PUT bot/taskbots/{id}` - #### Parameters: | Name | Type | in | Required | Description | | --- | --- | --- | --- | --- | | `latestVersionId` | guid | body | no | Id of the latest taskbot version. | | `name` | string | body | yes | Name of the chatbot. | | `ifCustomizeAvatar` | bool | body | no | Whether avatar of bot is customize or not. | | `customizeAvatar` | image | body | no | URL of the customize avatar. | | `systemAvatarId` | guid | body | no | Id of system avatar. | | `avatar` | string | body | no | | - #### Response: [Task Bot](/docs/server-api-bot-task-bot#task-bot-json-format) - #### Example Sample Request: ``` curl https://api11.comm100.io/v4/bot/taskbots/c44fada7-961b-42fd-abac-d080355f6ed6 \ -X 'PUT' \ -H 'Authorization: Bearer {access_token}' \ -H 'Content-Type: application/json' \ -D '{"latestVersionId":"5842fc45-3154-42da-b657-5a489c96d8b5","name":"chatbot","ifCustomizeAvatar":false,"customizeAvatar":"","systemAvatarId":"00000000-0000-0000-0000-000000000001"}' ``` Response: HTTP/1.1 200 OK ``` { "latestVersionId": "5842fc45-3154-42da-b657-5a489c96d8b5", "id": "c44fada7-961b-42fd-abac-d080355f6ed6", "name": "chatbot", "ifCustomizeAvatar": false, "customizeAvatar": "", "systemAvatarId": "00000000-0000-0000-0000-000000000001", "avatar": "https://api11.comm100.io/v4/Bot/taskbots/c44fada7-961b-42fd-abac-d080355f6ed6/avatar" } ``` ### Remove the Task Bot `DELETE bot/taskbots/{id}` - #### Parameters: No Parameters - #### Response: No Content - #### Example Sample Request: ``` curl https://api11.comm100.io/v4/bot/taskbots/c44fada7-961b-42fd-abac-d080355f6ed6 \ -X 'DELETE' \ -H 'Authorization: Bearer {access_token}' \ ``` Response: HTTP/1.1 204 No Content