chore: Add Swagger endpoint for updating custom attributes (#10995)
- Add swagger endpoint for updating custom attributes in a conversation
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -73,6 +73,7 @@ test/cypress/videos/*
|
||||
|
||||
#ignore files under .vscode directory
|
||||
.vscode
|
||||
.cursor
|
||||
|
||||
# yalc for local testing
|
||||
.yalc
|
||||
|
||||
36
swagger/paths/application/conversation/custom_attributes.yml
Normal file
36
swagger/paths/application/conversation/custom_attributes.yml
Normal file
@@ -0,0 +1,36 @@
|
||||
tags:
|
||||
- Conversations
|
||||
operationId: update-custom-attributes-of-a-conversation
|
||||
summary: Update Custom Attributes
|
||||
description: Updates the custom attributes of a conversation
|
||||
security:
|
||||
- userApiKey: []
|
||||
- agentBotApiKey: []
|
||||
parameters:
|
||||
- name: data
|
||||
in: body
|
||||
required: true
|
||||
schema:
|
||||
type: object
|
||||
required:
|
||||
- custom_attributes
|
||||
properties:
|
||||
custom_attributes:
|
||||
type: object
|
||||
description: The custom attributes to be set for the conversation
|
||||
example:
|
||||
order_id: "12345"
|
||||
previous_conversation: "67890"
|
||||
responses:
|
||||
200:
|
||||
description: Success
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
custom_attributes:
|
||||
type: object
|
||||
description: The custom attributes of the conversation
|
||||
404:
|
||||
description: Conversation not found
|
||||
401:
|
||||
description: Unauthorized
|
||||
@@ -354,6 +354,13 @@
|
||||
post:
|
||||
$ref: ./application/conversation/toggle_priority.yml
|
||||
|
||||
/api/v1/accounts/{account_id}/conversations/{conversation_id}/custom_attributes:
|
||||
parameters:
|
||||
- $ref: '#/parameters/account_id'
|
||||
- $ref: '#/parameters/conversation_id'
|
||||
post:
|
||||
$ref: ./application/conversation/custom_attributes.yml
|
||||
|
||||
# Conversations Assignments
|
||||
|
||||
/api/v1/accounts/{account_id}/conversations/{conversation_id}/assignments:
|
||||
|
||||
@@ -3514,6 +3514,79 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/accounts/{account_id}/conversations/{conversation_id}/custom_attributes": {
|
||||
"parameters": [
|
||||
{
|
||||
"$ref": "#/parameters/account_id"
|
||||
},
|
||||
{
|
||||
"$ref": "#/parameters/conversation_id"
|
||||
}
|
||||
],
|
||||
"post": {
|
||||
"tags": [
|
||||
"Conversations"
|
||||
],
|
||||
"operationId": "update-custom-attributes-of-a-conversation",
|
||||
"summary": "Update Custom Attributes",
|
||||
"description": "Updates the custom attributes of a conversation",
|
||||
"security": [
|
||||
{
|
||||
"userApiKey": [
|
||||
|
||||
]
|
||||
},
|
||||
{
|
||||
"agentBotApiKey": [
|
||||
|
||||
]
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "data",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"custom_attributes"
|
||||
],
|
||||
"properties": {
|
||||
"custom_attributes": {
|
||||
"type": "object",
|
||||
"description": "The custom attributes to be set for the conversation",
|
||||
"example": {
|
||||
"order_id": "12345",
|
||||
"previous_conversation": "67890"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Success",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"custom_attributes": {
|
||||
"type": "object",
|
||||
"description": "The custom attributes of the conversation"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "Conversation not found"
|
||||
},
|
||||
"401": {
|
||||
"description": "Unauthorized"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/accounts/{account_id}/conversations/{conversation_id}/assignments": {
|
||||
"parameters": [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user