chore: Add Message API, cleanup conversation_id param (#2249)
This commit is contained in:
@@ -329,6 +329,9 @@
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"$ref": "#/parameters/account_id"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
@@ -367,6 +370,9 @@
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"$ref": "#/parameters/account_id"
|
||||
},
|
||||
{
|
||||
"name": "data",
|
||||
"in": "body",
|
||||
@@ -413,23 +419,22 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/accounts/{account_id}/conversations/{id}": {
|
||||
"/accounts/{account_id}/conversations/{converstion_id}": {
|
||||
"parameters": [
|
||||
{
|
||||
"$ref": "#/parameters/account_id"
|
||||
},
|
||||
{
|
||||
"$ref": "#/parameters/conversation_id"
|
||||
}
|
||||
],
|
||||
"get": {
|
||||
"tags": [
|
||||
"Conversation"
|
||||
],
|
||||
"operationId": "conversationDetails",
|
||||
"operationId": "get-details-of-a-conversation",
|
||||
"summary": "Conversation Details",
|
||||
"description": "Get all details regarding a conversation with all messages in the conversation",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"type": "number",
|
||||
"description": "ID of Conversation",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Success",
|
||||
@@ -446,12 +451,20 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/accounts/{account_id}/conversations/{id}/toggle_status": {
|
||||
"/accounts/{account_id}/conversations/{conversation_id}/toggle_status": {
|
||||
"parameters": [
|
||||
{
|
||||
"$ref": "#/parameters/account_id"
|
||||
},
|
||||
{
|
||||
"$ref": "#/parameters/conversation_id"
|
||||
}
|
||||
],
|
||||
"post": {
|
||||
"tags": [
|
||||
"Conversation"
|
||||
],
|
||||
"operationId": "conversationToggleStatus",
|
||||
"operationId": "toggle-status-of-a-conversation",
|
||||
"summary": "Toggle Status",
|
||||
"description": "Toggles the status of the conversation between open and resolved",
|
||||
"security": [
|
||||
@@ -467,13 +480,6 @@
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"type": "number",
|
||||
"description": "ID of the conversation",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"name": "data",
|
||||
"in": "body",
|
||||
@@ -505,29 +511,28 @@
|
||||
"404": {
|
||||
"description": "Conversation not found"
|
||||
},
|
||||
"403": {
|
||||
"description": "Access denied"
|
||||
"401": {
|
||||
"description": "Unauthorized"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/accounts/{account_id}/conversations/{id}/messages": {
|
||||
"/accounts/{account_id}/conversations/{converstion_id}/messages": {
|
||||
"parameters": [
|
||||
{
|
||||
"$ref": "#/parameters/account_id"
|
||||
},
|
||||
{
|
||||
"$ref": "#/parameters/conversation_id"
|
||||
}
|
||||
],
|
||||
"get": {
|
||||
"tags": [
|
||||
"Messages"
|
||||
],
|
||||
"operationId": "listAllMessages",
|
||||
"operationId": "list-all-messages",
|
||||
"summary": "Get messages",
|
||||
"description": "List all messages of a conversation",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"type": "number",
|
||||
"description": "ID of the conversation",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Array of messages",
|
||||
@@ -546,8 +551,8 @@
|
||||
"404": {
|
||||
"description": "Conversation not found"
|
||||
},
|
||||
"403": {
|
||||
"description": "Access denied"
|
||||
"401": {
|
||||
"description": "Unauthorized"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -555,9 +560,9 @@
|
||||
"tags": [
|
||||
"Messages"
|
||||
],
|
||||
"operationId": "conversationNewMessage",
|
||||
"operationId": "create-a-new-message-in-a-conversation",
|
||||
"summary": "Create New Message",
|
||||
"description": "All the agent replies are created as new messages through this endpoint",
|
||||
"description": "Create a new message in the conversation",
|
||||
"security": [
|
||||
{
|
||||
"userApiKey": [
|
||||
@@ -571,13 +576,6 @@
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"type": "number",
|
||||
"description": "ID of the conversation",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"name": "data",
|
||||
"in": "body",
|
||||
@@ -610,23 +608,54 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/accounts/{account_id}/conversations/{id}/labels": {
|
||||
"/accounts/{account_id}/conversations/{conversation_id}/messages/{message_id}": {
|
||||
"parameters": [
|
||||
{
|
||||
"$ref": "#/parameters/account_id"
|
||||
},
|
||||
{
|
||||
"$ref": "#/parameters/conversation_id"
|
||||
},
|
||||
{
|
||||
"$ref": "#/parameters/message_id"
|
||||
}
|
||||
],
|
||||
"delete": {
|
||||
"tags": [
|
||||
"Messages"
|
||||
],
|
||||
"operationId": "delete-a-message",
|
||||
"summary": "Delete a message",
|
||||
"description": "Delete a message and it's attachments from the conversation.",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Success"
|
||||
},
|
||||
"401": {
|
||||
"description": "Unauthorized"
|
||||
},
|
||||
"404": {
|
||||
"description": "The message or conversation does not exist in the account"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/accounts/{account_id}/conversations/{conversation_id}/labels": {
|
||||
"parameters": [
|
||||
{
|
||||
"$ref": "#/parameters/account_id"
|
||||
},
|
||||
{
|
||||
"$ref": "#/parameters/conversation_id"
|
||||
}
|
||||
],
|
||||
"get": {
|
||||
"tags": [
|
||||
"ConversationLabels"
|
||||
"Conversation Labels"
|
||||
],
|
||||
"operationId": "conversationLabelsList",
|
||||
"operationId": "list-all-labels-of-a-conversation",
|
||||
"summary": "List Labels",
|
||||
"description": "Lists all the labels of a conversation",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"type": "number",
|
||||
"description": "ID of the conversation",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Success",
|
||||
@@ -637,26 +666,19 @@
|
||||
"404": {
|
||||
"description": "Conversation not found"
|
||||
},
|
||||
"403": {
|
||||
"description": "Access denied"
|
||||
"401": {
|
||||
"description": "Unauthorized"
|
||||
}
|
||||
}
|
||||
},
|
||||
"post": {
|
||||
"tags": [
|
||||
"ConversationLabels"
|
||||
"Conversation Labels"
|
||||
],
|
||||
"operationId": "conversationAddLabels",
|
||||
"operationId": "conversation-add-labels",
|
||||
"summary": "Add Labels",
|
||||
"description": "Creates new labels and associates it with the conversation",
|
||||
"description": "Add labels to a conversation. Note that this API would overwrite the existing list of labels associated to the conversation.",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"type": "number",
|
||||
"description": "ID of the conversation",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"name": "data",
|
||||
"in": "body",
|
||||
@@ -666,7 +688,7 @@
|
||||
"properties": {
|
||||
"labels": {
|
||||
"type": "array",
|
||||
"description": "Array of labels",
|
||||
"description": "Array of labels (comma-separated strings)",
|
||||
"properties": {
|
||||
"type": "string"
|
||||
}
|
||||
@@ -685,28 +707,29 @@
|
||||
"404": {
|
||||
"description": "Conversation not found"
|
||||
},
|
||||
"403": {
|
||||
"description": "Access denied"
|
||||
"401": {
|
||||
"description": "Unauthorized"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/accounts/{account_id}/conversations/{id}/assignments": {
|
||||
"/accounts/{account_id}/conversations/{conversation_id}/assignments": {
|
||||
"parameters": [
|
||||
{
|
||||
"$ref": "#/parameters/account_id"
|
||||
},
|
||||
{
|
||||
"$ref": "#/parameters/conversation_id"
|
||||
}
|
||||
],
|
||||
"post": {
|
||||
"tags": [
|
||||
"ConversationAssignment"
|
||||
"Conversation Assignment"
|
||||
],
|
||||
"operationId": "conversationAssignment",
|
||||
"operationId": "assign-a-conversation",
|
||||
"summary": "Assign Conversation",
|
||||
"description": "Assign a conversation to an agent or a team",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"type": "number",
|
||||
"description": "id of the conversation",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"name": "data",
|
||||
"in": "body",
|
||||
@@ -736,8 +759,8 @@
|
||||
"404": {
|
||||
"description": "Conversation not found"
|
||||
},
|
||||
"403": {
|
||||
"description": "Access denied"
|
||||
"401": {
|
||||
"description": "Unauthorized"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1130,7 +1153,7 @@
|
||||
"tags": [
|
||||
"Teams"
|
||||
],
|
||||
"operationId": "delete-a-tea,",
|
||||
"operationId": "delete-a-team",
|
||||
"summary": "Delete a team",
|
||||
"description": "Delete a team from the account",
|
||||
"responses": {
|
||||
@@ -1870,7 +1893,7 @@
|
||||
"type": "integer"
|
||||
},
|
||||
"required": true,
|
||||
"description": "Numeric ID of the account"
|
||||
"description": "The numeric ID of the account"
|
||||
},
|
||||
"team_id": {
|
||||
"in": "path",
|
||||
@@ -1880,6 +1903,24 @@
|
||||
},
|
||||
"required": true,
|
||||
"description": "The id of the team to be updated"
|
||||
},
|
||||
"conversation_id": {
|
||||
"in": "path",
|
||||
"name": "conversation_id",
|
||||
"schema": {
|
||||
"type": "integer"
|
||||
},
|
||||
"required": true,
|
||||
"description": "The numeric ID of the conversation"
|
||||
},
|
||||
"message_id": {
|
||||
"in": "path",
|
||||
"name": "message_id",
|
||||
"schema": {
|
||||
"type": "integer"
|
||||
},
|
||||
"required": true,
|
||||
"description": "The numeric ID of the message"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user