Create Task
curl --request POST \
--url https://api.example.com/v0/tasksimport requests
url = "https://api.example.com/v0/tasks"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.example.com/v0/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.example.com/v0/tasks",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v0/tasks"
req, _ := http.NewRequest("POST", url, nil)
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.example.com/v0/tasks")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v0/tasks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_bodyTasks
Create Task
POST /v0/tasks — File a task in a workspace
POST
/
v0
/
tasks
Create Task
curl --request POST \
--url https://api.example.com/v0/tasksimport requests
url = "https://api.example.com/v0/tasks"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.example.com/v0/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.example.com/v0/tasks",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v0/tasks"
req, _ := http.NewRequest("POST", url, nil)
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.example.com/v0/tasks")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v0/tasks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_bodyFiles a task in a workspace. Every task lives in a workspace; there are no personal or team tasks. You need task-write access in the workspace (an internal member who is not a viewer, or an external editor).
Auth:
Returns
Authorization: Bearer tr_...
Request body
| Field | Type | Required | Description |
|---|---|---|---|
workspaceId | string | Yes | The workspace to file into (a UUID) |
title | string | Yes | 1–500 characters |
body | string | No | Markdown details, up to 64,000 characters |
kind | string | No | A slug naming the kind of work, matching ^[a-z0-9][a-z0-9-_]{0,63}$. Omit it for a plain to-do |
audience | string | No | internal or shared. Defaults to internal for internal members and shared for external editors, who may only file shared tasks |
assignee | string | No | Account id or alias to suggest the task to. Must be a current workspace editor who can see the task’s audience. Advisory: any such editor may still claim it |
due | string | No | ISO-8601. Informational only; nothing sorts or filters on it |
payload | object | No | Producer-defined JSON object, up to 32 KB. Ids and refs, never content bodies |
why | string | Yes (agents) | One sentence on what the person is trying to accomplish, in their terms (not a description of the edit), at most 300 characters. See Why on every write |
curl -X POST https://api.tokenrip.com/v0/tasks \
-H "Authorization: Bearer tr_..." \
-H "Content-Type: application/json" \
-d '{
"workspaceId": "7a1c2d1e-0000-4000-8000-000000000002",
"title": "Process call with Acme",
"kind": "process-call",
"assignee": "alek",
"payload": { "transcriptId": "call-98213" }
}'
rip task add "Process call with Acme" \
--workspace-id 7a1c2d1e-0000-4000-8000-000000000002 --kind process-call --assignee alek \
--payload '{"transcriptId":"call-98213"}'
201 with the new task in data, in the shape shown on Get Task (without results). A new task is open at revision 1.
Error codes
| Status | Error | Description |
|---|---|---|
| 400 | WORKSPACE_REQUIRED | No workspaceId. Nothing is written |
| 400 | INVALID_WORKSPACE_ID | workspaceId is not a UUID |
| 400 | INVALID_FIELD | A missing or over-long title, an over-long body, a kind that fails the slug grammar, a bad due or audience, or a non-string field |
| 400 | INVALID_PAYLOAD | payload is not a JSON object, or is over 32 KB |
| 400 | INVALID_ASSIGNEE | The assignee is not a current workspace editor who can see the task’s audience |
| 400 | WHY_REQUIRED | An agent call without why |
| 403 | WORKSPACE_FORBIDDEN | You cannot write tasks in this workspace, or you are an external editor filing an internal task |
| 404 | WORKSPACE_NOT_FOUND | No such workspace |
| 404 | ACCOUNT_NOT_FOUND | The assignee names no account |
| 410 | WORKSPACE_DELETED | The workspace is in the trash |
Operator mirror
POST /v0/operator/tasks takes the same body with an operator session, acting as the bound account.