curl --request PATCH \
--url https://{projectID}.texterchat.com/server/api/v2/whatsapp/templates/{accountId}/{templateName} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "Updated Template",
"chatStatus": 3,
"usage": "bulk"
}
'{
"_id": "6891bb93481ccea320113a91",
"name": "bulk_marketing_272",
"title": "<string>",
"usage": "inbox",
"chatStatus": 0,
"created": 123,
"updatedAt": "2023-11-07T05:31:56Z",
"departments": [
"<string>"
],
"isDefault": true,
"setBotNode": "<string>",
"bot": "<string>",
"replyText": "<string>",
"responsibleAgent": "<string>",
"responsibleDepartment": "<string>",
"attachedFile": {
"name": "<string>",
"url": "<string>"
},
"provider": "<string>",
"channelInfo": {
"name": "whatsapp",
"accountId": "972586640430"
},
"provider_template": {
"name": "<string>",
"category": "MARKETING",
"localizations": [
{
"status": "REQUESTED",
"rejectionReason": "NONE",
"language": "he",
"components": [
{
"type": "HEADER",
"text": "<string>",
"format": "IMAGE",
"example": {
"header_handle": [
"<string>"
],
"body_text": [
[
"<string>"
]
],
"header_text": [
"<string>"
]
},
"buttons": [
{
"type": "QUICK_REPLY",
"text": "<string>",
"url": "<string>",
"phone_number": "<string>",
"flow_id": "<string>",
"flow_action": "navigate",
"navigate_screen": "<string>",
"example": {
"url": "<string>"
}
}
]
}
],
"metadata": {},
"createdAt": "2023-11-07T05:31:56Z",
"lastUpdated": "2023-11-07T05:31:56Z",
"qualityScore": {
"score": "<string>",
"reasons": [
"High block rate"
]
}
}
],
"metadata": {}
},
"defaults": {},
"localizationDrafts": {}
}{
"error": "data must have required property 'usage'"
}Not FoundManage Templates
Update Existing Template
Update properties of a template - primarily its behavior within Texter. You can modify any attribute defined during template creation, except its name and category.
PATCH
https://{projectID}.texterchat.com/server/api/v2
/
whatsapp
/
templates
/
{accountId}
/
{templateName}
curl --request PATCH \
--url https://{projectID}.texterchat.com/server/api/v2/whatsapp/templates/{accountId}/{templateName} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "Updated Template",
"chatStatus": 3,
"usage": "bulk"
}
'{
"_id": "6891bb93481ccea320113a91",
"name": "bulk_marketing_272",
"title": "<string>",
"usage": "inbox",
"chatStatus": 0,
"created": 123,
"updatedAt": "2023-11-07T05:31:56Z",
"departments": [
"<string>"
],
"isDefault": true,
"setBotNode": "<string>",
"bot": "<string>",
"replyText": "<string>",
"responsibleAgent": "<string>",
"responsibleDepartment": "<string>",
"attachedFile": {
"name": "<string>",
"url": "<string>"
},
"provider": "<string>",
"channelInfo": {
"name": "whatsapp",
"accountId": "972586640430"
},
"provider_template": {
"name": "<string>",
"category": "MARKETING",
"localizations": [
{
"status": "REQUESTED",
"rejectionReason": "NONE",
"language": "he",
"components": [
{
"type": "HEADER",
"text": "<string>",
"format": "IMAGE",
"example": {
"header_handle": [
"<string>"
],
"body_text": [
[
"<string>"
]
],
"header_text": [
"<string>"
]
},
"buttons": [
{
"type": "QUICK_REPLY",
"text": "<string>",
"url": "<string>",
"phone_number": "<string>",
"flow_id": "<string>",
"flow_action": "navigate",
"navigate_screen": "<string>",
"example": {
"url": "<string>"
}
}
]
}
],
"metadata": {},
"createdAt": "2023-11-07T05:31:56Z",
"lastUpdated": "2023-11-07T05:31:56Z",
"qualityScore": {
"score": "<string>",
"reasons": [
"High block rate"
]
}
}
],
"metadata": {}
},
"defaults": {},
"localizationDrafts": {}
}{
"error": "data must have required property 'usage'"
}Not FoundRequired token scopes:
Manage WhatsApp templatesהרשאות
פרמטרי נתיב
גוף
application/json
תגובה
The updated template object. Field-by-field reference: The Template object
A WhatsApp template in Texter, including internal behavior (chat routing rules, departments, defaults) and provider state (WhatsApp approval status, localized content)