curl --request PUT \
--url https://api.statisfy.com/v1/task_types/{task_type}/status_template \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"template_id": "<string>"
}
'import requests
url = "https://api.statisfy.com/v1/task_types/{task_type}/status_template"
payload = { "template_id": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({template_id: '<string>'})
};
fetch('https://api.statisfy.com/v1/task_types/{task_type}/status_template', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.statisfy.com/v1/task_types/{task_type}/status_template",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'template_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.statisfy.com/v1/task_types/{task_type}/status_template"
payload := strings.NewReader("{\n \"template_id\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.statisfy.com/v1/task_types/{task_type}/status_template")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"template_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.statisfy.com/v1/task_types/{task_type}/status_template")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"template_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"custom_fields": [
{
"key": "<string>",
"label": "<string>"
}
],
"label": "<string>",
"standard_fields": [
{
"hidden": true,
"key": "<string>",
"label": "<string>",
"required": true
}
],
"status_template": {
"id": "<string>",
"name": "<string>"
},
"type": "activity_task"
}Set the status template a task type uses
Sets the status template a task type’s tasks move through, as the task-type section of the app’s Templates page does; a type has one, so another set before is replaced. template_id: null (or the global template’s id) puts the type back on the workspace’s global template. Tasks already of the type keep their status. A project’s tasks take their project’s or project template’s statuses first. Status templates are made and changed with /v1/status_templates. A task type answers with its status_template (null: the workspace’s global one), its custom_fields (the task fields attached to it) and its standard_fields, each with whether the type hides or requires it.
curl --request PUT \
--url https://api.statisfy.com/v1/task_types/{task_type}/status_template \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"template_id": "<string>"
}
'import requests
url = "https://api.statisfy.com/v1/task_types/{task_type}/status_template"
payload = { "template_id": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({template_id: '<string>'})
};
fetch('https://api.statisfy.com/v1/task_types/{task_type}/status_template', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.statisfy.com/v1/task_types/{task_type}/status_template",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'template_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.statisfy.com/v1/task_types/{task_type}/status_template"
payload := strings.NewReader("{\n \"template_id\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.statisfy.com/v1/task_types/{task_type}/status_template")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"template_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.statisfy.com/v1/task_types/{task_type}/status_template")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"template_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"custom_fields": [
{
"key": "<string>",
"label": "<string>"
}
],
"label": "<string>",
"standard_fields": [
{
"hidden": true,
"key": "<string>",
"label": "<string>",
"required": true
}
],
"status_template": {
"id": "<string>",
"name": "<string>"
},
"type": "activity_task"
}Authorizations
An API key, sent as Authorization: Bearer stfy_live_…. See Authentication for how to get one and which scopes it needs.
Path Parameters
Body
Response
Successful Response
Was this page helpful?