diff --git a/chat-apis.json b/chat-apis.json index a0905001..0fc8342b 100644 --- a/chat-apis.json +++ b/chat-apis.json @@ -1432,8 +1432,8 @@ "type": "object" }, "example": { - "data": { - "0": { + "data": [ + { "guid": "project-group", "name": "Project Group", "description": "project related discussions between members", @@ -1449,38 +1449,38 @@ "tags": [ "friends", "project" - ], - "0": { - "guid": "project-group-2", - "name": "Project Group 2", - "description": "project related discussions between members", - "icon": "http://placehold.it/120x120&text=image1", - "type": "public", - "scope": "admin", - "membersCount": 1, - "joinedAt": 1638440784, - "conversationId": "group_project-group", - "hasJoined": true, - "createdAt": 1638440784, - "owner": "superhero4", - "tags": [ - "friends", - "project" - ] - } + ] }, - "meta": { - "pagination": { - "total": 0, - "count": 5, - "per_page": 100, - "current_page": 1, - "total_pages": 1 - }, - "cursor": { - "updatedAt": 1638354799, - "affix": "prepend" - } + { + "guid": "project-group-2", + "name": "Project Group 2", + "description": "project related discussions between members", + "icon": "http://placehold.it/120x120&text=image1", + "type": "public", + "scope": "admin", + "membersCount": 1, + "joinedAt": 1638440784, + "conversationId": "group_project-group", + "hasJoined": true, + "createdAt": 1638440784, + "owner": "superhero4", + "tags": [ + "friends", + "project" + ] + } + ], + "meta": { + "pagination": { + "total": 0, + "count": 5, + "per_page": 100, + "current_page": 1, + "total_pages": 1 + }, + "cursor": { + "updatedAt": 1638354799, + "affix": "prepend" } } } @@ -2457,6 +2457,14 @@ "schema": { "type": "integer" } + }, + { + "name": "hideQuotedMessages", + "in": "query", + "description": "If set to true, the API response will exclude all quotedMessage nodes from the returned messages. This allows clients to fetch only the messages without any quoted messages.", + "schema": { + "type": "boolean" + } } ], "responses": { @@ -3661,6 +3669,22 @@ "type": "integer", "default": "1" } + }, + { + "name": "hideAgentic", + "in": "query", + "description": "Hides agentic conversations from the list.", + "schema": { + "type": "boolean" + } + }, + { + "name": "onlyAgentic", + "in": "query", + "description": "Shows only agentic conversations in the list.", + "schema": { + "type": "boolean" + } } ], "responses": { @@ -8001,6 +8025,14 @@ "type": "string" } } + }, + { + "name": "hideQuotedMessages", + "in": "query", + "description": "If set to true, the API response will exclude all quotedMessage nodes from the returned messages. This allows clients to fetch only the messages without any quoted messages.", + "schema": { + "type": "boolean" + } } ], "responses": { @@ -8471,6 +8503,14 @@ "type": "string" } } + }, + { + "name": "hideQuotedMessages", + "in": "query", + "description": "If set to true, the API response will exclude all quotedMessage nodes from the returned messages. This allows clients to fetch only the referenced messages without any quoted messages.", + "schema": { + "type": "boolean" + } } ], "responses": { @@ -16097,6 +16137,14 @@ "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": { "description": "Type of the message.", "type": "string" @@ -17116,6 +17164,14 @@ "message" ] }, + "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": { "description": "Type of the message. The available values are text, image, file, audio, video.", "type": "string", diff --git a/data-import-apis.json b/data-import-apis.json index 0287fd86..d0a46db2 100644 --- a/data-import-apis.json +++ b/data-import-apis.json @@ -51,7 +51,7 @@ ], "properties": { "": { - "description": "Wraps a single message object. The <muid> will be a primary key/unique Identifier of the message.", + "description": "Wraps a single message object. The **<muid>** will be a primary key/unique Identifier of the message.", "required": [ "muid", "sender", @@ -61,7 +61,7 @@ ], "properties": { "muid": { - "description": "The value should be the same as value of the placeholder <muid> which wraps the message object.", + "description": "The value should be the same as value of the placeholder **<muid>** which wraps the message object.", "type": "string" }, "sender": { @@ -122,7 +122,7 @@ ], "properties": { "url": { - "description": "Contains the URL of the attachment. The developer has to make sure that the URL is accessible while calling the data_import API. The API will be downloading the attachment from its current location and upload it to CometChat’s attachment storage.", + "description": "Publicly accessible URL of the attachment.", "type": "string" }, "name": { @@ -387,6 +387,71 @@ } }, "type": "object" + }, + "mentionedUserDetails": { + "description": "Optional field that provides user details when data.text includes a mention, formatted using CometChat’s mention template (<@uid:UID>).", + "properties": { + "": { + "description": "A map where each key is a user’s unique identifier (UID) and the value is that user’s details. The <uid> will be replaced by the mentioned user’s primary key.", + "properties": { + "": { + "required": [ + "uid", + "name" + ], + "properties": { + "uid": { + "description": "The primary-key/ unique identifier of the owner. The value should be the same as value of the placeholder which wraps the mentionedUserDetails object.", + "type": "string" + }, + "name": { + "description": "Name of the owner.", + "type": "string" + }, + "avatar": { + "description": "URL to the profile picture of the owner.", + "type": "string" + }, + "link": { + "description": "Profile page URL of the owner.", + "type": "string" + }, + "role": { + "description": "Role of the owner. Should be created already via the Create role API.", + "type": "string" + }, + "createdAt": { + "description": "A 10-digit timestamp at which the owner was created.", + "type": "integer" + }, + "lastActiveAt": { + "description": "A 10-digit UNIX timestamp at which the owner was most recently online.", + "type": "integer" + }, + "metadata": { + "description": "Additional details about the owner.", + "type": "object" + }, + "tags": { + "description": "A string array containing owner tags.", + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "deactivatedAt": { + "description": "A 10-digit UNIX timestamp at which the owner was deactivated/soft-deleted/blocked to use the chat services.", + "type": "integer" + } + }, + "type": "object" + } + }, + "type": "object" + } + }, + "type": "object" } }, "type": "object" @@ -402,7 +467,7 @@ "type": "text", "category": "message", "data": { - "text": "Hi there,", + "text": "Hi there", "attachments": [ { "name": "hi.png", @@ -446,7 +511,13 @@ }, "tags": [ "tag1" - ] + ], + "mentionedUserDetails": { + "example-uid-new": { + "uid": "example-uid-new", + "name": "example-uid" + } + } } } } @@ -593,14 +664,14 @@ ], "properties": { "": { - "description": "Wraps a user object. The <uid> will be a primary key/unique Identifier of the user.", + "description": "Wraps a user object. The **<uid>** will be a primary key/unique Identifier of the user.", "required": [ "uid", "name" ], "properties": { "uid": { - "description": "The value should be the same as value of the placeholder <uid> which wraps the user object.", + "description": "The value should be the same as value of the placeholder **<uid>** which wraps the user object.", "type": "string" }, "name": { @@ -747,7 +818,7 @@ ], "properties": { "": { - "description": "Wraps a group object. The <guid> will be a primary key/unique Identifier of the group.", + "description": "Wraps a group object. The **<guid>** will be a primary key/unique Identifier of the group.", "required": [ "guid", "name", @@ -755,7 +826,7 @@ ], "properties": { "guid": { - "description": "The value should be the same as value of the placeholder <guid> which wraps the group object.", + "description": "The value should be the same as value of the placeholder **<guid>** which wraps the group object.", "type": "string" }, "name": { @@ -947,7 +1018,7 @@ ], "properties": { "_member_": { - "description": "Wraps a single member object. The <guid>_member_<uid> will will be a primary key/unique Identifier of the member.", + "description": "Wraps a single member object. The **<guid>_member_<uid>** will will be a primary key/unique Identifier of the member.", "required": [ "memberId", "guid", @@ -955,7 +1026,7 @@ ], "properties": { "memberId": { - "description": "The value should be the same as value of the placeholder <guid>_member_<uid> which wraps the member object.", + "description": "The value should be the same as value of the placeholder **<guid>_member_<uid>** which wraps the member object.", "type": "string" }, "guid": { @@ -2795,6 +2866,14 @@ "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": { "description": "Type of the message.", "type": "string" @@ -2892,6 +2971,22 @@ }, "maxPerDayPerConversation": { "type": "integer" + }, + "includeMessageObjectSetting": { + "description": "Includes the message object in the email payload", + "type": "boolean" + }, + "includeSenderMetadataSetting": { + "description": "Includes sender metadata in the message object", + "type": "boolean" + }, + "includeReceiverMetadataSetting": { + "description": "Includes receiver metadata in the message object", + "type": "boolean" + }, + "includeMessageMetadataSetting": { + "description": "Includes message metadata in the message object", + "type": "boolean" } }, "type": "object" @@ -3798,6 +3893,14 @@ "message" ] }, + "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": { "description": "Type of the message. The available values are text, image, file, audio, video.", "type": "string", @@ -4710,6 +4813,22 @@ }, "maxPerDayPerConversation": { "type": "integer" + }, + "includeMessageObjectSetting": { + "description": "Includes the message object in the SMS payload", + "type": "boolean" + }, + "includeSenderMetadataSetting": { + "description": "Includes sender metadata in the message object", + "type": "boolean" + }, + "includeReceiverMetadataSetting": { + "description": "Includes receiver metadata in the message object", + "type": "boolean" + }, + "includeMessageMetadataSetting": { + "description": "Includes message metadata in the message object", + "type": "boolean" } }, "type": "object" diff --git a/rest-api/constraints-rate-limits-and-errors.mdx b/rest-api/constraints-rate-limits-and-errors.mdx index 0dc2361b..c264cd54 100644 --- a/rest-api/constraints-rate-limits-and-errors.mdx +++ b/rest-api/constraints-rate-limits-and-errors.mdx @@ -86,8 +86,8 @@ title: "Constraints, Rate Limits And Errors" **API** -1. API calls for core operations are rate limited to 10000 requests per min. Core operations include user connection, create/delete user, create/join group cumulatively. -2. API calls for standard operations are rate limited to 20000 requests per min. Standard operations include all other operations cumulatively. +1. API calls for core operations are rate limited to 10,000 requests per min. Core operations include user connection, create/delete user, create/join group cumulatively. +2. API calls for standard operations are rate limited to 20,000 requests per min. Standard operations include all other operations cumulatively. **Bots** @@ -102,4 +102,4 @@ title: "Constraints, Rate Limits And Errors" | Webhook authentication username | 50 characters, alphanumeric (without spaces) | | | Webhook authentication password | 100 characters, alphanumeric (without spaces) | | -### Errors: \ No newline at end of file +### Errors: