Create a builder session
A short-lived link to the embedded builder for this template: upload documents, add roles, and drag fields onto pages. Embed it with mountBuilder from coss/sign (from an origin in your Sign settings' allowed_origins) for whoever edits the template.
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
- …
expires_in?integerSeconds until the link expires: default 3600, at most 86400.
60 <= value <= 86400The builder session, with its link.
application/json- response
- response
- …
object*"sign_builder_session""sign_builder_session"id*stringtemplate_id*stringurl*stringThe builder: embed it (from an allowed origin, mountBuilder from coss/sign) for whoever edits the template: they can upload documents, add roles and place fields. Show it only to them.
token*stringThe secret part of url, shown only here.
expires_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.createBuilderSession("stpl_01k7c8m4q2f3e9v6t5r1n0p8yz", { expires_in: 3600,});{ "object": "sign_builder_session", "id": "sbs_01k7c8m4q2f3e9v6t5r1n0p8yz", "template_id": "stpl_01k7c8m4q2f3e9v6t5r1n0p8yz", "url": "https://sign.example/b/sbs_01k7c8m4q2f3e9v6t5r1n0p8yz#cossb_…", "token": "cossb_…", "expires_at": "2026-10-26T15:04:05.000Z"}