`POST /api/workflows/templates/{slug}` — materialize a template into a project (WP D). Returns the new workflow id and any triggers the template provisioned (e.g. the token-addressed receiver URLs the user must paste into their git host's webhook UI).
POST
/api/workflows/templates/{slug}
const url = 'https://example.com/api/workflows/templates/example';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"project_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/workflows/templates/example \ --header 'Content-Type: application/json' \ --data '{ "project_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" }'Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”slug
required
string
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
POST /api/workflows/templates/{slug} body — which project to materialize
the template into.
object
project_id
required
string format: uuid
Examplegenerated
{ "project_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}Responses
Section titled “Responses”Media typeapplication/json
POST /api/workflows/templates/{slug} response — the new workflow id plus
the triggers the template provisioned.
object
id
required
string format: uuid
triggers
required
Array<object>
One provisioned trigger in the materialization response — the bits the UI surfaces to the user (the URL token for a token-addressed receiver).
object
enabled
required
boolean
id
required
string format: uuid
kind
required
string
token
string | null
Examplegenerated
{ "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "triggers": [ { "enabled": true, "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "kind": "example", "token": "example" } ]}