Update an existing egress template
PUT/api/v1/egress-templates/:templateId
Updates the metadata and/or mapping CSV of an existing egress template and increments its version.
When to use: call this to replace the column-mapping CSV or change configuration on a template previously created with POST /api/v1/egress-templates.
Partial-update semantics: only fields explicitly included in the request are changed; omitted fields keep their current stored values. entityType is immutable and is not an accepted field on this endpoint — it is always taken from the existing record.
Preconditions: tenant-id header must be present. The template must belong to the requesting tenant; cross-tenant access returns 404 (not 403). status, if supplied, is limited to draft or active — inactive is rejected with 400 on update.
Side effects: if a new CSV is supplied, it is uploaded to GCS at a new versioned path and the previous CSV object is left in place. Unlike create, a data-store write failure after a successful CSV upload does not roll back the new GCS object. file is optional; when omitted, the existing CSV is preserved.
Schedule field rules: the same daily/weekly/monthly/custom interdependencies as POST /api/v1/egress-templates apply.
Returns: the updated EgressTemplateResponse with the incremented version and, if a new CSV was uploaded, the updated mappingsCsvUrl.
Request
Responses
- 200
- 400
- 401
- 403
- 404
The updated egress template, with incremented version and, if a new CSV was uploaded, the updated mappings CSV URL
The request supplies an unsupported status, an invalid CSV, or schedule fields that violate the frequency's rules; the error message states which field and why
The request is missing a valid bearer token; re-authenticate and retry
The authenticated caller lacks the update-template permission for this tenant
No template with this id exists for the requesting tenant, or it belongs to a different tenant