Update a template
Changes the fields given. documents, roles and fields each replace the whole list. Requests already made from it don't change.
bearerAuthAuthorizationBearer <token>A secret API key from the dashboard: coss_live_… for production environments, coss_test_… for sandbox environments.
id*stringThe template's id.
Coss-Version?"2026-10-10"The API version (a date) to use for this request. Defaults to your organization's version, pinned to the latest one when it first used the API and upgraded from the dashboard. The SDK always sends the version it was built for.
"2026-10-10"application/json- body
- body
- …
Only the fields given change; documents, roles and fields replace the whole list (fields refer to documents by their new positions).
name?string1 <= length <= 200title?|Requests' title (a request may set its own). Default: name.
1 <= length <= 200message?|Requests' message to signers (a request may set its own).
length <= 5000signing_order?string"parallel""sequential"documents?array<|>items <= 10roles?array<>Who signs: each request names one signer per role.
items <= 20fields?array<|>Each role's fields, by position or text anchor (resolved when saved). A template can be used once every role has a signature field.
items <= 500The template.
application/json- response
- response
- …
object*"sign_template""sign_template"id*stringname*stringtitle*string|nullmessage*string|nullsigning_order*string"parallel""sequential"documents*array<>roles*array<>fields*array<>ready*booleanIt has documents and every role has a signature field, so requests can be made from it.
sandbox*booleancreated_at*stringdate-timeupdated_at*stringdate-timeimport { Coss } from "coss";const coss = new Coss({ apiKey: process.env.COSS_API_KEY, baseUrl: "https://api.coss.com",});const { data, error } = await coss.sign.templates.update("stpl_01k7c8m4q2f3e9v6t5r1n0p8yz", { name: "Mutual NDA (2026)",});{ "object": "sign_template", "id": "stpl_01k7c8m4q2f3e9v6t5r1n0p8yz", "name": "Mutual NDA", "title": null, "message": null, "signing_order": "parallel", "documents": [ { "id": "sdoc_01k7c8m4q2f3e9v6t5r1n0p8yz", "filename": "nda.pdf", "sha256": "9f2c6c0f0e1d4b7a8c5e3f2a1b0c9d8e7f6a5b4c3d2e1f0a9b8c7d6e5f4a3b2c", "page_count": 1, "pages": [ { "width": 612, "height": 792 } ] } ], "roles": [ { "key": "client", "name": "Client" } ], "fields": [ { "id": "stfld_01k7c8m4q2f3e9v6t5r1n0p8yz", "role": "client", "document_id": "sdoc_01k7c8m4q2f3e9v6t5r1n0p8yz", "type": "signature", "page": 1, "x": 72, "y": 640, "width": 160, "height": 30, "required": true, "label": null, "merge_key": null } ], "ready": true, "sandbox": false, "created_at": "2026-10-26T15:04:05.000Z", "updated_at": "2026-10-26T15:04:05.000Z"}