From fc45938b3d7fc4b11e1bb4e7e0a8523b3fe253a4 Mon Sep 17 00:00:00 2001 From: "sachin.cometchat" Date: Tue, 23 Dec 2025 17:43:20 +0530 Subject: [PATCH 1/9] 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 2/9] 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 3/9] 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 4/9] 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 5/9] 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 6/9] 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 7/9] 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 8/9] 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 9/9] 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" } } }