AI Agent Event
  • 18 Sep 2025
  • 3 Minutes to read
  • Dark
    Light

AI Agent Event

  • Dark
    Light

Article summary

Event

Event JSON Format

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

NameTypeDescription
aiAgentIdguidId of the AI agent.
typeenumAllowed values are workflow, naturalLanguage.
workflowobjectChatbot response workflow.
instructionsstringInstructions for the event.
functionIdsguid arrayArray of function IDs used in this event.
functionsFunction ArrayArray of functions used in this event.

Get Starting Chat Event

GET aiagent/aiAgents/{aiAgentId}/eventWhenStartingAChat

Parameters:

NameTypeinRequiredDescription
siteIdintegerqueryyesSite Id.
aiAgentIdguidpathyesId of the AI agent.

Response:

Event

Example

Sample Request:

curl https://api11.comm100.io/aiagent/aiAgents/e8397b4f-63fa-4d43-9967-99f390f93d98/eventWhenStartingAChat?siteId=10000 \ 
    -X GET \ 
    -H 'Authorization: Bearer {access_token}'

Response:
HTTP/1.1 200 OK

{
    "aiAgentId": "e8397b4f-63fa-4d43-9967-99f390f93d98",
    "type": "workflow",
    "workflow": {
        "id": "093c4061-67f7-45f8-8849-27fab8007ec4",
        "chatbotActions": [
            {
                "id": "4fd6679c-e94b-4337-a976-5c7bb70e6d6e",
                "type": "chatbotActionSendMessage",
                "xPosition": 150,
                "yPosition": 50,
                "chatbotResponseId": "093c4061-67f7-45f8-8849-27fab8007ec4",
                "chatbotActionSendMessage": {
                    "chatbotActionId": "4fd6679c-e94b-4337-a976-5c7bb70e6d6e",
                    "nextActionId": "00000000-0000-0000-0000-000000000000",
                    "typingDelay": 1.00,
                    "message": "Hi there! I'm AI agent, here to help answer your questions.",
                    "chatbotActionSendMessageLinks": []
                }
            },
            {
                "id": "fcafba38-e35d-418f-a235-fe81506bcc09",
                "type": "chatbotActionStart",
                "xPosition": 24,
                "yPosition": 50,
                "chatbotResponseId": "093c4061-67f7-45f8-8849-27fab8007ec4",
                "chatbotActionStart": {
                    "chatbotActionId": "fcafba38-e35d-418f-a235-fe81506bcc09",
                    "nextActionId": "4fd6679c-e94b-4337-a976-5c7bb70e6d6e"
                }
            }
        ]
    },
    "instructions": "",
    "functionIds": []
}

Get No Answer Event

GET aiagent/aiAgents/{aiAgentId}/eventWhenNoAnswer

Parameters:

NameTypeinRequiredDescription
siteIdintegerqueryyesSite Id.
aiAgentIdguidpathyesId of the AI agent.

Response:

Event

Example

Sample Request:

curl https://api11.comm100.io/aiagent/aiAgents/e8397b4f-63fa-4d43-9967-99f390f93d98/eventWhenNoAnswer?siteId=10000 \ 
    -X GET \ 
    -H 'Authorization: Bearer {access_token}'

Response:
HTTP/1.1 200 OK

{
    "aiAgentId": "e8397b4f-63fa-4d43-9967-99f390f93d98",
    "type": "workflow",
    "workflow": {
        "id": "093c4061-67f7-45f8-8849-27fab8007ec4",
        "chatbotActions": []
    },
    "instructions": "",
    "functionIds": [],
    "functions": []
}

Get Finishing Answer Event

GET aiagent/aiAgents/{aiAgentId}/eventWhenFinishingAnAnswer

Parameters:

NameTypeinRequiredDescription
siteIdintegerqueryyesSite Id.
aiAgentIdguidpathyesId of the AI agent.

Response:

Event

Example

Sample Request:

curl https://api11.comm100.io/aiagent/aiAgents/3f6a7b71-00ba-491f-8e74-ce0ca169b02e/eventWhenFinishingAnAnswer?siteId=10000 \ 
    -X GET \ 
    -H 'Authorization: Bearer {access_token}

Response:

HTTP/1.1 200 OK

{
    "aiAgentId": "3f6a7b71-00ba-491f-8e74-ce0ca169b02e",
    "type": "workflow",
    "workflow": {
        "id": "3a5db478-f1ed-446d-bebd-2a77a8bbcd6d",
        "chatbotActions": []
    },
    "instructions": "",
    "functionIds": [],
    "functions": []
}

Update Starting Chat Event

PUT aiagent/aiAgents/{aiAgentId}/eventWhenStartingAChat

Parameters:

NameTypeinRequiredDescription
siteIdintegerqueryyesSite Id.
aiAgentIdguidpathyesId of the AI agent.
typeenumbodyyesAllowed values are workflow, naturalLanguage.
workflowobjectbodynoChatbot response workflow.
instructionsstringbodynoInstructions for the event.
functionIdsguid arraybodynoArray of function IDs to use in this event.

Response:

Event

Example

Sample Request:

curl https://api11.comm100.io/aiagent/aiAgents/e8397b4f-63fa-4d43-9967-99f390f93d98/eventWhenStartingAChat?siteId=10000 \ 
    -X PUT \ 
    -H 'Authorization: Bearer {access_token}' \
    -H 'Content-Type: application/json' \
    -D '{"aiAgentId":"e8397b4f-63fa-4d43-9967-99f390f93d98","type":"workflow","workflow":{"id":"093c4061-67f7-45f8-8849-27fab8007ec4","chatbotActions":[{"id":"fcafba38-e35d-418f-a235-fe81506bcc09","type":"chatbotActionStart","xPosition":24,"yPosition":50,"chatbotResponseId":"093c4061-67f7-45f8-8849-27fab8007ec4","chatbotActionStart":{"chatbotActionId":"fcafba38-e35d-418f-a235-fe81506bcc09","nextActionId":"4fd6679c-e94b-4337-a976-5c7bb70e6d6e"},"extendData":null},{"id":"4fd6679c-e94b-4337-a976-5c7bb70e6d6e","type":"chatbotActionSendMessage","xPosition":150,"yPosition":50,"chatbotResponseId":"093c4061-67f7-45f8-8849-27fab8007ec4","chatbotActionSendMessage":{"chatbotActionId":"4fd6679c-e94b-4337-a976-5c7bb70e6d6e","nextActionId":"00000000-0000-0000-0000-000000000000","typingDelay":1,"message":"Hi there! I am AI agent, here to help answer your questions.","chatbotActionSendMessageLinks":[]},"isError":false,"extendData":{"actionTitle":true,"links":true,"linkTo":true,"defaultOpenIn":"sideWindow","defaultLinkToType":"webview","htmlInput":{"dynamicInfo":true},"maxLinkCount":10}}]},"functionIds":[],"instructions":""}'

Response:
HTTP/1.1 200 OK

{
    "aiAgentId": "e8397b4f-63fa-4d43-9967-99f390f93d98",
    "type": "workflow",
    "workflow": {
        "id": "093c4061-67f7-45f8-8849-27fab8007ec4",
        "chatbotActions": [
            {
                "id": "4fd6679c-e94b-4337-a976-5c7bb70e6d6e",
                "type": "chatbotActionSendMessage",
                "xPosition": 150,
                "yPosition": 50,
                "chatbotResponseId": "093c4061-67f7-45f8-8849-27fab8007ec4",
                "chatbotActionSendMessage": {
                    "chatbotActionId": "4fd6679c-e94b-4337-a976-5c7bb70e6d6e",
                    "nextActionId": "00000000-0000-0000-0000-000000000000",
                    "typingDelay": 1.00,
                    "message": "Hi there! I'm AI agent, here to help answer your questions.",
                    "chatbotActionSendMessageLinks": []
                }
            },
            {
                "id": "fcafba38-e35d-418f-a235-fe81506bcc09",
                "type": "chatbotActionStart",
                "xPosition": 24,
                "yPosition": 50,
                "chatbotResponseId": "093c4061-67f7-45f8-8849-27fab8007ec4",
                "chatbotActionStart": {
                    "chatbotActionId": "fcafba38-e35d-418f-a235-fe81506bcc09",
                    "nextActionId": "4fd6679c-e94b-4337-a976-5c7bb70e6d6e"
                }
            }
        ]
    },
    "instructions": "",
    "functionIds": []
}

Update No Answer Event

PUT aiagent/aiAgents/{aiAgentId}/eventWhenNoAnswer

Parameters:

NameTypeinRequiredDescription
siteIdintegerqueryyesSite Id.
aiAgentIdguidpathyesId of the AI agent.
typeenumbodyyesAllowed values are workflow, naturalLanguage.
workflowobjectbodynoChatbot response workflow.
instructionsstringbodynoInstructions for the event.
functionIdsguid arraybodynoArray of function IDs to use in this event.

Response:

Event

Example

Sample Request:

curl https://api11.comm100.io/aiagent/aiAgents/e8397b4f-63fa-4d43-9967-99f390f93d98/eventWhenNoAnswer?siteId=10000 \ 
    -X PUT \
    -H 'Authorization : Bearer { access_token }' \
    -H 'Content-Type: application/json' \
    -D '{"aiAgentId":"e8397b4f-63fa-4d43-9967-99f390f93d98","type":"workflow","workflow":{"id":"093c4061-67f7-45f8-8849-27fab8007ec4","chatbotActions":[]},"instructions":"","functionIds":[]}'

Response:

HTTP/1.1 200 OK

{
    "aiAgentId": "e8397b4f-63fa-4d43-9967-99f390f93d98",
    "type": "workflow",
    "workflow": {
        "id": "093c4061-67f7-45f8-8849-27fab8007ec4",
        "chatbotActions": []
    },
    "instructions": "",
    "functionIds": [],
    "functions": []
}

Update Finishing Answer Event

PUT aiagent/aiAgents/{aiAgentId}/eventWhenFinishingAnAnswer

Parameters:

NameTypeinRequiredDescription
siteIdintegerqueryyesSite Id.
aiAgentIdguidpathyesId of the AI agent.
typeenumbodyyesAllowed values are workflow, naturalLanguage.
workflowobjectbodynoChatbot response workflow.
instructionsstringbodynoInstructions for the event.
functionIdsguid arraybodynoArray of function IDs to use in this event.

Response:

Event

Example

Sample Request:

curl https://api11.comm100.io/aiagent/aiAgents/3f6a7b71-00ba-491f-8e74-ce0ca169b02e/eventWhenFinishingAnAnswer?siteId=10000 \ 
    -X PUT \ 
    -H 'Authorization  : Bearer { access_token }' \
    -H 'Content-Type: application/json' \
    -D '{"aiAgentId":"3f6a7b71-00ba-491f-8e74-ce0ca169b02e","type":"workflow","workflow":{"id":"3a5db478-f1ed-446d-bebd-2a77a8bbcd6d","chatbotActions":[]},"instructions":"","functionIds":[]}'

Response:

HTTP/1.1 200 OK

{
    "aiAgentId": "3f6a7b71-00ba-491f-8e74-ce0ca169b02e",
    "type": "workflow",
    "workflow": {
        "id": "3a5db478-f1ed-446d-bebd-2a77a8bbcd6d",
        "chatbotActions": []
    },
    "instructions": "",
    "functionIds": [],
    "functions": []
}

Was this article helpful?

What's Next