Overview
Update the name, description, or workflow definition of an existing template.
The API playground does not support file uploads. Use cURL, Postman, or your application code to test this endpoint.
Content Type
This endpoint requires multipart/form-data content type.
Path Parameters
The unique identifier (UUID) of the template to update.
Request Parameters
A new descriptive name for your template (1-100 characters).
A new description of what this template does (1-500 characters).
A JSON file containing the updated ComfyUI workflow definition.
Response
Unique identifier (UUID) for the template.
UUID of the user who owns this template.
The template’s updated name.
The template’s updated description.
The updated ComfyUI workflow definition as a JSON object.
ISO 8601 timestamp when the template was created.
ISO 8601 timestamp when the template was last updated.
Example Response
{
"id": "t1e2m3p4-l5a6-7890-abcd-ef1234567890",
"user_id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"name": "Text to Image - Updated",
"description": "Updated text-to-image generation with SDXL and LoRA",
"body": {
"nodes": [...],
"links": [...],
"config": {...}
},
"created_at": "2024-01-15T10:00:00Z",
"updated_at": "2024-01-15T14:30:00Z"
}
cURL Example
Since the API playground doesn’t support file uploads, use this cURL command to test:
curl -X PUT https://api.comfycontrol.app/v1/template/{id} \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-F "name=Updated Template Name" \
-F "description=Updated description" \
-F "body=@/path/to/updated-workflow.json"
Replace:
{id} with the template UUID
YOUR_API_TOKEN with your actual API token
/path/to/updated-workflow.json with the path to your updated workflow JSON file
- Only include the fields you want to update (all are optional)
The -F flag automatically handles multipart/form-data with proper boundaries.
Error Responses
Bad request - validation error in the request.Common causes:
- Name or description too long
- Invalid JSON in body file
Unauthorized - invalid or missing authentication token.
Not Found - template with the specified ID does not exist or does not belong to your account.
Notes
- All fields in the request body are optional - only include fields you want to update
- Omitted fields will retain their current values
- Updating a template does not affect workflows that were already created using it
- Use cURL, Postman, or application code for testing - the API playground doesn’t support file uploads