curl --request POST \
--url https://api.parley.so/v1/tasks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "<string>",
"assigneeId": "<string>",
"dueDate": "2023-12-25",
"description": "<string>",
"fields": {}
}
'import requests
url = "https://api.parley.so/v1/tasks"
payload = {
"title": "<string>",
"assigneeId": "<string>",
"dueDate": "2023-12-25",
"description": "<string>",
"fields": {}
}
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({
title: '<string>',
assigneeId: '<string>',
dueDate: '2023-12-25',
description: '<string>',
fields: {}
})
};
fetch('https://api.parley.so/v1/tasks', 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.parley.so/v1/tasks",
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([
'title' => '<string>',
'assigneeId' => '<string>',
'dueDate' => '2023-12-25',
'description' => '<string>',
'fields' => [
]
]),
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.parley.so/v1/tasks"
payload := strings.NewReader("{\n \"title\": \"<string>\",\n \"assigneeId\": \"<string>\",\n \"dueDate\": \"2023-12-25\",\n \"description\": \"<string>\",\n \"fields\": {}\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.parley.so/v1/tasks")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"<string>\",\n \"assigneeId\": \"<string>\",\n \"dueDate\": \"2023-12-25\",\n \"description\": \"<string>\",\n \"fields\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.parley.so/v1/tasks")
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 \"title\": \"<string>\",\n \"assigneeId\": \"<string>\",\n \"dueDate\": \"2023-12-25\",\n \"description\": \"<string>\",\n \"fields\": {}\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"title": "<string>",
"status": "todo",
"assignee": {
"id": "<string>",
"name": "<string>",
"email": "<string>"
},
"dueDate": "2023-12-25",
"description": "<string>",
"linkedRecord": {
"type": "project",
"id": "<string>",
"name": "<string>"
},
"reminder": {
"remindAt": "2023-11-07T05:31:56Z",
"sentAt": "2023-11-07T05:31:56Z"
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"fields": {}
}{
"error": {
"code": "VALIDATION_FAILED",
"message": "The request is invalid.",
"details": {
"issues": [
{
"path": "<string>",
"message": "<string>"
}
]
}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "Missing or invalid credentials."
}
}{
"error": {
"code": "FORBIDDEN",
"message": "You don't have permission to do this."
}
}{
"error": {
"code": "TOO_MANY_REQUESTS",
"message": "Too many requests."
}
}Create a task
Create a task, optionally about one project, account, or contact, with a status (todo unless given), assignee, due date, and description. Pass reminder to have Parley remind the caller about it.
curl --request POST \
--url https://api.parley.so/v1/tasks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "<string>",
"assigneeId": "<string>",
"dueDate": "2023-12-25",
"description": "<string>",
"fields": {}
}
'import requests
url = "https://api.parley.so/v1/tasks"
payload = {
"title": "<string>",
"assigneeId": "<string>",
"dueDate": "2023-12-25",
"description": "<string>",
"fields": {}
}
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({
title: '<string>',
assigneeId: '<string>',
dueDate: '2023-12-25',
description: '<string>',
fields: {}
})
};
fetch('https://api.parley.so/v1/tasks', 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.parley.so/v1/tasks",
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([
'title' => '<string>',
'assigneeId' => '<string>',
'dueDate' => '2023-12-25',
'description' => '<string>',
'fields' => [
]
]),
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.parley.so/v1/tasks"
payload := strings.NewReader("{\n \"title\": \"<string>\",\n \"assigneeId\": \"<string>\",\n \"dueDate\": \"2023-12-25\",\n \"description\": \"<string>\",\n \"fields\": {}\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.parley.so/v1/tasks")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"<string>\",\n \"assigneeId\": \"<string>\",\n \"dueDate\": \"2023-12-25\",\n \"description\": \"<string>\",\n \"fields\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.parley.so/v1/tasks")
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 \"title\": \"<string>\",\n \"assigneeId\": \"<string>\",\n \"dueDate\": \"2023-12-25\",\n \"description\": \"<string>\",\n \"fields\": {}\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"title": "<string>",
"status": "todo",
"assignee": {
"id": "<string>",
"name": "<string>",
"email": "<string>"
},
"dueDate": "2023-12-25",
"description": "<string>",
"linkedRecord": {
"type": "project",
"id": "<string>",
"name": "<string>"
},
"reminder": {
"remindAt": "2023-11-07T05:31:56Z",
"sentAt": "2023-11-07T05:31:56Z"
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"fields": {}
}{
"error": {
"code": "VALIDATION_FAILED",
"message": "The request is invalid.",
"details": {
"issues": [
{
"path": "<string>",
"message": "<string>"
}
]
}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "Missing or invalid credentials."
}
}{
"error": {
"code": "FORBIDDEN",
"message": "You don't have permission to do this."
}
}{
"error": {
"code": "TOO_MANY_REQUESTS",
"message": "Too many requests."
}
}Authorizations
A Parley API key.
Body
Task title.
1 - 500Defaults to todo.
todo, in_progress, done, cancelled The ID of an active user in the organization to assign it to.
1The day the task is due, as YYYY-MM-DD.
Details, up to 2,000 characters.
1 - 2000The project, account, or contact the task is about, as { type, id }. A project must be one you can edit.
Show child attributes
Show child attributes
Your reminder for the task, as { remindAt }.
Show child attributes
Show child attributes
Custom field values to set on the task, keyed by field name or ID. A value replaces the current one, null clears it, and fields you don't mention are left alone. Each value must match its field's type: a string for text, long_text, email, url, single_select (one of the field's options), and user (the id of an active user in the organization); a number; true or false; an ISO 8601 date-time or YYYY-MM-DD date; a list of strings for collection ([] clears it); or { streetAddress, cityTown, state, country } for address. At most 50 fields. Status, assignee, due date, and description are properties of the task, not fields.
Show child attributes
Show child attributes
Response
Created.
The task ID.
1Task title.
1 - 500Where the task stands: todo, in_progress, done, or cancelled, or null when it has no status. done and cancelled close it.
todo, in_progress, done, cancelled The person the task is assigned to, or null.
Show child attributes
Show child attributes
The day the task is due, as YYYY-MM-DD, or null.
Details, or null.
The project, account, or contact the task is about, or null.
Show child attributes
Show child attributes
Your reminder for the task, or null. Reminders are personal: each person sees only their own.
Show child attributes
Show child attributes
When the task was created.
When the task was last renamed or linked to a different record. Changes to its status, assignee, due date, description, field values, and reminders do not change it.
Custom field values, keyed by field name, with a key for every field defined for tasks (null when unset). The value's shape follows the field's type. Status, assignee, due date, and description are properties of the task, not fields.
Show child attributes
Show child attributes
Was this page helpful?
