chore(docs): Update documentation for messages API (#13744)

Update the documentation for messages API

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
This commit is contained in:
Pranav
2026-03-10 01:45:10 -07:00
committed by GitHub
parent 28f58b3694
commit 8ea93ec73d
8 changed files with 400 additions and 1 deletions

View File

@@ -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

View File

@@ -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)
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

View File

@@ -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

View File

@@ -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",

View File

@@ -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",

View File

@@ -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",

View File

@@ -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",

View File

@@ -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",