Skip to main content

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​

The updated egress template, with incremented version and, if a new CSV was uploaded, the updated mappings CSV URL