Create a template with its steps in the project
curl --request POST \ --url https://api.whatsbuilt.fi/v1/projects/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/templates \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "description": "example", "is_default": true, "fail_reason_list_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "steps": [ { "name": "example", "description": "example", "required": true, "sequential": true, "check_list_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "fail_reason_list_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" } ] }'A step’s check_list_id names a check list of the project or its organisation (400 CHECK_GROUP_UNAVAILABLE otherwise). A repeat with the same Idempotency-Key and body returns the first template with 200.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Header Parameters
Section titled “Header Parameters”A repeat with the same key and body returns the first answer instead of writing again. Keys are per integration and project.
Request Bodyrequired
Section titled “Request Bodyrequired”The body of createTemplate.
object
The project’s default template: opened for an element no plan covers. Default false
A step of CreateTemplateBody.
object
Default true
Default true: the step waits for the required steps before it
A check list of the project or the organisation; the step is then passed by its checks
Example generated
{ "name": "example", "description": "example", "is_default": true, "fail_reason_list_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "steps": [ { "name": "example", "description": "example", "required": true, "sequential": true, "check_list_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "fail_reason_list_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" } ]}Responses
Section titled “Responses”The template an earlier call with the same Idempotency-Key created
A live template.
object
The template.
Null for the organisation’s own template
Its organisation.
Its name.
Its description.
Opened for an element that no plan covers
Its fail reasons.
Who created it.
When it was created.
When it was changed last.
Its steps.
A step of a template.
object
The step.
Its place.
Its name.
Its description.
True when it must pass.
The step waits for the required steps before it
A step with a check list is passed by its checks
Its fail reasons.
The row’s change time.
Example
{ "deleted": false}The template
A live template.
object
The template.
Null for the organisation’s own template
Its organisation.
Its name.
Its description.
Opened for an element that no plan covers
Its fail reasons.
Who created it.
When it was created.
When it was changed last.
Its steps.
A step of a template.
object
The step.
Its place.
Its name.
Its description.
True when it must pass.
The step waits for the required steps before it
A step with a check list is passed by its checks
Its fail reasons.
The row’s change time.
Example
{ "deleted": false}Invalid body, parameters or Idempotency-Key
The error body of every /v1 answer of 400 or more.
object
A sentence for people; it may change
Part of the contract
What the code names, where it names something
The X-Request-Id of the call
Example generated
{ "error": "example", "code": "example", "details": "example", "request_id": "example"}Missing, malformed, expired or revoked token
The error body of every /v1 answer of 400 or more.
object
A sentence for people; it may change
Part of the contract
What the code names, where it names something
The X-Request-Id of the call
Example generated
{ "error": "example", "code": "example", "details": "example", "request_id": "example"}INSUFFICIENT_SCOPE; INSUFFICIENT_PROJECT_ROLE when the project role the scopes give does not cover the write, or the project is not the integration’s; PUBLIC_API_DISABLED when the project’s owning organisation has turned the API off
The error body of every /v1 answer of 400 or more.
object
A sentence for people; it may change
Part of the contract
What the code names, where it names something
The X-Request-Id of the call
Example generated
{ "error": "example", "code": "example", "details": "example", "request_id": "example"}No such project or template, or the template is the organisation’s own
The error body of every /v1 answer of 400 or more.
object
A sentence for people; it may change
Part of the contract
What the code names, where it names something
The X-Request-Id of the call
Example generated
{ "error": "example", "code": "example", "details": "example", "request_id": "example"}DEFAULT_TEMPLATE_CONFLICT: another template became the default at the same moment
The error body of every /v1 answer of 400 or more.
object
A sentence for people; it may change
Part of the contract
What the code names, where it names something
The X-Request-Id of the call
Example generated
{ "error": "example", "code": "example", "details": "example", "request_id": "example"}RESOURCE_DELETED: what this Idempotency-Key created has since been deleted; details.id names it
The error body of every /v1 answer of 400 or more.
object
A sentence for people; it may change
Part of the contract
What the code names, where it names something
The X-Request-Id of the call
Example generated
{ "error": "example", "code": "example", "details": "example", "request_id": "example"}IDEMPOTENCY_KEY_REUSED: the key was used with another body
The error body of every /v1 answer of 400 or more.
object
A sentence for people; it may change
Part of the contract
What the code names, where it names something
The X-Request-Id of the call
Example generated
{ "error": "example", "code": "example", "details": "example", "request_id": "example"}RATE_LIMITED; wait for Retry-After seconds
The error body of every /v1 answer of 400 or more.
object
A sentence for people; it may change
Part of the contract
What the code names, where it names something
The X-Request-Id of the call
Example generated
{ "error": "example", "code": "example", "details": "example", "request_id": "example"}