AI Agent Topic
  • 18 Sep 2025
  • 4 Minutes to read
  • Dark
    Light

AI Agent Topic

  • Dark
    Light

Article summary

Topic

Topic JSON Format

Topic is represented as simple flat JSON objects with the following keys:

NameTypeDescription
idguidId of the topic.
aiAgentIdguidId of the AI agent.
namestringName of the topic.
descriptionstringDescription of the topic.
topicCategoryIdguidId of the topic category.
questionsTopic Question ArrayQuestions for the topic.
answerTopic AnswerAnswer for the topic.

Topic Question JSON Format

NameTypeDescription
idguidId of the question.
topicIdguidId of the topic.
questionstringQuestion text.

Topic Answer JSON Format

NameTypeDescription
topicIdguidId of the topic.
typeenumAllowed values are workflow, naturalLanguage.
instructionsstringInstructions for the answer.
workflowobjectChatbot response workflow.
functionIds[guid] ArrayFunctionIds used in the answer.
functionsFunction ArrayFunctions used in the answer.

Get the list of Topics

GET aiagent/topics

Parameters:

NameTypeinRequiredDescription
siteIdintegerqueryyesSite Id.
aiAgentIdguidqueryyesID of the AI agent to filter topics by.
topicCategoryIdguidquerynoID of the AI agent Topic Category.
keywordsstringquerynoSearch topics containing these keywords in name or description.
includestringquerynoAllowed values are questions, answer. Includes related data in response.
pageSizeintegerquerynoNumber of topics to return per page.
pageIndexintegerquerynoPage number to retrieve. Default is 1.

Response:

An array of Topic

Example

Sample Request:

curl https://api11.comm100.io/aiagent/topics?siteId=10000&aiAgentId=ec9f351e-d7d7-45fc-81aa-2fdd9e706f17 \ 
    -X GET \ 
    -H 'Authorization: Bearer {access_token}'

Response:
HTTP/1.1 200 OK

[
    {
        "id": "eace93f3-ce47-4e01-a4cb-08dd5aebc1c0",
        "aiAgentId": "ec9f351e-d7d7-45fc-81aa-2fdd9e706f17",
        "topicCategoryId": "b0f0f202-b8ee-41d8-ae9b-c5ce2946218c",
        "name": "sayhi",
        "description": "'sayhi' is about the importance of greetings in social interactions. It helps users understand how to effectively initiate conversations, build rapport, and foster connections with others."
    }
]

Get a single Topic

GET aiagent/topics/{id}

Parameters:

NameTypeinRequiredDescription
siteIdintegerqueryyesSite Id.
idguidpathyesID of the topic to retrieve.
includestringquerynoAllowed values are questions, answer. Includes related data in response.

Response:

Topic

Example

Sample Request:

curl https://api11.comm100.io/aiagent/topics/eace93f3-ce47-4e01-a4cb-08dd5aebc1c0?siteId=10000 \ 
    -X GET \ 
    -H 'Authorization: Bearer {access_token}'

Response:
HTTP/1.1 200 OK

{
    "id": "eace93f3-ce47-4e01-a4cb-08dd5aebc1c0",
    "aiAgentId": "ec9f351e-d7d7-45fc-81aa-2fdd9e706f17",
    "topicCategoryId": "b0f0f202-b8ee-41d8-ae9b-c5ce2946218c",
    "name": "sayhi",
    "description": "'sayhi' is about the importance of greetings in social interactions. It helps users understand how to effectively initiate conversations, build rapport, and foster connections with others.",
    "questions": [
        {
            "id": "702632ff-0f37-46dd-1c0d-08dd5aebc1c1",
            "topicId": "eace93f3-ce47-4e01-a4cb-08dd5aebc1c0",
            "question": "hi"
        },
        {
            "id": "3e89aecb-430a-4d0d-1c0e-08dd5aebc1c1",
            "topicId": "eace93f3-ce47-4e01-a4cb-08dd5aebc1c0",
            "question": "Hello!"
        },
        {
            "id": "00f6e4ec-f090-4d32-1c0f-08dd5aebc1c1",
            "topicId": "eace93f3-ce47-4e01-a4cb-08dd5aebc1c0",
            "question": "Hi there!"
        },
        {
            "id": "49e45be1-dabb-47e2-1c10-08dd5aebc1c1",
            "topicId": "eace93f3-ce47-4e01-a4cb-08dd5aebc1c0",
            "question": "Greetings!"
        },
        {
            "id": "45819e9a-c279-4328-1c11-08dd5aebc1c1",
            "topicId": "eace93f3-ce47-4e01-a4cb-08dd5aebc1c0",
            "question": "Hey!"
        }
    ]
}

Create a new Topic

POST aiagent/topics

Parameters:

NameTypeinRequiredDescription
siteIdintegerqueryyesSite Id.
aiAgentIdguidbodyyesID of the AI agent to which this topic belongs.
topicCategoryIdguidbodyyesID of the AI agent topic category.
namestringbodyyesUnique in an AI agent.
questionstringbodynoInitial question text for the topic. Will Generate similar questions according to this qusetion text.

Response:

Topic

Example

Sample Request:

curl https://api11.comm100.io/aiagent/topics?siteId=10000 \ 
    -X POST \
    -H 'Authorization: Bearer {access_token}' \
    -H 'Content-Type: application/json' \
    -D '{"name":"sayhi","question":"hi","siteId":10000,"aiAgentId":"ec9f351e-d7d7-45fc-81aa-2fdd9e706f17","topicCategoryId": "b0f0f202-b8ee-41d8-ae9b-c5ce2946218c"}'

Response:
HTTP/1.1 201 OK

{
    "id": "eace93f3-ce47-4e01-a4cb-08dd5aebc1c0",
    "aiAgentId": "ec9f351e-d7d7-45fc-81aa-2fdd9e706f17",
    "topicCategoryId": "b0f0f202-b8ee-41d8-ae9b-c5ce2946218c",
    "name": "sayhi",
    "description": "'sayhi' is about the importance of greetings in social interactions. It helps users understand how to effectively initiate conversations, build rapport, and foster connections with others.",
    "questions": [
        {
            "id": "702632ff-0f37-46dd-1c0d-08dd5aebc1c1",
            "topicId": "eace93f3-ce47-4e01-a4cb-08dd5aebc1c0",
            "question": "hi"
        },
        {
            "id": "3e89aecb-430a-4d0d-1c0e-08dd5aebc1c1",
            "topicId": "eace93f3-ce47-4e01-a4cb-08dd5aebc1c0",
            "question": "Hello!"
        },
        {
            "id": "00f6e4ec-f090-4d32-1c0f-08dd5aebc1c1",
            "topicId": "eace93f3-ce47-4e01-a4cb-08dd5aebc1c0",
            "question": "Hi there!"
        },
        {
            "id": "49e45be1-dabb-47e2-1c10-08dd5aebc1c1",
            "topicId": "eace93f3-ce47-4e01-a4cb-08dd5aebc1c0",
            "question": "Greetings!"
        },
        {
            "id": "45819e9a-c279-4328-1c11-08dd5aebc1c1",
            "topicId": "eace93f3-ce47-4e01-a4cb-08dd5aebc1c0",
            "question": "Hey!"
        }
    ]
}

Update the Topic

PUT aiagent/topics/{id}

Parameters:

NameTypeinRequiredDescription
siteIdintegerqueryyesSite Id.
idguidpathyesID of the topic to update.
topicCategoryIdguidbodynoUpdated topic Category Id.
namestringbodynoUpdated name for the topic. Must be unique within the AI agent.
descriptionstringbodynoUpdated description of the topic.
questionsTopic Question ArraybodynoUpdated list of questions for the topic.
answerTopic AnswerbodynoUpdated answer configuration for the topic.

Response:

Topic

Example

Sample Request:

curl https://api11.comm100.io/aiagent/topics/eace93f3-ce47-4e01-a4cb-08dd5aebc1c0?siteId=10000 \ 
    -X PUT \
    -H 'Authorization Bearer {access_token}' \
    -H 'Content-Type: application/json' \
    -D '{"description":"Updated description of the topic."}'

Response:
HTTP/1.1 200 OK

{
    "id": "eace93f3-ce47-4e01-a4cb-08dd5aebc1c0",
    "aiAgentId": "ec9f351e-d7d7-45fc-81aa-2fdd9e706f17",
    "topicCategoryId": "b0f0f202-b8ee-41d8-ae9b-c5ce2946218c",
    "name": "sayhi",
    "description": "Updated description of the topic."
}

Delete the Topic

DELETE aiagent/topics/{id}

Parameters:

NameTypeinRequiredDescription
siteIdintegerqueryyesSite Id.
idguidpathyesID of the topic to delete.

Response:

No Content

Example

Sample Request:

curl https://api11.comm100.io/aiagent/topics/eace93f3-ce47-4e01-a4cb-08dd5aebc1c0?siteId=10000 \ 
    -X DELETE \
    -H 'Authorization Bearer {access_token}'

Response:

HTTP/1.1 204 No Content


Was this article helpful?