Delete Template
Video Templates
Delete Template
Permanently delete a specific video template using its unique identifier
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.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
The unique identifier of the template to deleteExample:
202512230204424435786014d42904bbc95813430789fe736Headers
API key for authentication (starts with
pictai_)Response
Indicates whether the deletion was successful
Confirmation message about the deletion
Response Examples
Code Examples
Usage Notes
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
- Always back up before deletion: Use the Get Template By Id endpoint to retrieve the complete configuration before deleting
- Implement confirmation: Require user confirmation before executing delete operations
- Use dry runs: Test deletion logic with dry run mode before executing
- Log deletions: Keep audit logs of deleted templates for accountability
- 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
Related Endpoints
- Get Templates - List all available templates
- Get Template By Id - Retrieve template details before deleting
- Update Template - Modify template instead of deleting
- Create Template - Create a new template
