Peach
  1. whatsapp_templates
Peach
  • messaging
    • Send a pre-approved template message
      POST
    • Poll template message status
      GET
    • Launch a broadcast
      POST
    • Poll broadcast status
      GET
    • Poll template messages status
      GET
    • Connect to AI Agent
      POST
  • whatsapp_templates
    • List all templates
      GET
    • Create a template
      POST
    • Update template
      PATCH
    • Archive template
      PATCH
    • Pause template
      PATCH
    • Submit template
      PATCH
  • conversations
    • Agent Assignment
      POST
    • Close Conversation
      POST
  • contacts
    • Create a contact on Peach
      POST
  • orders
    • Create an order
      POST
    • Find order by ID
      GET
    • Create a refund for an order
      POST
  • medias
    • List available medias
      GET
    • Add a media
      POST
    • Remove a media
      DELETE
  • webhooks
    • Order status webhooks
    • Flow execution status webhooks
    • Message delivery status webhooks
    • AI flow execution status webhooks
  1. whatsapp_templates

Create a template

POST
/api/v1/whats_app_templates

Request

Authorization
Add parameter in header
Authorization
Example:
Authorization: ********************
Body Params application/json
whats_app_template
object 
required
template_name
string 
required
language
string 
required
category
string 
required
purpose
string 
required
whats_app_business_account_id
integer 
required
components_attributes
array [object {5}] 
required
Example
{
  "whats_app_template": {
    "template_name": "New Promotion",
    "language": "en",
    "category": "MARKETING",
    "purpose": "promotion",
    "whats_app_business_account_id": 456,
    "components_attributes": [
      {
        "component_type": "header",
        "data_type": "image"
      },
      {
        "component_type": "body",
        "data_type": "text",
        "value": "Exciting news! Get 20% off on all items. Use code {{campaign.coupon_code | fallback: 'DEFAULT20', example: 'SUMMER20'}}. Shop now!",
        "index": 0
      },
      {
        "component_type": "button",
        "sub_type": "quick_reply",
        "data_type": "text",
        "value": "Shop Now",
        "index": 1
      }
    ]
  }
}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST '/api/v1/whats_app_templates' \
--header 'Content-Type: application/json' \
--header 'Authorization;' \
--data-raw '{
  "whats_app_template": {
    "template_name": "New Promotion",
    "language": "en",
    "category": "MARKETING",
    "purpose": "promotion",
    "whats_app_business_account_id": 456,
    "components_attributes": [
      {
        "component_type": "header",
        "data_type": "image"
      },
      {
        "component_type": "body",
        "data_type": "text",
        "value": "Exciting news! Get 20% off on all items. Use code {{campaign.coupon_code | fallback: '\''DEFAULT20'\'', example: '\''SUMMER20'\''}}. Shop now!",
        "index": 0
      },
      {
        "component_type": "button",
        "sub_type": "quick_reply",
        "data_type": "text",
        "value": "Shop Now",
        "index": 1
      }
    ]
  }
}'

Responses

🟢200Success
application/json
Body
object {0}
Example
{}
Modified at 2025-06-10 07:10:53
Previous
List all templates
Next
Update template
Built with