Template drafts

Create the template’s draft (a layered workspace on the draft base)

Opens the organization template’s single live draft (key sf:draft:<slug>:<8 hex>, purpose template_draft, persistent, layered) on base (default: the latest published version; required when the template has none, which creates the organization template named display_name, default the slug). 202 with the open operation and the draft. Errors: 409 template_not_layered (the base is not layered-capable, or layered opens are off), 409 draft_exists (details.workspace_id), 403 template_dev_mode_role, 422 platform_template_slug / reserved_template_slug (new, edit) / base_required; 402/403/429 as for open (admitted like a start: a concurrent_workspaces refusal is queued up to 10 s, then 429 quota_exceeded with Retry-After). tool_token is null when the tool-token rate limit is used up. Supports Idempotency-Key.

post/v1/templates/{slug}/draft

Request

  • Base URL: https://api.shardflux.dev
  • URL: https://api.shardflux.dev/v1/templates/{slug}/draft
  • Auth: HTTP bearer

Path parameters

slugstring required

Request body

basestring

<slug>@<version>: a published, layered-capable version (default: the template’s latest published version; required when the template has none, which creates the organization template).

project_idstring uuid

UUIDv7, lowercase canonical form.

display_namestring

Template name when this draft creates the organization template (default: the slug).

agent_labelstring
toolsstring[]
inputsobject

Open-time inputs of the template version: {NAME: string} for its declared text inputs. A new workspace stores each given value, else the declared default; on an existing key inputs replaces them all (omitted = unchanged). Secret inputs are not passed here: they bind the stored secret of the same name. 422 input_unknown (undeclared name, details.names), input_invalid (a secret input, a non-string, or a value over 4096 bytes or with CR, LF or NUL; details.names), input_required (details {names, kind}).

Response

202: poll operation; 200: running and ready (tool_token set).

cell_endpointstring nullable required

Changes

No recorded changes to this operation across all 1 revision of this API.