curl --request POST \
--url https://api.dock.us/{version}/workspace-plan-tasks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"workspacePlanId": "RiHO4e0Ju3DS",
"title": "Create onboarding plan",
"parentTaskId": "RiHO4e0Ju3DS",
"isInternal": false,
"startDate": "2024-01-01",
"dueDate": "2024-01-15",
"description": "Kick off the onboarding project",
"assignees": [
{
"type": "user",
"userId": "RiHO4e0Ju3DS"
}
]
}
'import requests
url = "https://api.dock.us/{version}/workspace-plan-tasks"
payload = {
"workspacePlanId": "RiHO4e0Ju3DS",
"title": "Create onboarding plan",
"parentTaskId": "RiHO4e0Ju3DS",
"isInternal": False,
"startDate": "2024-01-01",
"dueDate": "2024-01-15",
"description": "Kick off the onboarding project",
"assignees": [
{
"type": "user",
"userId": "RiHO4e0Ju3DS"
}
]
}
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({
workspacePlanId: 'RiHO4e0Ju3DS',
title: 'Create onboarding plan',
parentTaskId: 'RiHO4e0Ju3DS',
isInternal: false,
startDate: '2024-01-01',
dueDate: '2024-01-15',
description: 'Kick off the onboarding project',
assignees: [{type: 'user', userId: 'RiHO4e0Ju3DS'}]
})
};
fetch('https://api.dock.us/{version}/workspace-plan-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.dock.us/{version}/workspace-plan-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([
'workspacePlanId' => 'RiHO4e0Ju3DS',
'title' => 'Create onboarding plan',
'parentTaskId' => 'RiHO4e0Ju3DS',
'isInternal' => false,
'startDate' => '2024-01-01',
'dueDate' => '2024-01-15',
'description' => 'Kick off the onboarding project',
'assignees' => [
[
'type' => 'user',
'userId' => 'RiHO4e0Ju3DS'
]
]
]),
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.dock.us/{version}/workspace-plan-tasks"
payload := strings.NewReader("{\n \"workspacePlanId\": \"RiHO4e0Ju3DS\",\n \"title\": \"Create onboarding plan\",\n \"parentTaskId\": \"RiHO4e0Ju3DS\",\n \"isInternal\": false,\n \"startDate\": \"2024-01-01\",\n \"dueDate\": \"2024-01-15\",\n \"description\": \"Kick off the onboarding project\",\n \"assignees\": [\n {\n \"type\": \"user\",\n \"userId\": \"RiHO4e0Ju3DS\"\n }\n ]\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.dock.us/{version}/workspace-plan-tasks")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"workspacePlanId\": \"RiHO4e0Ju3DS\",\n \"title\": \"Create onboarding plan\",\n \"parentTaskId\": \"RiHO4e0Ju3DS\",\n \"isInternal\": false,\n \"startDate\": \"2024-01-01\",\n \"dueDate\": \"2024-01-15\",\n \"description\": \"Kick off the onboarding project\",\n \"assignees\": [\n {\n \"type\": \"user\",\n \"userId\": \"RiHO4e0Ju3DS\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dock.us/{version}/workspace-plan-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 \"workspacePlanId\": \"RiHO4e0Ju3DS\",\n \"title\": \"Create onboarding plan\",\n \"parentTaskId\": \"RiHO4e0Ju3DS\",\n \"isInternal\": false,\n \"startDate\": \"2024-01-01\",\n \"dueDate\": \"2024-01-15\",\n \"description\": \"Kick off the onboarding project\",\n \"assignees\": [\n {\n \"type\": \"user\",\n \"userId\": \"RiHO4e0Ju3DS\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"workspacePlanTask": {
"id": "RiHO4e0Ju3DS",
"updatedAt": "2021-01-01T00:00:00.000Z",
"createdAt": "2021-01-01T00:00:00.000Z",
"object": "workspace-plan-task",
"url": "https://api.dock.us/v1/workspace-plan-tasks/RiHO4e0Ju3DS",
"isInternal": false,
"status": "In Progress",
"completedAt": "2024-01-01T00:00:00Z",
"actionLinkUrl": "https://acme.dock.us/onboarding",
"actionLinkName": "View onboarding plan",
"actionText": "View onboarding plan",
"actionType": "link",
"showActionText": true,
"startDate": "2024-01-01",
"title": "Create onboarding plan",
"dueDate": "2024-01-01",
"index": 0,
"templatePlanTaskId": "RiHO4e0Ju3DS",
"description": "Kick off the onboarding project",
"parentTaskId": "RiHO4e0Ju3DS",
"assignees": [
{
"type": "user",
"userId": "RiHO4e0Ju3DS",
"email": "jane@acme.com"
}
]
}
}
}{
"error": {
"code": "BAD_REQUEST",
"message": "The request could not be understood or was missing required parameters"
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "Access denied. You are not authorized to access this resource"
}
}{
"error": {
"code": "FORBIDDEN",
"message": "Access to this resource is restricted"
}
}{
"error": {
"code": "NOT_FOUND",
"message": "The requested resource could not be found"
}
}{
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"message": "Rate limit exceeded. Please try again later"
}
}{
"error": {
"code": "INTERNAL_SERVER_ERROR",
"message": "The server has encountered a situation it does not know how to handle"
}
}Create a workspace plan task
Create a workspace plan task. Pass parentTaskId to create a subtask
curl --request POST \
--url https://api.dock.us/{version}/workspace-plan-tasks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"workspacePlanId": "RiHO4e0Ju3DS",
"title": "Create onboarding plan",
"parentTaskId": "RiHO4e0Ju3DS",
"isInternal": false,
"startDate": "2024-01-01",
"dueDate": "2024-01-15",
"description": "Kick off the onboarding project",
"assignees": [
{
"type": "user",
"userId": "RiHO4e0Ju3DS"
}
]
}
'import requests
url = "https://api.dock.us/{version}/workspace-plan-tasks"
payload = {
"workspacePlanId": "RiHO4e0Ju3DS",
"title": "Create onboarding plan",
"parentTaskId": "RiHO4e0Ju3DS",
"isInternal": False,
"startDate": "2024-01-01",
"dueDate": "2024-01-15",
"description": "Kick off the onboarding project",
"assignees": [
{
"type": "user",
"userId": "RiHO4e0Ju3DS"
}
]
}
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({
workspacePlanId: 'RiHO4e0Ju3DS',
title: 'Create onboarding plan',
parentTaskId: 'RiHO4e0Ju3DS',
isInternal: false,
startDate: '2024-01-01',
dueDate: '2024-01-15',
description: 'Kick off the onboarding project',
assignees: [{type: 'user', userId: 'RiHO4e0Ju3DS'}]
})
};
fetch('https://api.dock.us/{version}/workspace-plan-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.dock.us/{version}/workspace-plan-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([
'workspacePlanId' => 'RiHO4e0Ju3DS',
'title' => 'Create onboarding plan',
'parentTaskId' => 'RiHO4e0Ju3DS',
'isInternal' => false,
'startDate' => '2024-01-01',
'dueDate' => '2024-01-15',
'description' => 'Kick off the onboarding project',
'assignees' => [
[
'type' => 'user',
'userId' => 'RiHO4e0Ju3DS'
]
]
]),
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.dock.us/{version}/workspace-plan-tasks"
payload := strings.NewReader("{\n \"workspacePlanId\": \"RiHO4e0Ju3DS\",\n \"title\": \"Create onboarding plan\",\n \"parentTaskId\": \"RiHO4e0Ju3DS\",\n \"isInternal\": false,\n \"startDate\": \"2024-01-01\",\n \"dueDate\": \"2024-01-15\",\n \"description\": \"Kick off the onboarding project\",\n \"assignees\": [\n {\n \"type\": \"user\",\n \"userId\": \"RiHO4e0Ju3DS\"\n }\n ]\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.dock.us/{version}/workspace-plan-tasks")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"workspacePlanId\": \"RiHO4e0Ju3DS\",\n \"title\": \"Create onboarding plan\",\n \"parentTaskId\": \"RiHO4e0Ju3DS\",\n \"isInternal\": false,\n \"startDate\": \"2024-01-01\",\n \"dueDate\": \"2024-01-15\",\n \"description\": \"Kick off the onboarding project\",\n \"assignees\": [\n {\n \"type\": \"user\",\n \"userId\": \"RiHO4e0Ju3DS\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dock.us/{version}/workspace-plan-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 \"workspacePlanId\": \"RiHO4e0Ju3DS\",\n \"title\": \"Create onboarding plan\",\n \"parentTaskId\": \"RiHO4e0Ju3DS\",\n \"isInternal\": false,\n \"startDate\": \"2024-01-01\",\n \"dueDate\": \"2024-01-15\",\n \"description\": \"Kick off the onboarding project\",\n \"assignees\": [\n {\n \"type\": \"user\",\n \"userId\": \"RiHO4e0Ju3DS\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"workspacePlanTask": {
"id": "RiHO4e0Ju3DS",
"updatedAt": "2021-01-01T00:00:00.000Z",
"createdAt": "2021-01-01T00:00:00.000Z",
"object": "workspace-plan-task",
"url": "https://api.dock.us/v1/workspace-plan-tasks/RiHO4e0Ju3DS",
"isInternal": false,
"status": "In Progress",
"completedAt": "2024-01-01T00:00:00Z",
"actionLinkUrl": "https://acme.dock.us/onboarding",
"actionLinkName": "View onboarding plan",
"actionText": "View onboarding plan",
"actionType": "link",
"showActionText": true,
"startDate": "2024-01-01",
"title": "Create onboarding plan",
"dueDate": "2024-01-01",
"index": 0,
"templatePlanTaskId": "RiHO4e0Ju3DS",
"description": "Kick off the onboarding project",
"parentTaskId": "RiHO4e0Ju3DS",
"assignees": [
{
"type": "user",
"userId": "RiHO4e0Ju3DS",
"email": "jane@acme.com"
}
]
}
}
}{
"error": {
"code": "BAD_REQUEST",
"message": "The request could not be understood or was missing required parameters"
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "Access denied. You are not authorized to access this resource"
}
}{
"error": {
"code": "FORBIDDEN",
"message": "Access to this resource is restricted"
}
}{
"error": {
"code": "NOT_FOUND",
"message": "The requested resource could not be found"
}
}{
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"message": "Rate limit exceeded. Please try again later"
}
}{
"error": {
"code": "INTERNAL_SERVER_ERROR",
"message": "The server has encountered a situation it does not know how to handle"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Select the workspace plan task properties that should be returned
isInternal, status, completedAt, actionLinkUrl, actionLinkName, actionText, actionType, showActionText, startDate, title, dueDate, index, createdAt, updatedAt, templatePlanTaskId, description, assignees, parentTaskId Body
ID of the workspace plan to create the task in
"RiHO4e0Ju3DS"
Title of the workspace plan task
"Create onboarding plan"
ID of an existing task to create this task under as a subtask. Subtasks cannot be nested more than one level
"RiHO4e0Ju3DS"
Whether the workspace plan task is internal. Subtasks of an internal parent task are always internal
Start date of the workspace plan task. Must be on or before dueDate
"2024-01-01"
Due date of the workspace plan task
"2024-01-15"
Description of the workspace plan task as plain text. Newlines create separate paragraphs
"Kick off the onboarding project"
Assignees of the workspace plan task. At most one companyTeam and one clientTeam assignee
50- User assignee
- Email assignee
- Company team assignee
- Client team assignee
Show child attributes
Show child attributes
Response
Create a workspace plan task
Show child attributes
Show child attributes