Skip to main content
DELETE
Delete Template

Overview

Permanently delete a video template from your Pictory account using its unique identifier. This action removes the template and all its configuration data, including scene structures, variables, and settings.
This action is permanent and cannot be undone. Once deleted, the template and all its configuration will be permanently removed from your account. Videos already created from this template will not be affected.
You need a valid API key to use this endpoint. Get your API key from the API Access page in your Pictory dashboard.

API Endpoint


Request Parameters

Path Parameters

string
required
The unique identifier of the template to deleteExample: 202512230204424435786014d42904bbc95813430789fe736

Headers

string
required
API key for authentication (starts with pictai_)

Response

boolean
Indicates whether the deletion was successful
string
Confirmation message about the deletion

Response Examples


Code Examples

Replace YOUR_API_KEY with your actual API key that starts with pictai_

Usage Notes

Permanent Deletion: Deleted templates cannot be recovered. Ensure you have backups of template configurations before deleting.
Before deleting a template, consider using the Get Template By Id endpoint to retrieve and back up the complete template configuration for archival purposes.
Existing Videos: Videos that were already created from this template will continue to exist and function normally. Only the template itself is deleted.
Permission Requirements: You can only delete templates that belong to your account or team. Attempting to delete templates from other accounts will result in a 403 Forbidden error.

Common Use Cases

1. Delete Single Template with Confirmation

Delete a template after user confirmation:

2. Bulk Delete Deprecated Templates

Delete all deprecated templates:

3. Delete Templates by Language

Delete all templates for a specific language:

4. Back Up Before Delete

Back up template configuration before deletion:

5. Safe Delete with Retry Logic

Delete template with error handling and retry:

6. Delete Unpublished Draft Templates

Delete all unpublished draft templates:

Best Practices

Safety Measures

  1. Always back up before deletion: Use the Get Template By Id endpoint to retrieve the complete configuration before deleting
  2. Implement confirmation: Require user confirmation before executing delete operations
  3. Use dry runs: Test deletion logic with dry run mode before executing
  4. Log deletions: Keep audit logs of deleted templates for accountability
  5. Handle errors gracefully: Implement proper error handling and retry logic

Common Pitfalls

  • ❌ No Backup: Deleting without backing up the template configuration
  • ❌ Bulk Operations: Deleting multiple templates without confirmation
  • ❌ Production Testing: Testing deletion on production templates
  • ❌ Ignoring Errors: Not checking response status codes

Bulk Operations

When deleting multiple templates:
  • Add delays between deletions to avoid rate limiting
  • Process deletions in batches
  • Implement comprehensive error handling
  • Provide progress updates to users
  • Log both successes and failures

Recovery Planning

Since deletion is permanent:
  • Maintain regular backups of template configurations
  • Export template data before deletion
  • Keep deletion logs for audit trails
  • Store template JSON files for potential recreation