From 8ea93ec73dd46942934349556e9d916d98197aec Mon Sep 17 00:00:00 2001 From: Pranav Date: Tue, 10 Mar 2026 01:45:10 -0700 Subject: [PATCH] chore(docs): Update documentation for messages API (#13744) Update the documentation for messages API Co-authored-by: Muhsin Keloth --- .../resource/conversation_meta.yml | 5 ++ .../definitions/resource/message_detailed.yml | 34 +++++++- .../conversation/messages/index.yml | 11 +++ swagger/swagger.json | 81 +++++++++++++++++++ swagger/tag_groups/application_swagger.json | 81 +++++++++++++++++++ swagger/tag_groups/client_swagger.json | 63 +++++++++++++++ swagger/tag_groups/other_swagger.json | 63 +++++++++++++++ swagger/tag_groups/platform_swagger.json | 63 +++++++++++++++ 8 files changed, 400 insertions(+), 1 deletion(-) diff --git a/swagger/definitions/resource/conversation_meta.yml b/swagger/definitions/resource/conversation_meta.yml index 7cffc0fab..02ac2390f 100644 --- a/swagger/definitions/resource/conversation_meta.yml +++ b/swagger/definitions/resource/conversation_meta.yml @@ -45,6 +45,11 @@ properties: contact: $ref: '#/components/schemas/contact_detail' description: Contact details + assignee: + allOf: + - $ref: '#/components/schemas/agent' + description: The agent assigned to the conversation + nullable: true agent_last_seen_at: type: string description: Timestamp when the agent last saw the conversation diff --git a/swagger/definitions/resource/message_detailed.yml b/swagger/definitions/resource/message_detailed.yml index 49ff7aa09..8c7e9c3d1 100644 --- a/swagger/definitions/resource/message_detailed.yml +++ b/swagger/definitions/resource/message_detailed.yml @@ -32,6 +32,10 @@ properties: type: string description: ID of the message this is replying to nullable: true + echo_id: + type: string + description: The echo ID of the message, used for deduplication + nullable: true created_at: type: integer description: The timestamp when message was created @@ -44,4 +48,32 @@ properties: nullable: true sender: $ref: '#/components/schemas/contact_detail' - description: The sender of the message (only for incoming messages) \ No newline at end of file + description: The sender of the message (only for incoming messages) + attachments: + type: array + description: The list of attachments associated with the message + items: + type: object + properties: + id: + type: number + description: The ID of the attachment + message_id: + type: number + description: The ID of the message + file_type: + type: string + enum: ["image", "video", "audio", "file", "location", "fallback", "share", "story_mention", "contact", "ig_reel"] + description: The type of the attached file + account_id: + type: number + description: The ID of the account + data_url: + type: string + description: The URL of the attached file + thumb_url: + type: string + description: The thumbnail URL of the attached file + file_size: + type: number + description: The size of the attached file in bytes \ No newline at end of file diff --git a/swagger/paths/application/conversation/messages/index.yml b/swagger/paths/application/conversation/messages/index.yml index 02693a244..68aa120fc 100644 --- a/swagger/paths/application/conversation/messages/index.yml +++ b/swagger/paths/application/conversation/messages/index.yml @@ -5,6 +5,17 @@ summary: Get messages security: - userApiKey: [] description: List all messages of a conversation +parameters: + - name: after + in: query + schema: + type: integer + description: Fetch messages after the message with this ID. Returns up to 100 messages in ascending order. + - name: before + in: query + schema: + type: integer + description: Fetch messages before the message with this ID. Returns up to 20 messages in ascending order. responses: '200': description: Success diff --git a/swagger/swagger.json b/swagger/swagger.json index d721affa4..e11376bcf 100644 --- a/swagger/swagger.json +++ b/swagger/swagger.json @@ -6119,6 +6119,24 @@ } ], "description": "List all messages of a conversation", + "parameters": [ + { + "name": "after", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Fetch messages after the message with this ID. Returns up to 100 messages in ascending order." + }, + { + "name": "before", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Fetch messages before the message with this ID. Returns up to 20 messages in ascending order." + } + ], "responses": { "200": { "description": "Success", @@ -12722,6 +12740,11 @@ } } }, + "echo_id": { + "type": "string", + "description": "The echo ID of the message, used for deduplication", + "nullable": true + }, "created_at": { "type": "integer", "description": "The timestamp when message was created" @@ -12737,6 +12760,55 @@ }, "sender": { "$ref": "#/components/schemas/contact_detail" + }, + "attachments": { + "type": "array", + "description": "The list of attachments associated with the message", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number", + "description": "The ID of the attachment" + }, + "message_id": { + "type": "number", + "description": "The ID of the message" + }, + "file_type": { + "type": "string", + "enum": [ + "image", + "video", + "audio", + "file", + "location", + "fallback", + "share", + "story_mention", + "contact", + "ig_reel" + ], + "description": "The type of the attached file" + }, + "account_id": { + "type": "number", + "description": "The ID of the account" + }, + "data_url": { + "type": "string", + "description": "The URL of the attached file" + }, + "thumb_url": { + "type": "string", + "description": "The thumbnail URL of the attached file" + }, + "file_size": { + "type": "number", + "description": "The size of the attached file in bytes" + } + } + } } } }, @@ -12805,6 +12877,15 @@ "contact": { "$ref": "#/components/schemas/contact_detail" }, + "assignee": { + "allOf": [ + { + "$ref": "#/components/schemas/agent" + } + ], + "description": "The agent assigned to the conversation", + "nullable": true + }, "agent_last_seen_at": { "type": "string", "description": "Timestamp when the agent last saw the conversation", diff --git a/swagger/tag_groups/application_swagger.json b/swagger/tag_groups/application_swagger.json index 844be0350..ba482c9d7 100644 --- a/swagger/tag_groups/application_swagger.json +++ b/swagger/tag_groups/application_swagger.json @@ -4662,6 +4662,24 @@ } ], "description": "List all messages of a conversation", + "parameters": [ + { + "name": "after", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Fetch messages after the message with this ID. Returns up to 100 messages in ascending order." + }, + { + "name": "before", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Fetch messages before the message with this ID. Returns up to 20 messages in ascending order." + } + ], "responses": { "200": { "description": "Success", @@ -11229,6 +11247,11 @@ } } }, + "echo_id": { + "type": "string", + "description": "The echo ID of the message, used for deduplication", + "nullable": true + }, "created_at": { "type": "integer", "description": "The timestamp when message was created" @@ -11244,6 +11267,55 @@ }, "sender": { "$ref": "#/components/schemas/contact_detail" + }, + "attachments": { + "type": "array", + "description": "The list of attachments associated with the message", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number", + "description": "The ID of the attachment" + }, + "message_id": { + "type": "number", + "description": "The ID of the message" + }, + "file_type": { + "type": "string", + "enum": [ + "image", + "video", + "audio", + "file", + "location", + "fallback", + "share", + "story_mention", + "contact", + "ig_reel" + ], + "description": "The type of the attached file" + }, + "account_id": { + "type": "number", + "description": "The ID of the account" + }, + "data_url": { + "type": "string", + "description": "The URL of the attached file" + }, + "thumb_url": { + "type": "string", + "description": "The thumbnail URL of the attached file" + }, + "file_size": { + "type": "number", + "description": "The size of the attached file in bytes" + } + } + } } } }, @@ -11312,6 +11384,15 @@ "contact": { "$ref": "#/components/schemas/contact_detail" }, + "assignee": { + "allOf": [ + { + "$ref": "#/components/schemas/agent" + } + ], + "description": "The agent assigned to the conversation", + "nullable": true + }, "agent_last_seen_at": { "type": "string", "description": "Timestamp when the agent last saw the conversation", diff --git a/swagger/tag_groups/client_swagger.json b/swagger/tag_groups/client_swagger.json index ebeb4a9cb..ac6915726 100644 --- a/swagger/tag_groups/client_swagger.json +++ b/swagger/tag_groups/client_swagger.json @@ -4882,6 +4882,11 @@ } } }, + "echo_id": { + "type": "string", + "description": "The echo ID of the message, used for deduplication", + "nullable": true + }, "created_at": { "type": "integer", "description": "The timestamp when message was created" @@ -4897,6 +4902,55 @@ }, "sender": { "$ref": "#/components/schemas/contact_detail" + }, + "attachments": { + "type": "array", + "description": "The list of attachments associated with the message", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number", + "description": "The ID of the attachment" + }, + "message_id": { + "type": "number", + "description": "The ID of the message" + }, + "file_type": { + "type": "string", + "enum": [ + "image", + "video", + "audio", + "file", + "location", + "fallback", + "share", + "story_mention", + "contact", + "ig_reel" + ], + "description": "The type of the attached file" + }, + "account_id": { + "type": "number", + "description": "The ID of the account" + }, + "data_url": { + "type": "string", + "description": "The URL of the attached file" + }, + "thumb_url": { + "type": "string", + "description": "The thumbnail URL of the attached file" + }, + "file_size": { + "type": "number", + "description": "The size of the attached file in bytes" + } + } + } } } }, @@ -4965,6 +5019,15 @@ "contact": { "$ref": "#/components/schemas/contact_detail" }, + "assignee": { + "allOf": [ + { + "$ref": "#/components/schemas/agent" + } + ], + "description": "The agent assigned to the conversation", + "nullable": true + }, "agent_last_seen_at": { "type": "string", "description": "Timestamp when the agent last saw the conversation", diff --git a/swagger/tag_groups/other_swagger.json b/swagger/tag_groups/other_swagger.json index 9aa9f5a7a..9fb01fa98 100644 --- a/swagger/tag_groups/other_swagger.json +++ b/swagger/tag_groups/other_swagger.json @@ -4297,6 +4297,11 @@ } } }, + "echo_id": { + "type": "string", + "description": "The echo ID of the message, used for deduplication", + "nullable": true + }, "created_at": { "type": "integer", "description": "The timestamp when message was created" @@ -4312,6 +4317,55 @@ }, "sender": { "$ref": "#/components/schemas/contact_detail" + }, + "attachments": { + "type": "array", + "description": "The list of attachments associated with the message", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number", + "description": "The ID of the attachment" + }, + "message_id": { + "type": "number", + "description": "The ID of the message" + }, + "file_type": { + "type": "string", + "enum": [ + "image", + "video", + "audio", + "file", + "location", + "fallback", + "share", + "story_mention", + "contact", + "ig_reel" + ], + "description": "The type of the attached file" + }, + "account_id": { + "type": "number", + "description": "The ID of the account" + }, + "data_url": { + "type": "string", + "description": "The URL of the attached file" + }, + "thumb_url": { + "type": "string", + "description": "The thumbnail URL of the attached file" + }, + "file_size": { + "type": "number", + "description": "The size of the attached file in bytes" + } + } + } } } }, @@ -4380,6 +4434,15 @@ "contact": { "$ref": "#/components/schemas/contact_detail" }, + "assignee": { + "allOf": [ + { + "$ref": "#/components/schemas/agent" + } + ], + "description": "The agent assigned to the conversation", + "nullable": true + }, "agent_last_seen_at": { "type": "string", "description": "Timestamp when the agent last saw the conversation", diff --git a/swagger/tag_groups/platform_swagger.json b/swagger/tag_groups/platform_swagger.json index a830a8d56..ee6452319 100644 --- a/swagger/tag_groups/platform_swagger.json +++ b/swagger/tag_groups/platform_swagger.json @@ -5058,6 +5058,11 @@ } } }, + "echo_id": { + "type": "string", + "description": "The echo ID of the message, used for deduplication", + "nullable": true + }, "created_at": { "type": "integer", "description": "The timestamp when message was created" @@ -5073,6 +5078,55 @@ }, "sender": { "$ref": "#/components/schemas/contact_detail" + }, + "attachments": { + "type": "array", + "description": "The list of attachments associated with the message", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number", + "description": "The ID of the attachment" + }, + "message_id": { + "type": "number", + "description": "The ID of the message" + }, + "file_type": { + "type": "string", + "enum": [ + "image", + "video", + "audio", + "file", + "location", + "fallback", + "share", + "story_mention", + "contact", + "ig_reel" + ], + "description": "The type of the attached file" + }, + "account_id": { + "type": "number", + "description": "The ID of the account" + }, + "data_url": { + "type": "string", + "description": "The URL of the attached file" + }, + "thumb_url": { + "type": "string", + "description": "The thumbnail URL of the attached file" + }, + "file_size": { + "type": "number", + "description": "The size of the attached file in bytes" + } + } + } } } }, @@ -5141,6 +5195,15 @@ "contact": { "$ref": "#/components/schemas/contact_detail" }, + "assignee": { + "allOf": [ + { + "$ref": "#/components/schemas/agent" + } + ], + "description": "The agent assigned to the conversation", + "nullable": true + }, "agent_last_seen_at": { "type": "string", "description": "Timestamp when the agent last saw the conversation",