Documentation Index
Fetch the complete documentation index at: https://cometchat-22654f5b-release-ios-chat-uikit-v5-1-2.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Messaging is one of the core features of CometChat. We’ve thoughtfully created APIs to help you send and retrieve message history.
- Users can send messages to a user or group.
- No limit to the number of unread messages per user.
- No limit to the number of unread messages per group.
- Soft deleted messages will be available in the database but permanently deleted messages will not be available.
Properties and constraints:
- The maximum File size that can be uploaded per message is 100MB.
- For a group with more than 300 members, the conversations and unread message counts are not updated.
- Delivery and read receipts will be sent for a group of up to 300 online users.
- Data is an arbitrary JSON structure. It accepts utf8mb4. It can have any user defined properties. but the below properties have meaning for CometChat: text, attachments, custome_data, metadata
Note: The attachment size is separate. Here, the attachment is only the attachment properties (such as URL, size, etc.). The size must not exceed 10KB for the data object.
- A message can have up to 25 tags with 100 characters per tag. The tags can be in any language. The character set must be UTF8mb4.
The following table lists the properties that the Message API supports.
| Parameters | Type | Description |
|---|
appId | String | Unique identifier for the app |
apiKey | String | Authentication key for the app |
region | String | Geographic region for the app |
baseUrl | String | Base URL for API requests |
Interactive Messages:
Element List:
The following mentioned elements will come inside formFields key mentioned above:
1. LabelElement
{
"elementType": "label",
"elementId": "",
"text": "Something to show"
}
| JSON Property | Type | Description |
|---|
| text | String | Required, text to be displayed in the label element |
2. TextInputElement
{
"elementType": "textInput",
"elementId": "",
"optional": false,
"label": "name",
"maxLines": 5,
"placeholder": {
"text": "Enter digits"
}
}
| JSON Property | Type | Description | Default Value |
|---|
| optional | boolean | Optional, will be validated when doing the submission based on this | true |
{
"elementType": "button",
"elementId": "",
"buttonText": "Press it",
"disableAfterInteracted": true
"action": {
"url" : ""
"method": ""
"payload": payload;
"headers":"headers";
"dataKey":"";
"type": "apiAction",
"url": "https//abc.com",
"payload": "",
"headers": ""
}
}
a. apiAction
{
"method": "",
"payload": {},
"headers": {},
"dataKey": "",
"actionType": "apiAction",
"url": "https//abc.com"
}
b. urlNavigation(both fields are mandatory)
{
"url": "<VALID URL>",
"actionType": "urlNavigation"
}
| JSON Property | Type | Description | Default Value |
|---|
| url | String | Required, | |
| actionType | String | required | urlNavigation |
c. DeepLinking(both fields are mandatory)
{
"url": "<VALID URL>",
"actionType": "deepLinkAction"
}
| JSON Property | Type | Description | Default Value |
|---|
| url | String | Required, | |
| actionType | String | required | deepLinkAction |
d. CustomAction (only actionType is mandatory):
{
"actionType": "customAction"
}
4. CheckboxElement
{
"elementType": "checkbox",
"elementId": "",
"optional": false,
"label": "Select multiple",
"defaultValue": [
"",
""
],
"options": [
{
"value": "option1",
"label": "This is option 1"
},
{
"value": "option1",
"label": "This is option 1"
}
]
}
| JSON Property | Type | Description | Default Value |
|---|
| optional | boolean | optional, | true |
| label | String | required | |
| defaultValue | Array of string | optional | |
5. DropdownElement/SpinnerElement(Android)
{
"elementType": "dropdown",
"elementId": "",
"optional": true,
"label": "Select multiple",
"defaultValue": "option1",
"options": [
{
"value": "option1",
"label": "This is option 1"
},
{
"value": "option1",
"label": "This is option 1"
}
]
}
{
"elementType": "radio",
"elementId": "",
"optional": false,
"label": "Select multiple",
"defaultValue": "option1",
"options": [
{
"value": "option1",
"label": "This is option 1"
},
{
"value": "option2",
"label": "This is option 1"
}
]
}
7. SingleSelectElement
{
"elementType": "singleSelect",
"elementId": "",
"optional": false,
"label": "Select multiple",
"defaultValue": "option1",
"options": [
{
"value": "option1",
"label": "This is option 1"
},
{
"value": "option2",
"label": "This is option 1"
}
]
}
8. DateTimeElement
{
"elementType": "dateTime",
"elementId": "element1",
"optional": false,
"label": "Contact Number",
"defaultValue": false,
"dateTimeFormat": "Y-m-d H:i:ss",
"mode": "date",
"timezoneCode": "Asia/Kolkata",
"from": "2024-06-23",
"to": "2024-06-24"
}