put
https://refer-base-url-sub-domains.imi.chat/v3.1/chats//triggers
This endpoint allows you to update an event/rule's response asynchronously on a chat wherein the initial response was an synchronous acknowledgement alone.
Request Params
| Param Name | Data Type | Description |
|---|---|---|
| transid | string - Preferrably a GUID | Unique identifier of the request (optional) |
| updatedresponse | OBJECT | JSON object containing the latest response from the source system |
Response Params:
| Param Name | Description |
|---|---|
| status_code | Denotes the status of the response. Detailed guide can be found here |
| description | States the description of the status_code. Gives you information about the success/error |
| response | Contains details of the current resource fetched/updated/created |
Trigger Resource
| Param Name | Data Type | Description |
|---|---|---|
| chatid | string | Unique identifier of a chat |
| team_id | integer | Unique identifier of a chat |
| trigger_name | string | Name of the Trigger |
| transid | string - Preferably a GUID | Unique identifier of the trigger |
| triggered_on | datetime - UTC format | Timestamp when event/rule was triggered |
| updated_on | datetime - UTC format | Timestamp when the trigger was last updated |
| response | OBJECT | Contains the JSON response from the backend systems |
Response Codes
| status_code | HTTP Status | Description |
|---|---|---|
| 4312 | 200 | Trigger updated successfully |
| 2002 | 400 | Invalid header param - could not find mandatory header parameters |
| 2003 | 400 | Invalid Access Token |
| 2004 | 401 | Access Token expired |
| 2031 | 404 | Provided Chat ID does not exist |
| 2007 | 500 | Internal Server Error |
| 2010 | 404 | Could not find details of team based on the teamid passed in the header |
| 2099 | 405 | Method not allowed |
| 2031 | 404 | Chat ID provided does not exist |
| 3114 | 400 | Request body not provided |
| 4107 | 500 | Unable to update the details |
