Delete Template

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

HeaderTypeRequiredDescription
Content-TypestringYesapplication/json;charset=UTF-8
x-api-keystringYesYour Account API key


Request Body

FieldTypeRequiredDescription
channel_idstringYesWhatsApp channel ID associated with the template
templateNamestringYesName of the template to delete
templateIdstringYesUnique 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, and templateId correspond 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.