Delete WhatsApp message templates associated with a channel.
Endpoint
DELETE /api/message-templates/official-templates
Base URL
https://api.rampwin.com
Description
Deletes an existing WhatsApp message template using the specified channel ID, template name, and template ID.
Headers
| Header | Type | Required | Description |
|---|---|---|---|
| Content-Type | string | Yes | application/json;charset=UTF-8 |
| x-api-key | string | Yes | Your Account API key |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
channel_id | string | Yes | WhatsApp channel ID associated with the template |
templateName | string | Yes | Name of the template to delete |
templateId | string | Yes | Unique ID of the template to delete |
Example Request
curl --location --request DELETE \
'https://api.rampwin.com/api/message-templates/official-templates' \
--header 'Content-Type: application/json;charset=UTF-8' \
--header 'x-api-key: YOUR_API_KEY' \
--data '{
"channel_id": "YOUR_CHANNEL_ID",
"templateName": "payment_receipt",
"templateId": "YOUR_TEMPLATE_ID"
}'
Example Request Body
{
"channel_id": "YOUR_CHANNEL_ID",
"templateName": "payment_receipt",
"templateId": "YOUR_TEMPLATE_ID"
}
Response
The exact response structure depends on the API implementation. The following are illustrative examples, not verified live API responses.
Success (200)
{
"success": true,
"message": "Template deleted successfully"
}
Error (400)
{
"success": false,
"message": "Invalid template details"
}
Error (401)
{
"success": false,
"message": "Unauthorized: Invalid or missing API key"
}
Error (404)
{
"success": false,
"message": "Template not found"
}
Important Notes
- Ensure that
channel_id,templateName, andtemplateIdcorrespond to the intended template. - Verify the template's existence and deletion status before retrying a failed request.
- Deletion may be irreversible. Confirm the target template before making the request.
- The HTTP status codes and response messages shown above are examples. Refer to the actual API response for the supported behavior.
