curl --request POST \
--url https://api.statisfy.com/v1/objects/project/records \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"account": null,
"assignee": null,
"description": null,
"due_date": null,
"fields": {},
"priority": null,
"start_date": null,
"template": null,
"title": null
}
'import requests
url = "https://api.statisfy.com/v1/objects/project/records"
payload = {
"account": None,
"assignee": None,
"description": None,
"due_date": None,
"fields": {},
"priority": None,
"start_date": None,
"template": None,
"title": None
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
account: null,
assignee: null,
description: null,
due_date: null,
fields: {},
priority: null,
start_date: null,
template: null,
title: null
})
};
fetch('https://api.statisfy.com/v1/objects/project/records', 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/objects/project/records",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'account' => null,
'assignee' => null,
'description' => null,
'due_date' => null,
'fields' => [
],
'priority' => null,
'start_date' => null,
'template' => null,
'title' => null
]),
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/objects/project/records"
payload := strings.NewReader("{\n \"account\": null,\n \"assignee\": null,\n \"description\": null,\n \"due_date\": null,\n \"fields\": {},\n \"priority\": null,\n \"start_date\": null,\n \"template\": null,\n \"title\": null\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.statisfy.com/v1/objects/project/records")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"account\": null,\n \"assignee\": null,\n \"description\": null,\n \"due_date\": null,\n \"fields\": {},\n \"priority\": null,\n \"start_date\": null,\n \"template\": null,\n \"title\": null\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.statisfy.com/v1/objects/project/records")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"account\": null,\n \"assignee\": null,\n \"description\": null,\n \"due_date\": null,\n \"fields\": {},\n \"priority\": null,\n \"start_date\": null,\n \"template\": null,\n \"title\": null\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"account": "<string>",
"account_name": "<string>",
"assignee": "<string>",
"created_at": "<string>",
"creator": "<string>",
"description": "<string>",
"due_date": "<string>",
"fields": {},
"priority": "low",
"source": "<string>",
"start_date": "<string>",
"status": "<string>",
"status_group": "not_started",
"template": "<string>",
"title": "<string>",
"updated_at": "<string>",
"warnings": [
"<string>"
]
}Create a project
Creates a project and returns it with 201: the app’s own create, with source statisfy and no creator. title is required. account (a live account’s id), description, priority (low, medium or high), start_date (today, US Pacific, when not sent), due_date (30 days from now when not sent), assignee (a user’s id), status (a status’s name) and custom fields under fields are optional; the project may not end before it starts, defaults included. Without status, it starts in your workspace’s TODO status unless its template has a status template (below); a sent status must be one of that template’s statuses. With template (an id from GET /v1/project_templates) it is made from that template, as in the app: its tasks are created, scheduled from start_date; it starts in the first status of the template’s status template, if it has one; it is due the template’s number of days from now when due_date is not sent; a template for an account’s projects needs account, and one that assigns the project from an account field needs that field filled on the account (a sent assignee still wins). A template task the app refuses is skipped and named in the answer’s warnings: its subtasks are created at the top level, and its dependencies are left out. warnings also names a task created without its custom values and a custom field the template names that no longer exists. Every key is checked before anything is written, and any problem refuses the whole request with a 422 listing each one in details. A 500 that says the project was created names it in details (project_ids): do not create it again. Send an Idempotency-Key header to make a retry safe: the same key replays the first answer, including such a 500.
curl --request POST \
--url https://api.statisfy.com/v1/objects/project/records \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"account": null,
"assignee": null,
"description": null,
"due_date": null,
"fields": {},
"priority": null,
"start_date": null,
"template": null,
"title": null
}
'import requests
url = "https://api.statisfy.com/v1/objects/project/records"
payload = {
"account": None,
"assignee": None,
"description": None,
"due_date": None,
"fields": {},
"priority": None,
"start_date": None,
"template": None,
"title": None
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
account: null,
assignee: null,
description: null,
due_date: null,
fields: {},
priority: null,
start_date: null,
template: null,
title: null
})
};
fetch('https://api.statisfy.com/v1/objects/project/records', 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/objects/project/records",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'account' => null,
'assignee' => null,
'description' => null,
'due_date' => null,
'fields' => [
],
'priority' => null,
'start_date' => null,
'template' => null,
'title' => null
]),
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/objects/project/records"
payload := strings.NewReader("{\n \"account\": null,\n \"assignee\": null,\n \"description\": null,\n \"due_date\": null,\n \"fields\": {},\n \"priority\": null,\n \"start_date\": null,\n \"template\": null,\n \"title\": null\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.statisfy.com/v1/objects/project/records")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"account\": null,\n \"assignee\": null,\n \"description\": null,\n \"due_date\": null,\n \"fields\": {},\n \"priority\": null,\n \"start_date\": null,\n \"template\": null,\n \"title\": null\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.statisfy.com/v1/objects/project/records")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"account\": null,\n \"assignee\": null,\n \"description\": null,\n \"due_date\": null,\n \"fields\": {},\n \"priority\": null,\n \"start_date\": null,\n \"template\": null,\n \"title\": null\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"account": "<string>",
"account_name": "<string>",
"assignee": "<string>",
"created_at": "<string>",
"creator": "<string>",
"description": "<string>",
"due_date": "<string>",
"fields": {},
"priority": "low",
"source": "<string>",
"start_date": "<string>",
"status": "<string>",
"status_group": "not_started",
"template": "<string>",
"title": "<string>",
"updated_at": "<string>",
"warnings": [
"<string>"
]
}Authorizations
An API key, sent as Authorization: Bearer stfy_live_…. See Authentication for how to get one and which scopes it needs.
Body
A create body in the project's own shape: standard keys at the top level, custom
keys under fields. title is required.
Response
Successful Response
A new project, and what its create from a template could not do.
Was this page helpful?