For the complete documentation index, see llms.txt. This page is also available as Markdown.

Delete template by ID

Permanently deletes a message template. This action is irreversible and will prevent the template from being triggered by any future events.

Endpoint

DELETE/v2/messages/templates/{id}

Link

Request

Path Parameters

Parameter
Type
Description
Required
Example

id

string

Template ID to delete.

Yes

"tpl_12345"

Headers

Key
Value
Required

Authorization

Bearer <JWT>

Yes

Accept

application/json

Yes


Response (200 OK)

Returns a success status indicating whether the template was deleted.

Response Fields

Field
Type
Description
Example

success

boolean

true if deleted successfully, false otherwise.

true

Example Response:

json


Examples

Request

bash

Error Response

If the template doesn't exist or is already deleted:

json


Error Responses

  1. Template Not Found:

    json

  2. Unauthorized:

    json

  3. Template in Use:

    json


Notes

  • Irreversible Action: Deleted templates cannot be recovered.

  • Dependencies: Ensure the template is not actively being used before deletion.

  • Soft Delete: Some systems may implement soft deletion (marking as deleted but retaining data).

  • Response Codes:

    • 200: Success (even if success=false for soft failures)

    • 404: Template not found

    • 403: Authorization failure

Recommended Workflow:

  1. First retrieve the template to confirm it's the correct one

  2. Deactivate the template if active (isActive: false)

  3. Then proceed with deletion

Real request:

Real response:

Last updated