Skip to content

Commit

Permalink
chore: Update API documentation for whatsapp templates (#8211)
Browse files Browse the repository at this point in the history
- Update API documentation for whatsapp templates
  • Loading branch information
sojan-official committed Oct 26, 2023
1 parent 8c67ea5 commit b6831d4
Show file tree
Hide file tree
Showing 3 changed files with 126 additions and 1 deletion.
21 changes: 21 additions & 0 deletions swagger/definitions/request/conversation/create_message.yml
Expand Up @@ -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"
33 changes: 32 additions & 1 deletion swagger/paths/application/conversation/index.yml
Expand Up @@ -66,6 +66,9 @@ post:
required: true
schema:
type: object
required:
- source_id
- inbox_id
properties:
source_id:
type: string
Expand Down Expand Up @@ -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
Expand Down
73 changes: 73 additions & 0 deletions swagger/swagger.json
Expand Up @@ -2840,6 +2840,10 @@
"required": true,
"schema": {
"type": "object",
"required": [
"source_id",
"inbox_id"
],
"properties": {
"source_id": {
"type": "string",
Expand Down Expand Up @@ -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"
}
}
}
}
}
}
}
}
Expand Down Expand Up @@ -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"
}
}
}
}
}
},
Expand Down

0 comments on commit b6831d4

Please sign in to comment.