diff --git a/swagger/definitions/request/conversation/create_message.yml b/swagger/definitions/request/conversation/create_message.yml index 9082f1318..c8f4efc7f 100644 --- a/swagger/definitions/request/conversation/create_message.yml +++ b/swagger/definitions/request/conversation/create_message.yml @@ -19,3 +19,24 @@ properties: content_attributes: type: object description: attributes based on your content type + template_params: + type: object + description: The template params for the message in case of whatsapp Channel + properties: + name: + type: string + description: Name of the template + example: 'sample_issue_resolution' + category: + type: string + description: Category of the template + example: UTILITY + language: + type: string + description: Language of the template + example: en_US + processed_params: + type: object + description: The processed param values for template variables in template + example: + 1: "Chatwoot" diff --git a/swagger/paths/application/conversation/index.yml b/swagger/paths/application/conversation/index.yml index 4c9241464..c1cb199b0 100644 --- a/swagger/paths/application/conversation/index.yml +++ b/swagger/paths/application/conversation/index.yml @@ -66,6 +66,9 @@ post: required: true schema: type: object + required: + - source_id + - inbox_id properties: source_id: type: string @@ -93,7 +96,35 @@ post: team_id: type: string description: Team Id for assigning a conversation to a team - + message: + type: object + description: The initial message to be sent to the conversation + required: ['content'] + properties: + content: + type: string + description: The content of the message + template_params: + type: object + description: The template params for the message in case of whatsapp Channel + properties: + name: + type: string + description: Name of the template + example: 'sample_issue_resolution' + category: + type: string + description: Category of the template + example: UTILITY + language: + type: string + description: Language of the template + example: en_US + processed_params: + type: object + description: The processed param values for template variables in template + example: + 1: "Chatwoot" responses: 200: description: Success diff --git a/swagger/swagger.json b/swagger/swagger.json index cd8f3e7d3..9c6093fcf 100644 --- a/swagger/swagger.json +++ b/swagger/swagger.json @@ -2840,6 +2840,10 @@ "required": true, "schema": { "type": "object", + "required": [ + "source_id", + "inbox_id" + ], "properties": { "source_id": { "type": "string", @@ -2881,6 +2885,47 @@ "team_id": { "type": "string", "description": "Team Id for assigning a conversation to a team" + }, + "message": { + "type": "object", + "description": "The initial message to be sent to the conversation", + "required": [ + "content" + ], + "properties": { + "content": { + "type": "string", + "description": "The content of the message" + }, + "template_params": { + "type": "object", + "description": "The template params for the message in case of whatsapp Channel", + "properties": { + "name": { + "type": "string", + "description": "Name of the template", + "example": "sample_issue_resolution" + }, + "category": { + "type": "string", + "description": "Category of the template", + "example": "UTILITY" + }, + "language": { + "type": "string", + "description": "Language of the template", + "example": "en_US" + }, + "processed_params": { + "type": "object", + "description": "The processed param values for template variables in template", + "example": { + "1": "Chatwoot" + } + } + } + } + } } } } @@ -6246,6 +6291,34 @@ "content_attributes": { "type": "object", "description": "attributes based on your content type" + }, + "template_params": { + "type": "object", + "description": "The template params for the message in case of whatsapp Channel", + "properties": { + "name": { + "type": "string", + "description": "Name of the template", + "example": "sample_issue_resolution" + }, + "category": { + "type": "string", + "description": "Category of the template", + "example": "UTILITY" + }, + "language": { + "type": "string", + "description": "Language of the template", + "example": "en_US" + }, + "processed_params": { + "type": "object", + "description": "The processed param values for template variables in template", + "example": { + "1": "Chatwoot" + } + } + } } } },