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:
parent
28f58b3694
commit
8ea93ec73d
@ -45,6 +45,11 @@ properties:
|
|||||||
contact:
|
contact:
|
||||||
$ref: '#/components/schemas/contact_detail'
|
$ref: '#/components/schemas/contact_detail'
|
||||||
description: Contact details
|
description: Contact details
|
||||||
|
assignee:
|
||||||
|
allOf:
|
||||||
|
- $ref: '#/components/schemas/agent'
|
||||||
|
description: The agent assigned to the conversation
|
||||||
|
nullable: true
|
||||||
agent_last_seen_at:
|
agent_last_seen_at:
|
||||||
type: string
|
type: string
|
||||||
description: Timestamp when the agent last saw the conversation
|
description: Timestamp when the agent last saw the conversation
|
||||||
|
|||||||
@ -32,6 +32,10 @@ properties:
|
|||||||
type: string
|
type: string
|
||||||
description: ID of the message this is replying to
|
description: ID of the message this is replying to
|
||||||
nullable: true
|
nullable: true
|
||||||
|
echo_id:
|
||||||
|
type: string
|
||||||
|
description: The echo ID of the message, used for deduplication
|
||||||
|
nullable: true
|
||||||
created_at:
|
created_at:
|
||||||
type: integer
|
type: integer
|
||||||
description: The timestamp when message was created
|
description: The timestamp when message was created
|
||||||
@ -44,4 +48,32 @@ properties:
|
|||||||
nullable: true
|
nullable: true
|
||||||
sender:
|
sender:
|
||||||
$ref: '#/components/schemas/contact_detail'
|
$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
|
||||||
@ -5,6 +5,17 @@ summary: Get messages
|
|||||||
security:
|
security:
|
||||||
- userApiKey: []
|
- userApiKey: []
|
||||||
description: List all messages of a conversation
|
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:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: Success
|
description: Success
|
||||||
|
|||||||
@ -6119,6 +6119,24 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "List all messages of a conversation",
|
"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": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
"description": "Success",
|
"description": "Success",
|
||||||
@ -12722,6 +12740,11 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"echo_id": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "The echo ID of the message, used for deduplication",
|
||||||
|
"nullable": true
|
||||||
|
},
|
||||||
"created_at": {
|
"created_at": {
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
"description": "The timestamp when message was created"
|
"description": "The timestamp when message was created"
|
||||||
@ -12737,6 +12760,55 @@
|
|||||||
},
|
},
|
||||||
"sender": {
|
"sender": {
|
||||||
"$ref": "#/components/schemas/contact_detail"
|
"$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": {
|
"contact": {
|
||||||
"$ref": "#/components/schemas/contact_detail"
|
"$ref": "#/components/schemas/contact_detail"
|
||||||
},
|
},
|
||||||
|
"assignee": {
|
||||||
|
"allOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/components/schemas/agent"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "The agent assigned to the conversation",
|
||||||
|
"nullable": true
|
||||||
|
},
|
||||||
"agent_last_seen_at": {
|
"agent_last_seen_at": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"description": "Timestamp when the agent last saw the conversation",
|
"description": "Timestamp when the agent last saw the conversation",
|
||||||
|
|||||||
@ -4662,6 +4662,24 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "List all messages of a conversation",
|
"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": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
"description": "Success",
|
"description": "Success",
|
||||||
@ -11229,6 +11247,11 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"echo_id": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "The echo ID of the message, used for deduplication",
|
||||||
|
"nullable": true
|
||||||
|
},
|
||||||
"created_at": {
|
"created_at": {
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
"description": "The timestamp when message was created"
|
"description": "The timestamp when message was created"
|
||||||
@ -11244,6 +11267,55 @@
|
|||||||
},
|
},
|
||||||
"sender": {
|
"sender": {
|
||||||
"$ref": "#/components/schemas/contact_detail"
|
"$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": {
|
"contact": {
|
||||||
"$ref": "#/components/schemas/contact_detail"
|
"$ref": "#/components/schemas/contact_detail"
|
||||||
},
|
},
|
||||||
|
"assignee": {
|
||||||
|
"allOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/components/schemas/agent"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "The agent assigned to the conversation",
|
||||||
|
"nullable": true
|
||||||
|
},
|
||||||
"agent_last_seen_at": {
|
"agent_last_seen_at": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"description": "Timestamp when the agent last saw the conversation",
|
"description": "Timestamp when the agent last saw the conversation",
|
||||||
|
|||||||
@ -4882,6 +4882,11 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"echo_id": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "The echo ID of the message, used for deduplication",
|
||||||
|
"nullable": true
|
||||||
|
},
|
||||||
"created_at": {
|
"created_at": {
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
"description": "The timestamp when message was created"
|
"description": "The timestamp when message was created"
|
||||||
@ -4897,6 +4902,55 @@
|
|||||||
},
|
},
|
||||||
"sender": {
|
"sender": {
|
||||||
"$ref": "#/components/schemas/contact_detail"
|
"$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": {
|
"contact": {
|
||||||
"$ref": "#/components/schemas/contact_detail"
|
"$ref": "#/components/schemas/contact_detail"
|
||||||
},
|
},
|
||||||
|
"assignee": {
|
||||||
|
"allOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/components/schemas/agent"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "The agent assigned to the conversation",
|
||||||
|
"nullable": true
|
||||||
|
},
|
||||||
"agent_last_seen_at": {
|
"agent_last_seen_at": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"description": "Timestamp when the agent last saw the conversation",
|
"description": "Timestamp when the agent last saw the conversation",
|
||||||
|
|||||||
@ -4297,6 +4297,11 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"echo_id": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "The echo ID of the message, used for deduplication",
|
||||||
|
"nullable": true
|
||||||
|
},
|
||||||
"created_at": {
|
"created_at": {
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
"description": "The timestamp when message was created"
|
"description": "The timestamp when message was created"
|
||||||
@ -4312,6 +4317,55 @@
|
|||||||
},
|
},
|
||||||
"sender": {
|
"sender": {
|
||||||
"$ref": "#/components/schemas/contact_detail"
|
"$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": {
|
"contact": {
|
||||||
"$ref": "#/components/schemas/contact_detail"
|
"$ref": "#/components/schemas/contact_detail"
|
||||||
},
|
},
|
||||||
|
"assignee": {
|
||||||
|
"allOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/components/schemas/agent"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "The agent assigned to the conversation",
|
||||||
|
"nullable": true
|
||||||
|
},
|
||||||
"agent_last_seen_at": {
|
"agent_last_seen_at": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"description": "Timestamp when the agent last saw the conversation",
|
"description": "Timestamp when the agent last saw the conversation",
|
||||||
|
|||||||
@ -5058,6 +5058,11 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"echo_id": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "The echo ID of the message, used for deduplication",
|
||||||
|
"nullable": true
|
||||||
|
},
|
||||||
"created_at": {
|
"created_at": {
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
"description": "The timestamp when message was created"
|
"description": "The timestamp when message was created"
|
||||||
@ -5073,6 +5078,55 @@
|
|||||||
},
|
},
|
||||||
"sender": {
|
"sender": {
|
||||||
"$ref": "#/components/schemas/contact_detail"
|
"$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": {
|
"contact": {
|
||||||
"$ref": "#/components/schemas/contact_detail"
|
"$ref": "#/components/schemas/contact_detail"
|
||||||
},
|
},
|
||||||
|
"assignee": {
|
||||||
|
"allOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/components/schemas/agent"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "The agent assigned to the conversation",
|
||||||
|
"nullable": true
|
||||||
|
},
|
||||||
"agent_last_seen_at": {
|
"agent_last_seen_at": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"description": "Timestamp when the agent last saw the conversation",
|
"description": "Timestamp when the agent last saw the conversation",
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user