From fc45938b3d7fc4b11e1bb4e7e0a8523b3fe253a4 Mon Sep 17 00:00:00 2001 From: "sachin.cometchat" Date: Tue, 23 Dec 2025 17:43:20 +0530 Subject: [PATCH 01/16] Added the examples for send message --- chat-apis.json | 612 +++++++++++++++++++++++++++++------------- data-import-apis.json | 399 +++++++++++++++++++++++++++ 2 files changed, 818 insertions(+), 193 deletions(-) diff --git a/chat-apis.json b/chat-apis.json index f7d39666..ffb5be3f 100644 --- a/chat-apis.json +++ b/chat-apis.json @@ -1187,16 +1187,16 @@ }, "default": [] }, - "usersToBan": { - "description": "UIDs of the users to be banned from the group.", + "participants": { + "description": "UIDs of users to be made participants.", "type": "array", "items": { "type": "string" }, "default": [] }, - "participants": { - "description": "UIDs of users to be made participants.", + "usersToBan": { + "description": "UIDs of the users to be banned from the group.", "type": "array", "items": { "type": "string" @@ -1204,22 +1204,10 @@ "default": [] } }, - "type": "object", - "additionalProperties": false, - "x-omitempty": true + "type": "object" } }, "type": "object" - }, - "examples": { - "Send Moderation Message": { - "summary": "Send Moderation Message", - "value": { - "guid": "testgroup", - "name": "Test Group", - "type": "public" - } - } } } } @@ -1773,168 +1761,17 @@ ] }, "examples": { + "Text Message": { + "$ref": "#/components/examples/text-message" + }, + "Custom Message": { + "$ref": "#/components/examples/custom-message" + }, + "Media Message": { + "$ref": "#/components/examples/media-message" + }, "form-interactive": { - "summary": "Interactive form example", - "value": { - "receiverType": "user", - "data": { - "interactionGoal": { - "type": "allOf", - "elementIds": [ - "element8" - ] - }, - "allowSenderInteraction": true, - "interactiveData": { - "title": "Form Title", - "formFields": [ - { - "elementType": "textInput", - "elementId": "element1", - "defaultValue": "vivek", - "label": "Name", - "optional": false, - "maxLines": 1, - "placeholder": { - "text": "write your name here" - } - }, - { - "elementType": "textInput", - "elementId": "element2", - "label": "Last Name", - "optional": false, - "maxLines": 1 - }, - { - "elementType": "textInput", - "elementId": "element3", - "label": "Address", - "optional": false, - "maxLines": 5 - }, - { - "elementType": "dropdown", - "elementId": "element4", - "label": "Country", - "optional": false, - "defaultValue": "option1", - "options": [ - { - "value": "option1", - "label": "INDIA" - }, - { - "value": "option2", - "label": "AUSTRALIA" - } - ] - }, - { - "elementType": "checkbox", - "elementId": "element5", - "optional": true, - "label": "Services", - "options": [ - { - "value": "option1", - "label": "Garbage" - }, - { - "value": "option2", - "label": "Electricity Bill" - }, - { - "value": "option3", - "label": "Lift" - } - ], - "defaultValue": [ - "option1", - "option2" - ] - }, - { - "elementType": "singleSelect", - "elementId": "element6", - "optional": false, - "label": "Wing", - "defaultValue": "option1", - "options": [ - { - "value": "option1", - "label": "A Wing" - }, - { - "value": "option2", - "label": "B Wing" - } - ] - }, - { - "elementType": "button", - "elementId": "element9", - "buttonText": "About us", - "disableAfterInteracted": true, - "action": { - "actionType": "urlNavigation", - "url": "https://www.cometchat.com" - } - }, - { - "elementType": "dateTime", - "elementId": "element11", - "defaultValue": false, - "label": "Contact Number", - "optional": false, - "mode": "date", - "dateTimeFormat": "Y-m-d H:i:ss", - "timezoneCode": "Asia/Kolkata", - "from1": "2024-02-23T14:30", - "from": "2024-06-23", - "to": "2024-06-24", - "maxLines": 1, - "placeholder": { - "text": "Enter contact number" - } - } - ], - "submitElement": { - "elementType": "button", - "elementId": "element8", - "buttonText": "Submit", - "disableAfterInteracted": true, - "action": { - "actionType": "apiAction", - "url": "https://10893f2ae68f59.api-us.cometchat-staging.com/v3.0/messages", - "method": "POST", - "payload": { - "category": "message", - "type": "text", - "data": { - "text": "Thanks For filling the Form!" - }, - "receiver": "superhero2", - "receiverType": "user" - }, - "headers": { - "appId": "10893f2ae68f59", - "Content-Type": "application/json", - "apiKey": "5797f2d3d103d7d78f085eb46bfd14d5c45ddfdf", - "onBehalfOf": "superhero1" - }, - "dataKey": "CometChatData" - } - } - } - }, - "category": "interactive", - "type": "form", - "receiver": "superhero1", - "tags": [ - "tag1" - ] - } + "$ref": "#/components/examples/form-interactive" }, "card-interactive": { "summary": "Interactive card example", @@ -5539,7 +5376,7 @@ "items": { "type": "string" }, - "minItems": 1 + "default": [] }, "moderators": { "description": "UIDs of users to be made moderators.", @@ -5547,7 +5384,7 @@ "items": { "type": "string" }, - "minItems": 1 + "default": [] }, "participants": { "description": "UIDs of users to be made participants.", @@ -5555,7 +5392,7 @@ "items": { "type": "string" }, - "minItems": 1 + "default": [] }, "usersToBan": { "description": "UIDs of the users to be banned from the group.", @@ -5563,20 +5400,10 @@ "items": { "type": "string" }, - "minItems": 1 + "default": [] } }, "type": "object" - }, - "examples": { - "Add Members": { - "summary": "Add Members", - "value": { - "participants": [ - "cometchat-uid-1" - ] - } - } } } } @@ -15031,7 +14858,7 @@ "Moderation" ], "summary": "List Reviewed messages", - "description": "Retrieves a list of messages that have been reviewed by the moderator.", + "description": "Marks the blocked messages as reviewed. The moderator can approve the message or confirm it remains blocked. Once reviewed, the message is moved from the blocked messages list to the reviewed messages list.", "operationId": "chat-api-list-reviewed-messages", "parameters": [ { @@ -19651,6 +19478,405 @@ } } }, + "examples": { + "form-interactive": { + "summary": "Interactive form example", + "value": { + "receiverType": "user", + "data": { + "interactionGoal": { + "type": "allOf", + "elementIds": [ + "element8" + ] + }, + "allowSenderInteraction": true, + "interactiveData": { + "title": "Form Title", + "formFields": [ + { + "elementType": "textInput", + "elementId": "element1", + "defaultValue": "vivek", + "label": "Name", + "optional": false, + "maxLines": 1, + "placeholder": { + "text": "write your name here" + } + }, + { + "elementType": "textInput", + "elementId": "element2", + "label": "Last Name", + "optional": false, + "maxLines": 1 + }, + { + "elementType": "textInput", + "elementId": "element3", + "label": "Address", + "optional": false, + "maxLines": 5 + }, + { + "elementType": "dropdown", + "elementId": "element4", + "label": "Country", + "optional": false, + "defaultValue": "option1", + "options": [ + { + "value": "option1", + "label": "INDIA" + }, + { + "value": "option2", + "label": "AUSTRALIA" + } + ] + }, + { + "elementType": "checkbox", + "elementId": "element5", + "optional": true, + "label": "Services", + "options": [ + { + "value": "option1", + "label": "Garbage" + }, + { + "value": "option2", + "label": "Electricity Bill" + }, + { + "value": "option3", + "label": "Lift" + } + ], + "defaultValue": [ + "option1", + "option2" + ] + }, + { + "elementType": "singleSelect", + "elementId": "element6", + "optional": false, + "label": "Wing", + "defaultValue": "option1", + "options": [ + { + "value": "option1", + "label": "A Wing" + }, + { + "value": "option2", + "label": "B Wing" + } + ] + }, + { + "elementType": "button", + "elementId": "element9", + "buttonText": "About us", + "disableAfterInteracted": true, + "action": { + "actionType": "urlNavigation", + "url": "https://www.cometchat.com" + } + }, + { + "elementType": "dateTime", + "elementId": "element11", + "defaultValue": false, + "label": "Contact Number", + "optional": false, + "mode": "date", + "dateTimeFormat": "Y-m-d H:i:ss", + "timezoneCode": "Asia/Kolkata", + "from1": "2024-02-23T14:30", + "from": "2024-06-23", + "to": "2024-06-24", + "maxLines": 1, + "placeholder": { + "text": "Enter contact number" + } + } + ], + "submitElement": { + "elementType": "button", + "elementId": "element8", + "buttonText": "Submit", + "disableAfterInteracted": true, + "action": { + "actionType": "apiAction", + "url": "https://10893f2ae68f59.api-us.cometchat-staging.com/v3.0/messages", + "method": "POST", + "payload": { + "category": "message", + "type": "text", + "data": { + "text": "Thanks For filling the Form!" + }, + "receiver": "superhero2", + "receiverType": "user" + }, + "headers": { + "appId": "10893f2ae68f59", + "Content-Type": "application/json", + "apiKey": "5797f2d3d103d7d78f085eb46bfd14d5c45ddfdf", + "onBehalfOf": "superhero1" + }, + "dataKey": "CometChatData" + } + } + } + }, + "category": "interactive", + "type": "form", + "receiver": "superhero1", + "tags": [ + "tag1" + ] + } + }, + "card-interactive": { + "summary": "Interactive card example", + "value": { + "receiverType": "user", + "data": { + "interactionGoal": { + "type": "none" + }, + "allowSenderInteraction": true, + "interactiveData": { + "imageUrl": "https://upload.wikimedia.org/wikipedia/en/e/e1/Thomas_D._Baird_%28low-resolution%29.jpg", + "text": "Thanks For filling the Form!.\n\nWant to make your gifts more special? Now its easy with our personalized card messages!\n\nOur new feature lets you add a custom message on a beautifully designed card, making your gift-giving extra personal and memorable.\nWhether its for a birthday , anniversary , or just because , our card messages will express your feelings perfectly.\n\nTo start creating your own card message:\nChoose the gift\nWrite your heartfelt message\nWell print it on a high-quality card and include it with your gift\nAdd a touch of your own sentiments with our personalized card messages. Make every gift unforgettable. Start creating your card message today!\nVisit our website Website Link or download our app App Link.\n\nExpress more than just words with our Personalized Card Messages.Because its not just a gift, its your feelings.\n", + "cardActions": [ + { + "elementType": "button", + "elementId": "element8", + "buttonText": "Buy now", + "disableAfterInteracted": true, + "action": { + "actionType": "apiAction", + "url": "https://10893f2ae68f59.api-us.cometchat-staging.com/v3.0/messages", + "method": "POST", + "payload": { + "category": "message", + "type": "text", + "data": { + "text": "Thanks For filling the Form!" + }, + "receiver": "group_1695921003310", + "receiverType": "group" + }, + "headers": { + "appId": "10893f2ae68f59", + "Content-Type": "application/json", + "apiKey": "5797f2d3d103d7d78f085eb46bfd14d5c45ddfdf", + "onBehalfOf": "superhero1" + }, + "dataKey": "CometChatData" + } + }, + { + "elementType": "button", + "elementId": "element9", + "buttonText": "Navigate", + "disableAfterInteracted": true, + "action": { + "actionType": "urlNavigation", + "url": "https://www.cometchat.com" + } + }, + { + "elementType": "button", + "elementId": "element10", + "buttonText": "Submit", + "disableAfterInteracted": true, + "action": { + "actionType": "apiAction", + "url": "https://10893f2ae68f59.api-us.cometchat-staging.com/v3.0/messages", + "method": "POST", + "payload": { + "category": "message", + "type": "text", + "data": { + "text": "Thanks For filling the Form!" + }, + "receiver": "group_1695921003310", + "receiverType": "group" + }, + "headers": { + "appId": "10893f2ae68f59", + "Content-Type": "application/json", + "apiKey": "5797f2d3d103d7d78f085eb46bfd14d5c45ddfdf", + "onBehalfOf": "superhero1" + }, + "dataKey": "CometChatData" + } + } + ] + } + }, + "category": "interactive", + "type": "card", + "receiver": "superhero1", + "tags": [ + "tag1" + ] + } + }, + "scheduler-interactive": { + "summary": "Interactive scheduler example", + "value": { + "receiverType": "user", + "receiver": "superhero2", + "category": "interactive", + "type": "scheduler", + "data": { + "receiverType": "user", + "receiver": "superhero2", + "muid": "16Jan3:41423PM", + "interactionGoal": { + "type": "anyAction", + "elementIds": [] + }, + "allowSenderInteraction": false, + "interactiveData": { + "title": "Meet with Dr. Jacob", + "avatarUrl": "https://data-us.cometchat.io/assets/images/avatars/ironman.png", + "bufferTime": 15, + "icsFileUrl": "https://data-us.cometchat.io/23965108c9b89ad2/media/1704380186_864562419_ab59586ed5ab5f89d2c960457ceee249.ics", + "availability": { + "friday": [ + { + "to": "2359", + "from": "0000" + } + ], + "monday": [ + { + "to": "1700", + "from": "0600" + } + ], + "tuesday": [ + { + "to": "1400", + "from": "1000" + }, + { + "to": "2000", + "from": "1700" + } + ], + "thursday": [ + { + "to": "2359", + "from": "0000" + } + ], + "wednesday": [ + { + "to": "0800", + "from": "0600" + }, + { + "to": "1700", + "from": "1200" + } + ] + }, + "timezoneCode": "Asia/Kolkata", + "duration": 60, + "scheduleElement": { + "action": { + "url": "https://802bba5ae13a7.api-us.cometchat-staging.com/v3.0/messages", + "actionType": "apiAction", + "method": "post", + "dataKey": "", + "headers": { + "accept": "application/json", + "apiKey": "62a32b5140e6b630dab38e2e690d88de9c69d416", + "onBehalfOf": "suryansh1", + "content-type": "application/json" + }, + "payload": { + "data": { + "text": "Meeting Scheduled Successfully!" + }, + "type": "text", + "category": "message", + "receiver": "demo1", + "receiverType": "group" + } + }, + "elementId": "1", + "buttonText": "Schedule", + "elementType": "button", + "disableAfterInteracted": true + }, + "goalCompletionText": "Your meeting has been Scheduled", + "dateRangeStart": "2024-06-09", + "dateRangeEnd": "2024-06-09" + } + } + } + }, + "text-message": { + "summary": "Text Message example", + "value": { + "receiver": "cometchat-uid-2", + "receiverType": "user", + "category": "message", + "type": "text", + "data": { + "text": "Hello" + } + } + }, + "custom-message": { + "summary": "Custom Message example", + "value": { + "receiverType": "user", + "data": { + "customData": { + "text": "Hello there!" + } + }, + "category": "custom", + "type": "text", + "receiver": "cometchat-uid-2", + "tags": [ + "tag1" + ] + } + }, + "media-message": { + "summary": "Media Message example", + "value": { + "receiverType": "user", + "data": { + "text": "Hello there!", + "attachments": [ + { + "name": "ironman.png", + "extension": "png", + "mimeType": "image/png", + "url": "https://data-eu.cometchat.io/assets/images/avatars/ironman.png" + } + ] + }, + "category": "message", + "type": "image", + "receiver": "cometchat-uid-2" + } + } + }, "securitySchemes": { "apiKey": { "type": "apiKey", diff --git a/data-import-apis.json b/data-import-apis.json index 85c46fcd..6ea96973 100644 --- a/data-import-apis.json +++ b/data-import-apis.json @@ -5536,6 +5536,405 @@ } } }, + "examples": { + "form-interactive": { + "summary": "Interactive form example", + "value": { + "receiverType": "user", + "data": { + "interactionGoal": { + "type": "allOf", + "elementIds": [ + "element8" + ] + }, + "allowSenderInteraction": true, + "interactiveData": { + "title": "Form Title", + "formFields": [ + { + "elementType": "textInput", + "elementId": "element1", + "defaultValue": "vivek", + "label": "Name", + "optional": false, + "maxLines": 1, + "placeholder": { + "text": "write your name here" + } + }, + { + "elementType": "textInput", + "elementId": "element2", + "label": "Last Name", + "optional": false, + "maxLines": 1 + }, + { + "elementType": "textInput", + "elementId": "element3", + "label": "Address", + "optional": false, + "maxLines": 5 + }, + { + "elementType": "dropdown", + "elementId": "element4", + "label": "Country", + "optional": false, + "defaultValue": "option1", + "options": [ + { + "value": "option1", + "label": "INDIA" + }, + { + "value": "option2", + "label": "AUSTRALIA" + } + ] + }, + { + "elementType": "checkbox", + "elementId": "element5", + "optional": true, + "label": "Services", + "options": [ + { + "value": "option1", + "label": "Garbage" + }, + { + "value": "option2", + "label": "Electricity Bill" + }, + { + "value": "option3", + "label": "Lift" + } + ], + "defaultValue": [ + "option1", + "option2" + ] + }, + { + "elementType": "singleSelect", + "elementId": "element6", + "optional": false, + "label": "Wing", + "defaultValue": "option1", + "options": [ + { + "value": "option1", + "label": "A Wing" + }, + { + "value": "option2", + "label": "B Wing" + } + ] + }, + { + "elementType": "button", + "elementId": "element9", + "buttonText": "About us", + "disableAfterInteracted": true, + "action": { + "actionType": "urlNavigation", + "url": "https://www.cometchat.com" + } + }, + { + "elementType": "dateTime", + "elementId": "element11", + "defaultValue": false, + "label": "Contact Number", + "optional": false, + "mode": "date", + "dateTimeFormat": "Y-m-d H:i:ss", + "timezoneCode": "Asia/Kolkata", + "from1": "2024-02-23T14:30", + "from": "2024-06-23", + "to": "2024-06-24", + "maxLines": 1, + "placeholder": { + "text": "Enter contact number" + } + } + ], + "submitElement": { + "elementType": "button", + "elementId": "element8", + "buttonText": "Submit", + "disableAfterInteracted": true, + "action": { + "actionType": "apiAction", + "url": "https://10893f2ae68f59.api-us.cometchat-staging.com/v3.0/messages", + "method": "POST", + "payload": { + "category": "message", + "type": "text", + "data": { + "text": "Thanks For filling the Form!" + }, + "receiver": "superhero2", + "receiverType": "user" + }, + "headers": { + "appId": "10893f2ae68f59", + "Content-Type": "application/json", + "apiKey": "5797f2d3d103d7d78f085eb46bfd14d5c45ddfdf", + "onBehalfOf": "superhero1" + }, + "dataKey": "CometChatData" + } + } + } + }, + "category": "interactive", + "type": "form", + "receiver": "superhero1", + "tags": [ + "tag1" + ] + } + }, + "card-interactive": { + "summary": "Interactive card example", + "value": { + "receiverType": "user", + "data": { + "interactionGoal": { + "type": "none" + }, + "allowSenderInteraction": true, + "interactiveData": { + "imageUrl": "https://upload.wikimedia.org/wikipedia/en/e/e1/Thomas_D._Baird_%28low-resolution%29.jpg", + "text": "Thanks For filling the Form!.\n\nWant to make your gifts more special? Now its easy with our personalized card messages!\n\nOur new feature lets you add a custom message on a beautifully designed card, making your gift-giving extra personal and memorable.\nWhether its for a birthday , anniversary , or just because , our card messages will express your feelings perfectly.\n\nTo start creating your own card message:\nChoose the gift\nWrite your heartfelt message\nWell print it on a high-quality card and include it with your gift\nAdd a touch of your own sentiments with our personalized card messages. Make every gift unforgettable. Start creating your card message today!\nVisit our website Website Link or download our app App Link.\n\nExpress more than just words with our Personalized Card Messages.Because its not just a gift, its your feelings.\n", + "cardActions": [ + { + "elementType": "button", + "elementId": "element8", + "buttonText": "Buy now", + "disableAfterInteracted": true, + "action": { + "actionType": "apiAction", + "url": "https://10893f2ae68f59.api-us.cometchat-staging.com/v3.0/messages", + "method": "POST", + "payload": { + "category": "message", + "type": "text", + "data": { + "text": "Thanks For filling the Form!" + }, + "receiver": "group_1695921003310", + "receiverType": "group" + }, + "headers": { + "appId": "10893f2ae68f59", + "Content-Type": "application/json", + "apiKey": "5797f2d3d103d7d78f085eb46bfd14d5c45ddfdf", + "onBehalfOf": "superhero1" + }, + "dataKey": "CometChatData" + } + }, + { + "elementType": "button", + "elementId": "element9", + "buttonText": "Navigate", + "disableAfterInteracted": true, + "action": { + "actionType": "urlNavigation", + "url": "https://www.cometchat.com" + } + }, + { + "elementType": "button", + "elementId": "element10", + "buttonText": "Submit", + "disableAfterInteracted": true, + "action": { + "actionType": "apiAction", + "url": "https://10893f2ae68f59.api-us.cometchat-staging.com/v3.0/messages", + "method": "POST", + "payload": { + "category": "message", + "type": "text", + "data": { + "text": "Thanks For filling the Form!" + }, + "receiver": "group_1695921003310", + "receiverType": "group" + }, + "headers": { + "appId": "10893f2ae68f59", + "Content-Type": "application/json", + "apiKey": "5797f2d3d103d7d78f085eb46bfd14d5c45ddfdf", + "onBehalfOf": "superhero1" + }, + "dataKey": "CometChatData" + } + } + ] + } + }, + "category": "interactive", + "type": "card", + "receiver": "superhero1", + "tags": [ + "tag1" + ] + } + }, + "scheduler-interactive": { + "summary": "Interactive scheduler example", + "value": { + "receiverType": "user", + "receiver": "superhero2", + "category": "interactive", + "type": "scheduler", + "data": { + "receiverType": "user", + "receiver": "superhero2", + "muid": "16Jan3:41423PM", + "interactionGoal": { + "type": "anyAction", + "elementIds": [] + }, + "allowSenderInteraction": false, + "interactiveData": { + "title": "Meet with Dr. Jacob", + "avatarUrl": "https://data-us.cometchat.io/assets/images/avatars/ironman.png", + "bufferTime": 15, + "icsFileUrl": "https://data-us.cometchat.io/23965108c9b89ad2/media/1704380186_864562419_ab59586ed5ab5f89d2c960457ceee249.ics", + "availability": { + "friday": [ + { + "to": "2359", + "from": "0000" + } + ], + "monday": [ + { + "to": "1700", + "from": "0600" + } + ], + "tuesday": [ + { + "to": "1400", + "from": "1000" + }, + { + "to": "2000", + "from": "1700" + } + ], + "thursday": [ + { + "to": "2359", + "from": "0000" + } + ], + "wednesday": [ + { + "to": "0800", + "from": "0600" + }, + { + "to": "1700", + "from": "1200" + } + ] + }, + "timezoneCode": "Asia/Kolkata", + "duration": 60, + "scheduleElement": { + "action": { + "url": "https://802bba5ae13a7.api-us.cometchat-staging.com/v3.0/messages", + "actionType": "apiAction", + "method": "post", + "dataKey": "", + "headers": { + "accept": "application/json", + "apiKey": "62a32b5140e6b630dab38e2e690d88de9c69d416", + "onBehalfOf": "suryansh1", + "content-type": "application/json" + }, + "payload": { + "data": { + "text": "Meeting Scheduled Successfully!" + }, + "type": "text", + "category": "message", + "receiver": "demo1", + "receiverType": "group" + } + }, + "elementId": "1", + "buttonText": "Schedule", + "elementType": "button", + "disableAfterInteracted": true + }, + "goalCompletionText": "Your meeting has been Scheduled", + "dateRangeStart": "2024-06-09", + "dateRangeEnd": "2024-06-09" + } + } + } + }, + "text-message": { + "summary": "Text Message example", + "value": { + "receiver": "cometchat-uid-2", + "receiverType": "user", + "category": "message", + "type": "text", + "data": { + "text": "Hello" + } + } + }, + "custom-message": { + "summary": "Custom Message example", + "value": { + "receiverType": "user", + "data": { + "customData": { + "text": "Hello there!" + } + }, + "category": "custom", + "type": "text", + "receiver": "cometchat-uid-2", + "tags": [ + "tag1" + ] + } + }, + "media-message": { + "summary": "Media Message example", + "value": { + "receiverType": "user", + "data": { + "text": "Hello there!", + "attachments": [ + { + "name": "ironman.png", + "extension": "png", + "mimeType": "image/png", + "url": "https://data-eu.cometchat.io/assets/images/avatars/ironman.png" + } + ] + }, + "category": "message", + "type": "image", + "receiver": "cometchat-uid-2" + } + } + }, "securitySchemes": { "apiKey": { "type": "apiKey", From 5e956ea7e880fb3d3f2c61b56f20bab0ddecc96f Mon Sep 17 00:00:00 2001 From: "sachin.cometchat" Date: Tue, 23 Dec 2025 18:26:16 +0530 Subject: [PATCH 02/16] Added the examples for send message --- chat-apis.json | 552 +++++++++++++++--------------------------- data-import-apis.json | 348 -------------------------- 2 files changed, 193 insertions(+), 707 deletions(-) diff --git a/chat-apis.json b/chat-apis.json index ffb5be3f..240a2463 100644 --- a/chat-apis.json +++ b/chat-apis.json @@ -1187,16 +1187,16 @@ }, "default": [] }, - "participants": { - "description": "UIDs of users to be made participants.", + "usersToBan": { + "description": "UIDs of the users to be banned from the group.", "type": "array", "items": { "type": "string" }, "default": [] }, - "usersToBan": { - "description": "UIDs of the users to be banned from the group.", + "participants": { + "description": "UIDs of users to be made participants.", "type": "array", "items": { "type": "string" @@ -1204,10 +1204,22 @@ "default": [] } }, - "type": "object" + "type": "object", + "additionalProperties": false, + "x-omitempty": true } }, "type": "object" + }, + "examples": { + "Send Moderation Message": { + "summary": "Send Moderation Message", + "value": { + "guid": "testgroup", + "name": "Test Group", + "type": "public" + } + } } } } @@ -1771,7 +1783,167 @@ "$ref": "#/components/examples/media-message" }, "form-interactive": { - "$ref": "#/components/examples/form-interactive" + "summary": "Interactive form example", + "value": { + "receiverType": "user", + "data": { + "interactionGoal": { + "type": "allOf", + "elementIds": [ + "element8" + ] + }, + "allowSenderInteraction": true, + "interactiveData": { + "title": "Form Title", + "formFields": [ + { + "elementType": "textInput", + "elementId": "element1", + "defaultValue": "vivek", + "label": "Name", + "optional": false, + "maxLines": 1, + "placeholder": { + "text": "write your name here" + } + }, + { + "elementType": "textInput", + "elementId": "element2", + "label": "Last Name", + "optional": false, + "maxLines": 1 + }, + { + "elementType": "textInput", + "elementId": "element3", + "label": "Address", + "optional": false, + "maxLines": 5 + }, + { + "elementType": "dropdown", + "elementId": "element4", + "label": "Country", + "optional": false, + "defaultValue": "option1", + "options": [ + { + "value": "option1", + "label": "INDIA" + }, + { + "value": "option2", + "label": "AUSTRALIA" + } + ] + }, + { + "elementType": "checkbox", + "elementId": "element5", + "optional": true, + "label": "Services", + "options": [ + { + "value": "option1", + "label": "Garbage" + }, + { + "value": "option2", + "label": "Electricity Bill" + }, + { + "value": "option3", + "label": "Lift" + } + ], + "defaultValue": [ + "option1", + "option2" + ] + }, + { + "elementType": "singleSelect", + "elementId": "element6", + "optional": false, + "label": "Wing", + "defaultValue": "option1", + "options": [ + { + "value": "option1", + "label": "A Wing" + }, + { + "value": "option2", + "label": "B Wing" + } + ] + }, + { + "elementType": "button", + "elementId": "element9", + "buttonText": "About us", + "disableAfterInteracted": true, + "action": { + "actionType": "urlNavigation", + "url": "https://www.cometchat.com" + } + }, + { + "elementType": "dateTime", + "elementId": "element11", + "defaultValue": false, + "label": "Contact Number", + "optional": false, + "mode": "date", + "dateTimeFormat": "Y-m-d H:i:ss", + "timezoneCode": "Asia/Kolkata", + "from1": "2024-02-23T14:30", + "from": "2024-06-23", + "to": "2024-06-24", + "maxLines": 1, + "placeholder": { + "text": "Enter contact number" + } + } + ], + "submitElement": { + "elementType": "button", + "elementId": "element8", + "buttonText": "Submit", + "disableAfterInteracted": true, + "action": { + "actionType": "apiAction", + "url": "https://10893f2ae68f59.api-us.cometchat-staging.com/v3.0/messages", + "method": "POST", + "payload": { + "category": "message", + "type": "text", + "data": { + "text": "Thanks For filling the Form!" + }, + "receiver": "superhero2", + "receiverType": "user" + }, + "headers": { + "appId": "10893f2ae68f59", + "Content-Type": "application/json", + "apiKey": "5797f2d3d103d7d78f085eb46bfd14d5c45ddfdf", + "onBehalfOf": "superhero1" + }, + "dataKey": "CometChatData" + } + } + } + }, + "category": "interactive", + "type": "form", + "receiver": "superhero1", + "tags": [ + "tag1" + ] + } }, "card-interactive": { "summary": "Interactive card example", @@ -5376,7 +5548,7 @@ "items": { "type": "string" }, - "default": [] + "minItems": 1 }, "moderators": { "description": "UIDs of users to be made moderators.", @@ -5384,7 +5556,7 @@ "items": { "type": "string" }, - "default": [] + "minItems": 1 }, "participants": { "description": "UIDs of users to be made participants.", @@ -5392,7 +5564,7 @@ "items": { "type": "string" }, - "default": [] + "minItems": 1 }, "usersToBan": { "description": "UIDs of the users to be banned from the group.", @@ -5400,10 +5572,20 @@ "items": { "type": "string" }, - "default": [] + "minItems": 1 } }, "type": "object" + }, + "examples": { + "Add Members": { + "summary": "Add Members", + "value": { + "participants": [ + "cometchat-uid-1" + ] + } + } } } } @@ -14858,7 +15040,7 @@ "Moderation" ], "summary": "List Reviewed messages", - "description": "Marks the blocked messages as reviewed. The moderator can approve the message or confirm it remains blocked. Once reviewed, the message is moved from the blocked messages list to the reviewed messages list.", + "description": "Retrieves a list of messages that have been reviewed by the moderator.", "operationId": "chat-api-list-reviewed-messages", "parameters": [ { @@ -19479,354 +19661,6 @@ } }, "examples": { - "form-interactive": { - "summary": "Interactive form example", - "value": { - "receiverType": "user", - "data": { - "interactionGoal": { - "type": "allOf", - "elementIds": [ - "element8" - ] - }, - "allowSenderInteraction": true, - "interactiveData": { - "title": "Form Title", - "formFields": [ - { - "elementType": "textInput", - "elementId": "element1", - "defaultValue": "vivek", - "label": "Name", - "optional": false, - "maxLines": 1, - "placeholder": { - "text": "write your name here" - } - }, - { - "elementType": "textInput", - "elementId": "element2", - "label": "Last Name", - "optional": false, - "maxLines": 1 - }, - { - "elementType": "textInput", - "elementId": "element3", - "label": "Address", - "optional": false, - "maxLines": 5 - }, - { - "elementType": "dropdown", - "elementId": "element4", - "label": "Country", - "optional": false, - "defaultValue": "option1", - "options": [ - { - "value": "option1", - "label": "INDIA" - }, - { - "value": "option2", - "label": "AUSTRALIA" - } - ] - }, - { - "elementType": "checkbox", - "elementId": "element5", - "optional": true, - "label": "Services", - "options": [ - { - "value": "option1", - "label": "Garbage" - }, - { - "value": "option2", - "label": "Electricity Bill" - }, - { - "value": "option3", - "label": "Lift" - } - ], - "defaultValue": [ - "option1", - "option2" - ] - }, - { - "elementType": "singleSelect", - "elementId": "element6", - "optional": false, - "label": "Wing", - "defaultValue": "option1", - "options": [ - { - "value": "option1", - "label": "A Wing" - }, - { - "value": "option2", - "label": "B Wing" - } - ] - }, - { - "elementType": "button", - "elementId": "element9", - "buttonText": "About us", - "disableAfterInteracted": true, - "action": { - "actionType": "urlNavigation", - "url": "https://www.cometchat.com" - } - }, - { - "elementType": "dateTime", - "elementId": "element11", - "defaultValue": false, - "label": "Contact Number", - "optional": false, - "mode": "date", - "dateTimeFormat": "Y-m-d H:i:ss", - "timezoneCode": "Asia/Kolkata", - "from1": "2024-02-23T14:30", - "from": "2024-06-23", - "to": "2024-06-24", - "maxLines": 1, - "placeholder": { - "text": "Enter contact number" - } - } - ], - "submitElement": { - "elementType": "button", - "elementId": "element8", - "buttonText": "Submit", - "disableAfterInteracted": true, - "action": { - "actionType": "apiAction", - "url": "https://10893f2ae68f59.api-us.cometchat-staging.com/v3.0/messages", - "method": "POST", - "payload": { - "category": "message", - "type": "text", - "data": { - "text": "Thanks For filling the Form!" - }, - "receiver": "superhero2", - "receiverType": "user" - }, - "headers": { - "appId": "10893f2ae68f59", - "Content-Type": "application/json", - "apiKey": "5797f2d3d103d7d78f085eb46bfd14d5c45ddfdf", - "onBehalfOf": "superhero1" - }, - "dataKey": "CometChatData" - } - } - } - }, - "category": "interactive", - "type": "form", - "receiver": "superhero1", - "tags": [ - "tag1" - ] - } - }, - "card-interactive": { - "summary": "Interactive card example", - "value": { - "receiverType": "user", - "data": { - "interactionGoal": { - "type": "none" - }, - "allowSenderInteraction": true, - "interactiveData": { - "imageUrl": "https://upload.wikimedia.org/wikipedia/en/e/e1/Thomas_D._Baird_%28low-resolution%29.jpg", - "text": "Thanks For filling the Form!.\n\nWant to make your gifts more special? Now its easy with our personalized card messages!\n\nOur new feature lets you add a custom message on a beautifully designed card, making your gift-giving extra personal and memorable.\nWhether its for a birthday , anniversary , or just because , our card messages will express your feelings perfectly.\n\nTo start creating your own card message:\nChoose the gift\nWrite your heartfelt message\nWell print it on a high-quality card and include it with your gift\nAdd a touch of your own sentiments with our personalized card messages. Make every gift unforgettable. Start creating your card message today!\nVisit our website Website Link or download our app App Link.\n\nExpress more than just words with our Personalized Card Messages.Because its not just a gift, its your feelings.\n", - "cardActions": [ - { - "elementType": "button", - "elementId": "element8", - "buttonText": "Buy now", - "disableAfterInteracted": true, - "action": { - "actionType": "apiAction", - "url": "https://10893f2ae68f59.api-us.cometchat-staging.com/v3.0/messages", - "method": "POST", - "payload": { - "category": "message", - "type": "text", - "data": { - "text": "Thanks For filling the Form!" - }, - "receiver": "group_1695921003310", - "receiverType": "group" - }, - "headers": { - "appId": "10893f2ae68f59", - "Content-Type": "application/json", - "apiKey": "5797f2d3d103d7d78f085eb46bfd14d5c45ddfdf", - "onBehalfOf": "superhero1" - }, - "dataKey": "CometChatData" - } - }, - { - "elementType": "button", - "elementId": "element9", - "buttonText": "Navigate", - "disableAfterInteracted": true, - "action": { - "actionType": "urlNavigation", - "url": "https://www.cometchat.com" - } - }, - { - "elementType": "button", - "elementId": "element10", - "buttonText": "Submit", - "disableAfterInteracted": true, - "action": { - "actionType": "apiAction", - "url": "https://10893f2ae68f59.api-us.cometchat-staging.com/v3.0/messages", - "method": "POST", - "payload": { - "category": "message", - "type": "text", - "data": { - "text": "Thanks For filling the Form!" - }, - "receiver": "group_1695921003310", - "receiverType": "group" - }, - "headers": { - "appId": "10893f2ae68f59", - "Content-Type": "application/json", - "apiKey": "5797f2d3d103d7d78f085eb46bfd14d5c45ddfdf", - "onBehalfOf": "superhero1" - }, - "dataKey": "CometChatData" - } - } - ] - } - }, - "category": "interactive", - "type": "card", - "receiver": "superhero1", - "tags": [ - "tag1" - ] - } - }, - "scheduler-interactive": { - "summary": "Interactive scheduler example", - "value": { - "receiverType": "user", - "receiver": "superhero2", - "category": "interactive", - "type": "scheduler", - "data": { - "receiverType": "user", - "receiver": "superhero2", - "muid": "16Jan3:41423PM", - "interactionGoal": { - "type": "anyAction", - "elementIds": [] - }, - "allowSenderInteraction": false, - "interactiveData": { - "title": "Meet with Dr. Jacob", - "avatarUrl": "https://data-us.cometchat.io/assets/images/avatars/ironman.png", - "bufferTime": 15, - "icsFileUrl": "https://data-us.cometchat.io/23965108c9b89ad2/media/1704380186_864562419_ab59586ed5ab5f89d2c960457ceee249.ics", - "availability": { - "friday": [ - { - "to": "2359", - "from": "0000" - } - ], - "monday": [ - { - "to": "1700", - "from": "0600" - } - ], - "tuesday": [ - { - "to": "1400", - "from": "1000" - }, - { - "to": "2000", - "from": "1700" - } - ], - "thursday": [ - { - "to": "2359", - "from": "0000" - } - ], - "wednesday": [ - { - "to": "0800", - "from": "0600" - }, - { - "to": "1700", - "from": "1200" - } - ] - }, - "timezoneCode": "Asia/Kolkata", - "duration": 60, - "scheduleElement": { - "action": { - "url": "https://802bba5ae13a7.api-us.cometchat-staging.com/v3.0/messages", - "actionType": "apiAction", - "method": "post", - "dataKey": "", - "headers": { - "accept": "application/json", - "apiKey": "62a32b5140e6b630dab38e2e690d88de9c69d416", - "onBehalfOf": "suryansh1", - "content-type": "application/json" - }, - "payload": { - "data": { - "text": "Meeting Scheduled Successfully!" - }, - "type": "text", - "category": "message", - "receiver": "demo1", - "receiverType": "group" - } - }, - "elementId": "1", - "buttonText": "Schedule", - "elementType": "button", - "disableAfterInteracted": true - }, - "goalCompletionText": "Your meeting has been Scheduled", - "dateRangeStart": "2024-06-09", - "dateRangeEnd": "2024-06-09" - } - } - } - }, "text-message": { "summary": "Text Message example", "value": { diff --git a/data-import-apis.json b/data-import-apis.json index 6ea96973..be8115a1 100644 --- a/data-import-apis.json +++ b/data-import-apis.json @@ -5537,354 +5537,6 @@ } }, "examples": { - "form-interactive": { - "summary": "Interactive form example", - "value": { - "receiverType": "user", - "data": { - "interactionGoal": { - "type": "allOf", - "elementIds": [ - "element8" - ] - }, - "allowSenderInteraction": true, - "interactiveData": { - "title": "Form Title", - "formFields": [ - { - "elementType": "textInput", - "elementId": "element1", - "defaultValue": "vivek", - "label": "Name", - "optional": false, - "maxLines": 1, - "placeholder": { - "text": "write your name here" - } - }, - { - "elementType": "textInput", - "elementId": "element2", - "label": "Last Name", - "optional": false, - "maxLines": 1 - }, - { - "elementType": "textInput", - "elementId": "element3", - "label": "Address", - "optional": false, - "maxLines": 5 - }, - { - "elementType": "dropdown", - "elementId": "element4", - "label": "Country", - "optional": false, - "defaultValue": "option1", - "options": [ - { - "value": "option1", - "label": "INDIA" - }, - { - "value": "option2", - "label": "AUSTRALIA" - } - ] - }, - { - "elementType": "checkbox", - "elementId": "element5", - "optional": true, - "label": "Services", - "options": [ - { - "value": "option1", - "label": "Garbage" - }, - { - "value": "option2", - "label": "Electricity Bill" - }, - { - "value": "option3", - "label": "Lift" - } - ], - "defaultValue": [ - "option1", - "option2" - ] - }, - { - "elementType": "singleSelect", - "elementId": "element6", - "optional": false, - "label": "Wing", - "defaultValue": "option1", - "options": [ - { - "value": "option1", - "label": "A Wing" - }, - { - "value": "option2", - "label": "B Wing" - } - ] - }, - { - "elementType": "button", - "elementId": "element9", - "buttonText": "About us", - "disableAfterInteracted": true, - "action": { - "actionType": "urlNavigation", - "url": "https://www.cometchat.com" - } - }, - { - "elementType": "dateTime", - "elementId": "element11", - "defaultValue": false, - "label": "Contact Number", - "optional": false, - "mode": "date", - "dateTimeFormat": "Y-m-d H:i:ss", - "timezoneCode": "Asia/Kolkata", - "from1": "2024-02-23T14:30", - "from": "2024-06-23", - "to": "2024-06-24", - "maxLines": 1, - "placeholder": { - "text": "Enter contact number" - } - } - ], - "submitElement": { - "elementType": "button", - "elementId": "element8", - "buttonText": "Submit", - "disableAfterInteracted": true, - "action": { - "actionType": "apiAction", - "url": "https://10893f2ae68f59.api-us.cometchat-staging.com/v3.0/messages", - "method": "POST", - "payload": { - "category": "message", - "type": "text", - "data": { - "text": "Thanks For filling the Form!" - }, - "receiver": "superhero2", - "receiverType": "user" - }, - "headers": { - "appId": "10893f2ae68f59", - "Content-Type": "application/json", - "apiKey": "5797f2d3d103d7d78f085eb46bfd14d5c45ddfdf", - "onBehalfOf": "superhero1" - }, - "dataKey": "CometChatData" - } - } - } - }, - "category": "interactive", - "type": "form", - "receiver": "superhero1", - "tags": [ - "tag1" - ] - } - }, - "card-interactive": { - "summary": "Interactive card example", - "value": { - "receiverType": "user", - "data": { - "interactionGoal": { - "type": "none" - }, - "allowSenderInteraction": true, - "interactiveData": { - "imageUrl": "https://upload.wikimedia.org/wikipedia/en/e/e1/Thomas_D._Baird_%28low-resolution%29.jpg", - "text": "Thanks For filling the Form!.\n\nWant to make your gifts more special? Now its easy with our personalized card messages!\n\nOur new feature lets you add a custom message on a beautifully designed card, making your gift-giving extra personal and memorable.\nWhether its for a birthday , anniversary , or just because , our card messages will express your feelings perfectly.\n\nTo start creating your own card message:\nChoose the gift\nWrite your heartfelt message\nWell print it on a high-quality card and include it with your gift\nAdd a touch of your own sentiments with our personalized card messages. Make every gift unforgettable. Start creating your card message today!\nVisit our website Website Link or download our app App Link.\n\nExpress more than just words with our Personalized Card Messages.Because its not just a gift, its your feelings.\n", - "cardActions": [ - { - "elementType": "button", - "elementId": "element8", - "buttonText": "Buy now", - "disableAfterInteracted": true, - "action": { - "actionType": "apiAction", - "url": "https://10893f2ae68f59.api-us.cometchat-staging.com/v3.0/messages", - "method": "POST", - "payload": { - "category": "message", - "type": "text", - "data": { - "text": "Thanks For filling the Form!" - }, - "receiver": "group_1695921003310", - "receiverType": "group" - }, - "headers": { - "appId": "10893f2ae68f59", - "Content-Type": "application/json", - "apiKey": "5797f2d3d103d7d78f085eb46bfd14d5c45ddfdf", - "onBehalfOf": "superhero1" - }, - "dataKey": "CometChatData" - } - }, - { - "elementType": "button", - "elementId": "element9", - "buttonText": "Navigate", - "disableAfterInteracted": true, - "action": { - "actionType": "urlNavigation", - "url": "https://www.cometchat.com" - } - }, - { - "elementType": "button", - "elementId": "element10", - "buttonText": "Submit", - "disableAfterInteracted": true, - "action": { - "actionType": "apiAction", - "url": "https://10893f2ae68f59.api-us.cometchat-staging.com/v3.0/messages", - "method": "POST", - "payload": { - "category": "message", - "type": "text", - "data": { - "text": "Thanks For filling the Form!" - }, - "receiver": "group_1695921003310", - "receiverType": "group" - }, - "headers": { - "appId": "10893f2ae68f59", - "Content-Type": "application/json", - "apiKey": "5797f2d3d103d7d78f085eb46bfd14d5c45ddfdf", - "onBehalfOf": "superhero1" - }, - "dataKey": "CometChatData" - } - } - ] - } - }, - "category": "interactive", - "type": "card", - "receiver": "superhero1", - "tags": [ - "tag1" - ] - } - }, - "scheduler-interactive": { - "summary": "Interactive scheduler example", - "value": { - "receiverType": "user", - "receiver": "superhero2", - "category": "interactive", - "type": "scheduler", - "data": { - "receiverType": "user", - "receiver": "superhero2", - "muid": "16Jan3:41423PM", - "interactionGoal": { - "type": "anyAction", - "elementIds": [] - }, - "allowSenderInteraction": false, - "interactiveData": { - "title": "Meet with Dr. Jacob", - "avatarUrl": "https://data-us.cometchat.io/assets/images/avatars/ironman.png", - "bufferTime": 15, - "icsFileUrl": "https://data-us.cometchat.io/23965108c9b89ad2/media/1704380186_864562419_ab59586ed5ab5f89d2c960457ceee249.ics", - "availability": { - "friday": [ - { - "to": "2359", - "from": "0000" - } - ], - "monday": [ - { - "to": "1700", - "from": "0600" - } - ], - "tuesday": [ - { - "to": "1400", - "from": "1000" - }, - { - "to": "2000", - "from": "1700" - } - ], - "thursday": [ - { - "to": "2359", - "from": "0000" - } - ], - "wednesday": [ - { - "to": "0800", - "from": "0600" - }, - { - "to": "1700", - "from": "1200" - } - ] - }, - "timezoneCode": "Asia/Kolkata", - "duration": 60, - "scheduleElement": { - "action": { - "url": "https://802bba5ae13a7.api-us.cometchat-staging.com/v3.0/messages", - "actionType": "apiAction", - "method": "post", - "dataKey": "", - "headers": { - "accept": "application/json", - "apiKey": "62a32b5140e6b630dab38e2e690d88de9c69d416", - "onBehalfOf": "suryansh1", - "content-type": "application/json" - }, - "payload": { - "data": { - "text": "Meeting Scheduled Successfully!" - }, - "type": "text", - "category": "message", - "receiver": "demo1", - "receiverType": "group" - } - }, - "elementId": "1", - "buttonText": "Schedule", - "elementType": "button", - "disableAfterInteracted": true - }, - "goalCompletionText": "Your meeting has been Scheduled", - "dateRangeStart": "2024-06-09", - "dateRangeEnd": "2024-06-09" - } - } - } - }, "text-message": { "summary": "Text Message example", "value": { From 8f0aa6aaa8881948f7090ff9160aab33a61dff26 Mon Sep 17 00:00:00 2001 From: "sachin.cometchat" Date: Tue, 23 Dec 2025 18:55:23 +0530 Subject: [PATCH 03/16] Added the examples for send message --- chat-apis.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chat-apis.json b/chat-apis.json index 240a2463..45a4ae89 100644 --- a/chat-apis.json +++ b/chat-apis.json @@ -19706,7 +19706,7 @@ ] }, "category": "message", - "type": "image", + "type": "text", "receiver": "cometchat-uid-2" } } @@ -19790,4 +19790,4 @@ "description": "The REST collections for Moderations." } ] -} \ No newline at end of file +} From 3b9b39d294fe2453f6a8559d7669d8f92e6da9fc Mon Sep 17 00:00:00 2001 From: "sachin.cometchat" Date: Tue, 23 Dec 2025 18:55:47 +0530 Subject: [PATCH 04/16] Added the examples for send message --- chat-apis.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chat-apis.json b/chat-apis.json index 45a4ae89..986a8de3 100644 --- a/chat-apis.json +++ b/chat-apis.json @@ -19706,7 +19706,7 @@ ] }, "category": "message", - "type": "text", + "type": "image", "receiver": "cometchat-uid-2" } } From e1167656d053058b655e965eedeaea6762ca3898 Mon Sep 17 00:00:00 2001 From: "sachin.cometchat" Date: Tue, 23 Dec 2025 19:26:08 +0530 Subject: [PATCH 05/16] Added the examples for send message --- chat-apis.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chat-apis.json b/chat-apis.json index 986a8de3..145b9cd9 100644 --- a/chat-apis.json +++ b/chat-apis.json @@ -19705,7 +19705,7 @@ } ] }, - "category": "message", + "category": "message1", "type": "image", "receiver": "cometchat-uid-2" } From 270a4c9c843a87b435f0b4947c3319d16594c5b0 Mon Sep 17 00:00:00 2001 From: "sachin.cometchat" Date: Tue, 23 Dec 2025 19:40:53 +0530 Subject: [PATCH 06/16] Added the examples for send message --- chat-apis.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chat-apis.json b/chat-apis.json index 145b9cd9..240a2463 100644 --- a/chat-apis.json +++ b/chat-apis.json @@ -19705,7 +19705,7 @@ } ] }, - "category": "message1", + "category": "message", "type": "image", "receiver": "cometchat-uid-2" } @@ -19790,4 +19790,4 @@ "description": "The REST collections for Moderations." } ] -} +} \ No newline at end of file From af99a11e0dda94789504568001ee3bfb68c6783e Mon Sep 17 00:00:00 2001 From: "sachin.cometchat" Date: Tue, 23 Dec 2025 19:53:27 +0530 Subject: [PATCH 07/16] Added the examples for send message --- chat-apis.json | 348 ------------------------------------------------- 1 file changed, 348 deletions(-) diff --git a/chat-apis.json b/chat-apis.json index 240a2463..b155c61e 100644 --- a/chat-apis.json +++ b/chat-apis.json @@ -1781,354 +1781,6 @@ }, "Media Message": { "$ref": "#/components/examples/media-message" - }, - "form-interactive": { - "summary": "Interactive form example", - "value": { - "receiverType": "user", - "data": { - "interactionGoal": { - "type": "allOf", - "elementIds": [ - "element8" - ] - }, - "allowSenderInteraction": true, - "interactiveData": { - "title": "Form Title", - "formFields": [ - { - "elementType": "textInput", - "elementId": "element1", - "defaultValue": "vivek", - "label": "Name", - "optional": false, - "maxLines": 1, - "placeholder": { - "text": "write your name here" - } - }, - { - "elementType": "textInput", - "elementId": "element2", - "label": "Last Name", - "optional": false, - "maxLines": 1 - }, - { - "elementType": "textInput", - "elementId": "element3", - "label": "Address", - "optional": false, - "maxLines": 5 - }, - { - "elementType": "dropdown", - "elementId": "element4", - "label": "Country", - "optional": false, - "defaultValue": "option1", - "options": [ - { - "value": "option1", - "label": "INDIA" - }, - { - "value": "option2", - "label": "AUSTRALIA" - } - ] - }, - { - "elementType": "checkbox", - "elementId": "element5", - "optional": true, - "label": "Services", - "options": [ - { - "value": "option1", - "label": "Garbage" - }, - { - "value": "option2", - "label": "Electricity Bill" - }, - { - "value": "option3", - "label": "Lift" - } - ], - "defaultValue": [ - "option1", - "option2" - ] - }, - { - "elementType": "singleSelect", - "elementId": "element6", - "optional": false, - "label": "Wing", - "defaultValue": "option1", - "options": [ - { - "value": "option1", - "label": "A Wing" - }, - { - "value": "option2", - "label": "B Wing" - } - ] - }, - { - "elementType": "button", - "elementId": "element9", - "buttonText": "About us", - "disableAfterInteracted": true, - "action": { - "actionType": "urlNavigation", - "url": "https://www.cometchat.com" - } - }, - { - "elementType": "dateTime", - "elementId": "element11", - "defaultValue": false, - "label": "Contact Number", - "optional": false, - "mode": "date", - "dateTimeFormat": "Y-m-d H:i:ss", - "timezoneCode": "Asia/Kolkata", - "from1": "2024-02-23T14:30", - "from": "2024-06-23", - "to": "2024-06-24", - "maxLines": 1, - "placeholder": { - "text": "Enter contact number" - } - } - ], - "submitElement": { - "elementType": "button", - "elementId": "element8", - "buttonText": "Submit", - "disableAfterInteracted": true, - "action": { - "actionType": "apiAction", - "url": "https://10893f2ae68f59.api-us.cometchat-staging.com/v3.0/messages", - "method": "POST", - "payload": { - "category": "message", - "type": "text", - "data": { - "text": "Thanks For filling the Form!" - }, - "receiver": "superhero2", - "receiverType": "user" - }, - "headers": { - "appId": "10893f2ae68f59", - "Content-Type": "application/json", - "apiKey": "5797f2d3d103d7d78f085eb46bfd14d5c45ddfdf", - "onBehalfOf": "superhero1" - }, - "dataKey": "CometChatData" - } - } - } - }, - "category": "interactive", - "type": "form", - "receiver": "superhero1", - "tags": [ - "tag1" - ] - } - }, - "card-interactive": { - "summary": "Interactive card example", - "value": { - "receiverType": "user", - "data": { - "interactionGoal": { - "type": "none" - }, - "allowSenderInteraction": true, - "interactiveData": { - "imageUrl": "https://upload.wikimedia.org/wikipedia/en/e/e1/Thomas_D._Baird_%28low-resolution%29.jpg", - "text": "Thanks For filling the Form!.\n\nWant to make your gifts more special? Now its easy with our personalized card messages!\n\nOur new feature lets you add a custom message on a beautifully designed card, making your gift-giving extra personal and memorable.\nWhether its for a birthday , anniversary , or just because , our card messages will express your feelings perfectly.\n\nTo start creating your own card message:\nChoose the gift\nWrite your heartfelt message\nWell print it on a high-quality card and include it with your gift\nAdd a touch of your own sentiments with our personalized card messages. Make every gift unforgettable. Start creating your card message today!\nVisit our website Website Link or download our app App Link.\n\nExpress more than just words with our Personalized Card Messages.Because its not just a gift, its your feelings.\n", - "cardActions": [ - { - "elementType": "button", - "elementId": "element8", - "buttonText": "Buy now", - "disableAfterInteracted": true, - "action": { - "actionType": "apiAction", - "url": "https://10893f2ae68f59.api-us.cometchat-staging.com/v3.0/messages", - "method": "POST", - "payload": { - "category": "message", - "type": "text", - "data": { - "text": "Thanks For filling the Form!" - }, - "receiver": "group_1695921003310", - "receiverType": "group" - }, - "headers": { - "appId": "10893f2ae68f59", - "Content-Type": "application\\/json", - "apiKey": "5797f2d3d103d7d78f085eb46bfd14d5c45ddfdf", - "onBehalfOf": "superhero1" - }, - "dataKey": "CometChatData" - } - }, - { - "elementType": "button", - "elementId": "element9", - "buttonText": "Navigate", - "disableAfterInteracted": true, - "action": { - "actionType": "urlNavigation", - "url": "https://www.cometchat.com" - } - }, - { - "elementType": "button", - "elementId": "element10", - "buttonText": "Submit", - "disableAfterInteracted": true, - "action": { - "actionType": "apiAction", - "url": "https://10893f2ae68f59.api-us.cometchat-staging.com/v3.0/messages", - "method": "POST", - "payload": { - "category": "message", - "type": "text", - "data": { - "text": "Thanks For filling the Form!" - }, - "receiver": "group_1695921003310", - "receiverType": "group" - }, - "headers": { - "appId": "10893f2ae68f59", - "Content-Type": "application/json", - "apiKey": "5797f2d3d103d7d78f085eb46bfd14d5c45ddfdf", - "onBehalfOf": "superhero1" - }, - "dataKey": "CometChatData" - } - } - ] - } - }, - "category": "interactive", - "type": "card", - "receiver": "superhero1", - "tags": [ - "tag1" - ] - } - }, - "scheduler-interactive": { - "summary": "Interactive scheduler example", - "value": { - "receiverType": "user", - "receiver": "superhero2", - "category": "interactive", - "type": "scheduler", - "data": { - "receiverType": "user", - "receiver": "superhero2", - "muid": "16Jan3:41423PM", - "interactionGoal": { - "type": "anyAction", - "elementIds": [] - }, - "allowSenderInteraction": false, - "interactiveData": { - "title": "Meet with Dr. Jacob", - "avatarUrl": "https: //data-us.cometchat.io/assets/images/avatars/ironman.png", - "bufferTime": 15, - "icsFileUrl": "https://data-us.cometchat.io/23965108c9b89ad2/media/1704380186_864562419_ab59586ed5ab5f89d2c960457ceee249.ics", - "availability": { - "friday": [ - { - "to": "2359", - "from": "0000" - } - ], - "monday": [ - { - "to": "1700", - "from": "0600" - } - ], - "tuesday": [ - { - "to": "1400", - "from": "1000" - }, - { - "to": "2000", - "from": "1700" - } - ], - "thursday": [ - { - "to": "2359", - "from": "0000" - } - ], - "wednesday": [ - { - "to": "0800", - "from": "0600" - }, - { - "to": "1700", - "from": "1200" - } - ] - }, - "timezoneCode": "Asia/Kolkata", - "duration": 60, - "scheduleElement": { - "action": { - "url": "https://802bba5ae13a7.api-us.cometchat-staging.com/v3.0/messages", - "actionType": "apiAction", - "method": "post", - "dataKey": "", - "headers": { - "accept": "application/json", - "apiKey": "62a32b5140e6b630dab38e2e690d88de9c69d416", - "onBehalfOf": "suryansh1", - "content-type": "application/json" - }, - "payload": { - "data": { - "text": "Meeting Scheduled Successfully!" - }, - "type": "text", - "category": "message", - "receiver": "demo1", - "receiverType": "group" - } - }, - "elementId": "1", - "buttonText": "Schedule", - "elementType": "button", - "disableAfterInteracted": true - }, - "goalCompletionText": "Your meeting has been Scheduled", - "dateRangeStart": "2024-06-09", - "dateRangeEnd": "2024-06-09" - } - } - } } } } From 7d169f7ddf9603c2fde73ed24b7f9da1420f03d2 Mon Sep 17 00:00:00 2001 From: "sachin.cometchat" Date: Wed, 24 Dec 2025 10:30:29 +0530 Subject: [PATCH 08/16] Added the examples for send message --- chat-apis.json | 2 +- data-import-apis.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/chat-apis.json b/chat-apis.json index b155c61e..e93f7c14 100644 --- a/chat-apis.json +++ b/chat-apis.json @@ -19353,7 +19353,7 @@ "name": "ironman.png", "extension": "png", "mimeType": "image/png", - "url": "https://data-eu.cometchat.io/assets/images/avatars/ironman.png" + "url": "https: //files-.cometchat.io//media/.png?fat=" } ] }, diff --git a/data-import-apis.json b/data-import-apis.json index be8115a1..98f9ea67 100644 --- a/data-import-apis.json +++ b/data-import-apis.json @@ -5577,7 +5577,7 @@ "name": "ironman.png", "extension": "png", "mimeType": "image/png", - "url": "https://data-eu.cometchat.io/assets/images/avatars/ironman.png" + "url": "https: //files-.cometchat.io//media/.png?fat=" } ] }, From 769bea6ad8dbc6162380a8362088153d4e00f1d4 Mon Sep 17 00:00:00 2001 From: "sachin.cometchat" Date: Wed, 24 Dec 2025 10:39:02 +0530 Subject: [PATCH 09/16] Added the examples for send message --- chat-apis.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/chat-apis.json b/chat-apis.json index e93f7c14..dd54b25b 100644 --- a/chat-apis.json +++ b/chat-apis.json @@ -1776,11 +1776,11 @@ "Text Message": { "$ref": "#/components/examples/text-message" }, - "Custom Message": { - "$ref": "#/components/examples/custom-message" - }, "Media Message": { "$ref": "#/components/examples/media-message" + }, + "Custom Message": { + "$ref": "#/components/examples/custom-message" } } } From d6b483c4eff23f2542c51c4edfe9165befbab3b3 Mon Sep 17 00:00:00 2001 From: "sachin.cometchat" Date: Mon, 29 Dec 2025 13:29:37 +0530 Subject: [PATCH 10/16] Modified the tab names --- chat-apis.json | 3 +++ data-import-apis.json | 3 +++ 2 files changed, 6 insertions(+) diff --git a/chat-apis.json b/chat-apis.json index dd54b25b..ba7e2557 100644 --- a/chat-apis.json +++ b/chat-apis.json @@ -16620,6 +16620,7 @@ "type": "object" }, "customCategorySchema": { + "title": "custom", "properties": { "receiver": { "description": "The receiver of the message.", @@ -17391,6 +17392,7 @@ "type": "object" }, "interactiveCategorySchema": { + "title": "interactive", "properties": { "receiver": { "description": "The receiver of the message.", @@ -17647,6 +17649,7 @@ "type": "object" }, "messageCategorySchema": { + "title": "message", "properties": { "receiver": { "description": "The receiver of the message.", diff --git a/data-import-apis.json b/data-import-apis.json index 98f9ea67..6e1f3458 100644 --- a/data-import-apis.json +++ b/data-import-apis.json @@ -2844,6 +2844,7 @@ "type": "object" }, "customCategorySchema": { + "title": "custom", "properties": { "receiver": { "description": "The receiver of the message.", @@ -3615,6 +3616,7 @@ "type": "object" }, "interactiveCategorySchema": { + "title": "interactive", "properties": { "receiver": { "description": "The receiver of the message.", @@ -3871,6 +3873,7 @@ "type": "object" }, "messageCategorySchema": { + "title": "message", "properties": { "receiver": { "description": "The receiver of the message.", From 94f14aaa70cab962d56de46dd73fd23072c85299 Mon Sep 17 00:00:00 2001 From: Pranav Kamble Date: Mon, 12 Jan 2026 11:13:45 +0530 Subject: [PATCH 11/16] send message dropdown issue fixed --- chat-apis.json | 350 ++++++------------------------------------ data-import-apis.json | 295 +---------------------------------- 2 files changed, 51 insertions(+), 594 deletions(-) diff --git a/chat-apis.json b/chat-apis.json index ba7e2557..a51668f0 100644 --- a/chat-apis.json +++ b/chat-apis.json @@ -1756,7 +1756,6 @@ "propertyName": "category", "mapping": { "message": "#/components/schemas/messageCategorySchema", - "interactive": "#/components/schemas/interactiveCategorySchema", "custom": "#/components/schemas/customCategorySchema" } }, @@ -1766,21 +1765,57 @@ }, { "$ref": "#/components/schemas/customCategorySchema" - }, - { - "$ref": "#/components/schemas/interactiveCategorySchema" } ] }, "examples": { - "Text Message": { - "$ref": "#/components/examples/text-message" + "text-message": { + "summary": "Text message example", + "value": { + "receiverType": "user", + "receiver": "superhero1", + "category": "message", + "type": "text", + "data": { + "text": "Hello, this is a text message!" + } + } }, - "Media Message": { - "$ref": "#/components/examples/media-message" + "media-message": { + "summary": "Media message example", + "value": { + "receiverType": "user", + "receiver": "superhero1", + "category": "message", + "type": "image", + "data": { + "attachments": [ + { + "url": "https://example.com/image.jpg", + "name": "image.jpg", + "mimeType": "image/jpeg", + "extension": "jpg", + "size": "1024" + } + ] + } + } }, - "Custom Message": { - "$ref": "#/components/examples/custom-message" + "custom-message": { + "summary": "Custom message example", + "value": { + "receiverType": "user", + "receiver": "superhero1", + "category": "custom", + "type": "location", + "data": { + "customData": { + "latitude": "37.7749", + "longitude": "-122.4194", + "address": "San Francisco, CA" + } + } + } } } } @@ -16620,7 +16655,6 @@ "type": "object" }, "customCategorySchema": { - "title": "custom", "properties": { "receiver": { "description": "The receiver of the message.", @@ -16641,18 +16675,13 @@ "category": { "description": "Category of the message. The available categories is custom.", "type": "string", - "default": "custom", "enum": [ "custom" ] }, "quotedMessageId": { "description": "ID of the message being quoted.\nIf provided, the send message response will include a `quotedMessage` node\nin the response containing the referenced message object.", - "type": "string", - "default": "message", - "enum": [ - "message" - ] + "type": "string" }, "type": { "description": "Type of the message.", @@ -17391,233 +17420,6 @@ }, "type": "object" }, - "interactiveCategorySchema": { - "title": "interactive", - "properties": { - "receiver": { - "description": "The receiver of the message.", - "type": "string" - }, - "muid": { - "description": "The muid will be a unique Identifier of the message.", - "type": "string" - }, - "receiverType": { - "description": "The receiverType of the message. either user or group", - "type": "string", - "enum": [ - "user", - "group" - ] - }, - "category": { - "description": "Category of the message. The available categories is interactive.", - "type": "string", - "default": "interactive", - "enum": [ - "interactive" - ] - }, - "type": { - "description": "Type of the message. The available values are card, form and customInteractive.", - "type": "string", - "default": "card", - "enum": [ - "card", - "form", - "customInteractive", - "scheduler" - ] - }, - "data": { - "description": "JSON containing message attributes. Please select the appropriate schema based on the type property.", - "type": "object", - "oneOf": [ - { - "$ref": "#/components/schemas/interactionFormSchema" - }, - { - "$ref": "#/components/schemas/interactionCardSchema" - }, - { - "$ref": "#/components/schemas/SchedulerSchema" - }, - { - "$ref": "#/components/schemas/customInteractiveSchema" - } - ] - }, - "multipleReceivers": { - "description": "JSON containing array of UIDs and GUID for whom the message must be sent. Format for multiple receivers - {\"uids\": [\"uid1\",\"uid2\"], \"guids\":[\"guid1\"]}", - "properties": { - "uids": { - "type": "array", - "items": { - "type": "string" - } - }, - "guids": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "type": "object" - }, - "tags": { - "description": "A list of tags to identify specific messages.", - "type": "array", - "items": { - "type": "string" - } - } - }, - "type": "object", - "example": { - "receiverType": "user", - "data": { - "interactionGoal": { - "type": "allOf", - "elementIds": [ - "element8" - ] - }, - "allowSenderInteraction": true, - "interactiveData": { - "title": "Form Title", - "formFields": [ - { - "elementType": "textInput", - "elementId": "element1", - "defaultValue": "vivek", - "label": "Name", - "optional": false, - "maxLines": 1, - "placeholder": { - "text": "write your name here" - } - }, - { - "elementType": "textInput", - "elementId": "element2", - "label": "Last Name", - "optional": false, - "maxLines": 1 - }, - { - "elementType": "textInput", - "elementId": "element3", - "label": "Address", - "optional": false, - "maxLines": 5 - }, - { - "elementType": "dropdown", - "elementId": "element4", - "label": "Country", - "optional": false, - "defaultValue": "option1", - "options": [ - { - "value": "option1", - "label": "INDIA" - }, - { - "value": "option2", - "label": "AUSTRALIA" - } - ] - }, - { - "elementType": "checkbox", - "elementId": "element5", - "optional": true, - "label": "Services", - "options": [ - { - "value": "option1", - "label": "Garbage" - }, - { - "value": "option2", - "label": "Electricity Bill" - }, - { - "value": "option3", - "label": "Lift" - } - ], - "defaultValue": [ - "option1", - "option2" - ] - }, - { - "elementType": "singleSelect", - "elementId": "element6", - "optional": false, - "label": "Wing", - "defaultValue": "option1", - "options": [ - { - "value": "option1", - "label": "A Wing" - }, - { - "value": "option2", - "label": "B Wing" - } - ] - }, - { - "elementType": "button", - "elementId": "element9", - "buttonText": "About us", - "disableAfterInteracted": true, - "action": { - "actionType": "urlNavigation", - "url": "https://www.cometchat.com" - } - } - ], - "submitElement": { - "elementType": "button", - "elementId": "element8", - "buttonText": "Submit", - "disableAfterInteracted": true, - "action": { - "actionType": "apiAction", - "url": "https://10893f2ae68f59.api-us.cometchat-staging.com/v3.0/messages", - "method": "POST", - "payload": { - "category": "message", - "type": "text", - "data": { - "text": "Thanks For filling the Form!" - }, - "receiver": "superhero2", - "receiverType": "user" - }, - "headers": { - "appId": "10893f2ae68f59", - "Content-Type": "application/json", - "apiKey": "5797f2d3d103d7d78f085eb46bfd14d5c45ddfdf", - "onBehalfOf": "superhero1" - }, - "dataKey": "CometChatData" - } - } - } - }, - "category": "interactive", - "type": "form", - "receiver": "superhero1", - "tags": [ - "tag1" - ] - } - }, "interactiveMessageSchema": { "properties": { "current": { @@ -17649,7 +17451,6 @@ "type": "object" }, "messageCategorySchema": { - "title": "message", "properties": { "receiver": { "description": "The receiver of the message.", @@ -17670,7 +17471,6 @@ "category": { "description": "Category of the message. The available categories are message and custom.", "type": "string", - "default": "message", "enum": [ "message" ] @@ -17680,15 +17480,12 @@ "type": "string" }, "type": { - "description": "Type of the message. The available values are text, image, file, audio, video.", + "description": "Type of the message. The available values are text, image, location.", "type": "string", - "default": "text", "enum": [ "text", "image", - "file", - "audio", - "video" + "location" ] }, "data": { @@ -19315,57 +19112,6 @@ } } }, - "examples": { - "text-message": { - "summary": "Text Message example", - "value": { - "receiver": "cometchat-uid-2", - "receiverType": "user", - "category": "message", - "type": "text", - "data": { - "text": "Hello" - } - } - }, - "custom-message": { - "summary": "Custom Message example", - "value": { - "receiverType": "user", - "data": { - "customData": { - "text": "Hello there!" - } - }, - "category": "custom", - "type": "text", - "receiver": "cometchat-uid-2", - "tags": [ - "tag1" - ] - } - }, - "media-message": { - "summary": "Media Message example", - "value": { - "receiverType": "user", - "data": { - "text": "Hello there!", - "attachments": [ - { - "name": "ironman.png", - "extension": "png", - "mimeType": "image/png", - "url": "https: //files-.cometchat.io//media/.png?fat=" - } - ] - }, - "category": "message", - "type": "image", - "receiver": "cometchat-uid-2" - } - } - }, "securitySchemes": { "apiKey": { "type": "apiKey", diff --git a/data-import-apis.json b/data-import-apis.json index 6e1f3458..1357670b 100644 --- a/data-import-apis.json +++ b/data-import-apis.json @@ -2844,7 +2844,6 @@ "type": "object" }, "customCategorySchema": { - "title": "custom", "properties": { "receiver": { "description": "The receiver of the message.", @@ -2865,18 +2864,13 @@ "category": { "description": "Category of the message. The available categories is custom.", "type": "string", - "default": "custom", "enum": [ "custom" ] }, "quotedMessageId": { "description": "ID of the message being quoted.\nIf provided, the send message response will include a `quotedMessage` node\nin the response containing the referenced message object.", - "type": "string", - "default": "message", - "enum": [ - "message" - ] + "type": "string" }, "type": { "description": "Type of the message.", @@ -3615,233 +3609,6 @@ }, "type": "object" }, - "interactiveCategorySchema": { - "title": "interactive", - "properties": { - "receiver": { - "description": "The receiver of the message.", - "type": "string" - }, - "muid": { - "description": "The muid will be a unique Identifier of the message.", - "type": "string" - }, - "receiverType": { - "description": "The receiverType of the message. either user or group", - "type": "string", - "enum": [ - "user", - "group" - ] - }, - "category": { - "description": "Category of the message. The available categories is interactive.", - "type": "string", - "default": "interactive", - "enum": [ - "interactive" - ] - }, - "type": { - "description": "Type of the message. The available values are card, form and customInteractive.", - "type": "string", - "default": "card", - "enum": [ - "card", - "form", - "customInteractive", - "scheduler" - ] - }, - "data": { - "description": "JSON containing message attributes. Please select the appropriate schema based on the type property.", - "type": "object", - "oneOf": [ - { - "$ref": "#/components/schemas/interactionFormSchema" - }, - { - "$ref": "#/components/schemas/interactionCardSchema" - }, - { - "$ref": "#/components/schemas/SchedulerSchema" - }, - { - "$ref": "#/components/schemas/customInteractiveSchema" - } - ] - }, - "multipleReceivers": { - "description": "JSON containing array of UIDs and GUID for whom the message must be sent. Format for multiple receivers - {\"uids\": [\"uid1\",\"uid2\"], \"guids\":[\"guid1\"]}", - "properties": { - "uids": { - "type": "array", - "items": { - "type": "string" - } - }, - "guids": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "type": "object" - }, - "tags": { - "description": "A list of tags to identify specific messages.", - "type": "array", - "items": { - "type": "string" - } - } - }, - "type": "object", - "example": { - "receiverType": "user", - "data": { - "interactionGoal": { - "type": "allOf", - "elementIds": [ - "element8" - ] - }, - "allowSenderInteraction": true, - "interactiveData": { - "title": "Form Title", - "formFields": [ - { - "elementType": "textInput", - "elementId": "element1", - "defaultValue": "vivek", - "label": "Name", - "optional": false, - "maxLines": 1, - "placeholder": { - "text": "write your name here" - } - }, - { - "elementType": "textInput", - "elementId": "element2", - "label": "Last Name", - "optional": false, - "maxLines": 1 - }, - { - "elementType": "textInput", - "elementId": "element3", - "label": "Address", - "optional": false, - "maxLines": 5 - }, - { - "elementType": "dropdown", - "elementId": "element4", - "label": "Country", - "optional": false, - "defaultValue": "option1", - "options": [ - { - "value": "option1", - "label": "INDIA" - }, - { - "value": "option2", - "label": "AUSTRALIA" - } - ] - }, - { - "elementType": "checkbox", - "elementId": "element5", - "optional": true, - "label": "Services", - "options": [ - { - "value": "option1", - "label": "Garbage" - }, - { - "value": "option2", - "label": "Electricity Bill" - }, - { - "value": "option3", - "label": "Lift" - } - ], - "defaultValue": [ - "option1", - "option2" - ] - }, - { - "elementType": "singleSelect", - "elementId": "element6", - "optional": false, - "label": "Wing", - "defaultValue": "option1", - "options": [ - { - "value": "option1", - "label": "A Wing" - }, - { - "value": "option2", - "label": "B Wing" - } - ] - }, - { - "elementType": "button", - "elementId": "element9", - "buttonText": "About us", - "disableAfterInteracted": true, - "action": { - "actionType": "urlNavigation", - "url": "https://www.cometchat.com" - } - } - ], - "submitElement": { - "elementType": "button", - "elementId": "element8", - "buttonText": "Submit", - "disableAfterInteracted": true, - "action": { - "actionType": "apiAction", - "url": "https://10893f2ae68f59.api-us.cometchat-staging.com/v3.0/messages", - "method": "POST", - "payload": { - "category": "message", - "type": "text", - "data": { - "text": "Thanks For filling the Form!" - }, - "receiver": "superhero2", - "receiverType": "user" - }, - "headers": { - "appId": "10893f2ae68f59", - "Content-Type": "application/json", - "apiKey": "5797f2d3d103d7d78f085eb46bfd14d5c45ddfdf", - "onBehalfOf": "superhero1" - }, - "dataKey": "CometChatData" - } - } - } - }, - "category": "interactive", - "type": "form", - "receiver": "superhero1", - "tags": [ - "tag1" - ] - } - }, "interactiveMessageSchema": { "properties": { "current": { @@ -3873,7 +3640,6 @@ "type": "object" }, "messageCategorySchema": { - "title": "message", "properties": { "receiver": { "description": "The receiver of the message.", @@ -3894,7 +3660,6 @@ "category": { "description": "Category of the message. The available categories are message and custom.", "type": "string", - "default": "message", "enum": [ "message" ] @@ -3904,15 +3669,12 @@ "type": "string" }, "type": { - "description": "Type of the message. The available values are text, image, file, audio, video.", + "description": "Type of the message. The available values are text, image, location.", "type": "string", - "default": "text", "enum": [ "text", "image", - "file", - "audio", - "video" + "location" ] }, "data": { @@ -5539,57 +5301,6 @@ } } }, - "examples": { - "text-message": { - "summary": "Text Message example", - "value": { - "receiver": "cometchat-uid-2", - "receiverType": "user", - "category": "message", - "type": "text", - "data": { - "text": "Hello" - } - } - }, - "custom-message": { - "summary": "Custom Message example", - "value": { - "receiverType": "user", - "data": { - "customData": { - "text": "Hello there!" - } - }, - "category": "custom", - "type": "text", - "receiver": "cometchat-uid-2", - "tags": [ - "tag1" - ] - } - }, - "media-message": { - "summary": "Media Message example", - "value": { - "receiverType": "user", - "data": { - "text": "Hello there!", - "attachments": [ - { - "name": "ironman.png", - "extension": "png", - "mimeType": "image/png", - "url": "https: //files-.cometchat.io//media/.png?fat=" - } - ] - }, - "category": "message", - "type": "image", - "receiver": "cometchat-uid-2" - } - } - }, "securitySchemes": { "apiKey": { "type": "apiKey", From ede3342e3230a8c5c9cdbbdd289e66a47cbbfe7d Mon Sep 17 00:00:00 2001 From: Pranav Kamble Date: Mon, 12 Jan 2026 15:50:49 +0530 Subject: [PATCH 12/16] Custom message type apprearing text updated --- chat-apis.json | 14 ++++++++------ data-import-apis.json | 8 ++++++-- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/chat-apis.json b/chat-apis.json index a51668f0..57585439 100644 --- a/chat-apis.json +++ b/chat-apis.json @@ -1807,12 +1807,10 @@ "receiverType": "user", "receiver": "superhero1", "category": "custom", - "type": "location", + "type": "customType", "data": { "customData": { - "latitude": "37.7749", - "longitude": "-122.4194", - "address": "San Francisco, CA" + "key": "value" } } } @@ -17480,12 +17478,16 @@ "type": "string" }, "type": { - "description": "Type of the message. The available values are text, image, location.", + "description": "Type of the message. The available values are text, image, location, place, coordinates, address, Custom Type.", "type": "string", "enum": [ "text", "image", - "location" + "location", + "place", + "coordinates", + "address", + "Custom Type" ] }, "data": { diff --git a/data-import-apis.json b/data-import-apis.json index 1357670b..68aec1e6 100644 --- a/data-import-apis.json +++ b/data-import-apis.json @@ -3669,12 +3669,16 @@ "type": "string" }, "type": { - "description": "Type of the message. The available values are text, image, location.", + "description": "Type of the message. The available values are text, image, location, place, coordinates, address, Custom Type.", "type": "string", "enum": [ "text", "image", - "location" + "location", + "place", + "coordinates", + "address", + "Custom Type" ] }, "data": { From 4be71ebf880b2d3a2ec55d290273c9f2b40453cf Mon Sep 17 00:00:00 2001 From: Pranav Kamble Date: Mon, 12 Jan 2026 16:03:00 +0530 Subject: [PATCH 13/16] Custom message type enum updated --- chat-apis.json | 11 +++++------ data-import-apis.json | 11 +++++------ 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/chat-apis.json b/chat-apis.json index 57585439..cdda3de4 100644 --- a/chat-apis.json +++ b/chat-apis.json @@ -17478,16 +17478,15 @@ "type": "string" }, "type": { - "description": "Type of the message. The available values are text, image, location, place, coordinates, address, Custom Type.", + "description": "Type of the message. The available values are text, image, audio, video, file, customType.", "type": "string", "enum": [ "text", "image", - "location", - "place", - "coordinates", - "address", - "Custom Type" + "audio", + "video", + "file", + "customType" ] }, "data": { diff --git a/data-import-apis.json b/data-import-apis.json index 68aec1e6..f5d521b7 100644 --- a/data-import-apis.json +++ b/data-import-apis.json @@ -3669,16 +3669,15 @@ "type": "string" }, "type": { - "description": "Type of the message. The available values are text, image, location, place, coordinates, address, Custom Type.", + "description": "Type of the message. The available values are text, image, audio, video, file, customType.", "type": "string", "enum": [ "text", "image", - "location", - "place", - "coordinates", - "address", - "Custom Type" + "audio", + "video", + "file", + "customType" ] }, "data": { From 0cea3533e393132f1498a76613c237fc5f9e4959 Mon Sep 17 00:00:00 2001 From: Pranav Kamble Date: Mon, 12 Jan 2026 16:08:22 +0530 Subject: [PATCH 14/16] Custom category enum updated --- chat-apis.json | 1 + data-import-apis.json | 1 + 2 files changed, 2 insertions(+) diff --git a/chat-apis.json b/chat-apis.json index cdda3de4..33d1f64c 100644 --- a/chat-apis.json +++ b/chat-apis.json @@ -16674,6 +16674,7 @@ "description": "Category of the message. The available categories is custom.", "type": "string", "enum": [ + "Message", "custom" ] }, diff --git a/data-import-apis.json b/data-import-apis.json index f5d521b7..8346e29c 100644 --- a/data-import-apis.json +++ b/data-import-apis.json @@ -2865,6 +2865,7 @@ "description": "Category of the message. The available categories is custom.", "type": "string", "enum": [ + "Message", "custom" ] }, From 785e83db543e81c235c1c448b971bfae3418305e Mon Sep 17 00:00:00 2001 From: Pranav Kamble Date: Mon, 12 Jan 2026 16:14:04 +0530 Subject: [PATCH 15/16] Custom category enum typo | category enum updated --- chat-apis.json | 5 +++-- data-import-apis.json | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/chat-apis.json b/chat-apis.json index 33d1f64c..daf480c0 100644 --- a/chat-apis.json +++ b/chat-apis.json @@ -16674,7 +16674,7 @@ "description": "Category of the message. The available categories is custom.", "type": "string", "enum": [ - "Message", + "message", "custom" ] }, @@ -17471,7 +17471,8 @@ "description": "Category of the message. The available categories are message and custom.", "type": "string", "enum": [ - "message" + "message", + "custom" ] }, "quotedMessageId": { diff --git a/data-import-apis.json b/data-import-apis.json index 8346e29c..debc8576 100644 --- a/data-import-apis.json +++ b/data-import-apis.json @@ -2865,7 +2865,7 @@ "description": "Category of the message. The available categories is custom.", "type": "string", "enum": [ - "Message", + "message", "custom" ] }, @@ -3662,7 +3662,8 @@ "description": "Category of the message. The available categories are message and custom.", "type": "string", "enum": [ - "message" + "message", + "custom" ] }, "quotedMessageId": { From 035cda6a1e3b40fbafc0caa458bf89443f2acbcd Mon Sep 17 00:00:00 2001 From: Pranav Kamble Date: Mon, 12 Jan 2026 19:49:57 +0530 Subject: [PATCH 16/16] review requested changes --- chat-apis.json | 45 ++++++------------------------------------- data-import-apis.json | 45 ++++++------------------------------------- 2 files changed, 12 insertions(+), 78 deletions(-) diff --git a/chat-apis.json b/chat-apis.json index daf480c0..729f83c8 100644 --- a/chat-apis.json +++ b/chat-apis.json @@ -16671,10 +16671,9 @@ ] }, "category": { - "description": "Category of the message. The available categories is custom.", + "description": "Category of the message. The available category is custom.", "type": "string", "enum": [ - "message", "custom" ] }, @@ -16683,7 +16682,7 @@ "type": "string" }, "type": { - "description": "Type of the message.", + "description": "Type of the message. custom category can have any user defined custom types", "type": "string" }, "data": { @@ -17419,36 +17418,6 @@ }, "type": "object" }, - "interactiveMessageSchema": { - "properties": { - "current": { - "properties": { - "limit": { - "type": "integer" - }, - "count": { - "type": "integer" - } - }, - "type": "object" - }, - "next": { - "properties": { - "affix": { - "type": "string" - }, - "sentAt": { - "type": "integer" - }, - "id": { - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, "messageCategorySchema": { "properties": { "receiver": { @@ -17468,11 +17437,10 @@ ] }, "category": { - "description": "Category of the message. The available categories are message and custom.", + "description": "Category of the message. The available category is message.", "type": "string", "enum": [ - "message", - "custom" + "message" ] }, "quotedMessageId": { @@ -17480,15 +17448,14 @@ "type": "string" }, "type": { - "description": "Type of the message. The available values are text, image, audio, video, file, customType.", + "description": "Type of the message. The available values are text, image, audio, video, file.", "type": "string", "enum": [ "text", "image", "audio", "video", - "file", - "customType" + "file" ] }, "data": { diff --git a/data-import-apis.json b/data-import-apis.json index debc8576..2ec774f5 100644 --- a/data-import-apis.json +++ b/data-import-apis.json @@ -2862,10 +2862,9 @@ ] }, "category": { - "description": "Category of the message. The available categories is custom.", + "description": "Category of the message. The available category is custom.", "type": "string", "enum": [ - "message", "custom" ] }, @@ -2874,7 +2873,7 @@ "type": "string" }, "type": { - "description": "Type of the message.", + "description": "Type of the message. custom category can have any user defined custom types", "type": "string" }, "data": { @@ -3610,36 +3609,6 @@ }, "type": "object" }, - "interactiveMessageSchema": { - "properties": { - "current": { - "properties": { - "limit": { - "type": "integer" - }, - "count": { - "type": "integer" - } - }, - "type": "object" - }, - "next": { - "properties": { - "affix": { - "type": "string" - }, - "sentAt": { - "type": "integer" - }, - "id": { - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, "messageCategorySchema": { "properties": { "receiver": { @@ -3659,11 +3628,10 @@ ] }, "category": { - "description": "Category of the message. The available categories are message and custom.", + "description": "Category of the message. The available category is message.", "type": "string", "enum": [ - "message", - "custom" + "message" ] }, "quotedMessageId": { @@ -3671,15 +3639,14 @@ "type": "string" }, "type": { - "description": "Type of the message. The available values are text, image, audio, video, file, customType.", + "description": "Type of the message. The available values are text, image, audio, video, file.", "type": "string", "enum": [ "text", "image", "audio", "video", - "file", - "customType" + "file" ] }, "data": {