Create a task from natural language
curl --request POST \
--url https://api.doers.sh/v2/tasks/quick \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"raw": "!!! call the accountant tomorrow 10am #Admin",
"deadline": "2023-12-25"
}
'import requests
url = "https://api.doers.sh/v2/tasks/quick"
payload = {
"raw": "!!! call the accountant tomorrow 10am #Admin",
"deadline": "2023-12-25"
}
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({raw: '!!! call the accountant tomorrow 10am #Admin', deadline: '2023-12-25'})
};
fetch('https://api.doers.sh/v2/tasks/quick', 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.doers.sh/v2/tasks/quick",
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([
'raw' => '!!! call the accountant tomorrow 10am #Admin',
'deadline' => '2023-12-25'
]),
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.doers.sh/v2/tasks/quick"
payload := strings.NewReader("{\n \"raw\": \"!!! call the accountant tomorrow 10am #Admin\",\n \"deadline\": \"2023-12-25\"\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.doers.sh/v2/tasks/quick")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"raw\": \"!!! call the accountant tomorrow 10am #Admin\",\n \"deadline\": \"2023-12-25\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.doers.sh/v2/tasks/quick")
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 \"raw\": \"!!! call the accountant tomorrow 10am #Admin\",\n \"deadline\": \"2023-12-25\"\n}"
response = http.request(request)
puts response.read_body{
"task": {
"id": "<string>",
"title": "<string>",
"notes": "<string>",
"status": "open",
"priority": 0,
"when": {
"kind": "today"
},
"deadline": "<string>",
"projectId": "<string>",
"areaId": "<string>",
"headingId": "<string>",
"tags": [
"<string>"
],
"checklist": [
{
"id": "<string>",
"label": "<string>",
"done": true
}
],
"completedAt": 123,
"durationMin": 123,
"kind": "task",
"repeat": {
"every": 183,
"unit": "day",
"mode": "calendar",
"weekdays": [
4
]
},
"visibility": "public",
"order": 123,
"notePath": "<string>",
"conversationPath": "<string>",
"assigneeId": "<string>",
"assignee": {
"id": "<string>",
"username": "<string>",
"name": "<string>",
"email": "<string>",
"image": "<string>"
},
"accessRole": "owner"
},
"parsed": {
"title": "<string>",
"priority": 0,
"projectId": "<string>",
"areaId": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
]
}
}Tasks
Create a task from natural language
Creates a task from a sentence, using the same parser as the app’s omnibar. It reads English and French. Three families of token, combinable in any order:
!to!!!— priority 1 to 3#name— project, else area (prefix match, accent-insensitive)- a date in English or French — “tomorrow”, “monday 3pm”, “tmr”
Anything not recognised stays in the title. Example: !!! edit the video #YouTube tomorrow 3pm.
POST
/
v2
/
tasks
/
quick
Create a task from natural language
curl --request POST \
--url https://api.doers.sh/v2/tasks/quick \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"raw": "!!! call the accountant tomorrow 10am #Admin",
"deadline": "2023-12-25"
}
'import requests
url = "https://api.doers.sh/v2/tasks/quick"
payload = {
"raw": "!!! call the accountant tomorrow 10am #Admin",
"deadline": "2023-12-25"
}
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({raw: '!!! call the accountant tomorrow 10am #Admin', deadline: '2023-12-25'})
};
fetch('https://api.doers.sh/v2/tasks/quick', 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.doers.sh/v2/tasks/quick",
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([
'raw' => '!!! call the accountant tomorrow 10am #Admin',
'deadline' => '2023-12-25'
]),
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.doers.sh/v2/tasks/quick"
payload := strings.NewReader("{\n \"raw\": \"!!! call the accountant tomorrow 10am #Admin\",\n \"deadline\": \"2023-12-25\"\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.doers.sh/v2/tasks/quick")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"raw\": \"!!! call the accountant tomorrow 10am #Admin\",\n \"deadline\": \"2023-12-25\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.doers.sh/v2/tasks/quick")
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 \"raw\": \"!!! call the accountant tomorrow 10am #Admin\",\n \"deadline\": \"2023-12-25\"\n}"
response = http.request(request)
puts response.read_body{
"task": {
"id": "<string>",
"title": "<string>",
"notes": "<string>",
"status": "open",
"priority": 0,
"when": {
"kind": "today"
},
"deadline": "<string>",
"projectId": "<string>",
"areaId": "<string>",
"headingId": "<string>",
"tags": [
"<string>"
],
"checklist": [
{
"id": "<string>",
"label": "<string>",
"done": true
}
],
"completedAt": 123,
"durationMin": 123,
"kind": "task",
"repeat": {
"every": 183,
"unit": "day",
"mode": "calendar",
"weekdays": [
4
]
},
"visibility": "public",
"order": 123,
"notePath": "<string>",
"conversationPath": "<string>",
"assigneeId": "<string>",
"assignee": {
"id": "<string>",
"username": "<string>",
"name": "<string>",
"email": "<string>",
"image": "<string>"
},
"accessRole": "owner"
},
"parsed": {
"title": "<string>",
"priority": 0,
"projectId": "<string>",
"areaId": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
]
}
}Authorizations
A pc_… token generated from Settings > API & MCP.
Body
application/json
Required string length:
1 - 500Example:
"!!! call the accountant tomorrow 10am #Admin"
Local day key, YYYY-MM-DD.
Pattern:
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$