Delete Message Template
Delete an omni-channel message template by ID using the Sinch Template Management API V2.
IMPORTANT: Execute this command directly. Do NOT generate script files. Perform the API call immediately.
Input
--id/-i: Template ID to delete - required--force/-f: Skip confirmation - optional
Arguments: $ARGUMENTS
Instructions
Execute these steps directly - do not write code or scripts:
If $ARGUMENTS empty: ask for template ID. Optionally list templates to help user choose. Otherwise parse.
Validate: --id (non-empty). If not --force, confirm with user: "Delete template {id}? Type 'yes' to confirm."
Get CONVERSATION_* env vars. Template API: https://{region}.template.api.sinch.com. If missing, report "Sinch API is not configured."
DELETE https://{region}.template.api.sinch.com/v2/projects/{projectId}/templates/{template_id} with OAuth2.
On success: "✅ Template deleted". Handle 404 (not found), 401 with clear messages.
Handle all errors gracefully.
Examples
/sinch-api-templates-delete --id=01F8MECHZX3TBDSZ7XRADM79XE
/sinch-api-templates-delete -i TEMPLATE_ID --force
API Reference
- Endpoint: DELETE /v2/projects/{project_id}/templates/{template_id}
- Documentation: https://developers.sinch.com/docs/conversation/templates/