Skip to main content
POST
Restore Template Version

Path parameters

string
required
Template ID (e.g., tpl_7VQhP2tM9xA1kR8bN).

Body parameters

integer
required
The version snapshot ID to restore from. Get this from the List Versions endpoint.

Response

Returns the restored template object with the full schema.

Example

This replaces the template’s current schema and submitters with the version snapshot. A pre-restore snapshot is created automatically so you can undo by restoring from it.

Common use case: recovering from accidental PUT

If a PUT /api/templates/:id with a partial schema accidentally wiped fields:
  1. Call GET /api/templates/:id/versions to find the version before the wipe (look for the highest field_count)
  2. Call POST /api/templates/:id/restore_version with that version’s id
  3. Verify with GET /api/templates/:id that all fields are restored
PUT /api/templates/:id replaces the entire schema array. To update specific fields, always GET the full schema first, modify the fields you need, and PUT the complete array back. There is no PATCH endpoint for partial schema updates.