cURL
curl --request GET \
--url https://api.dock.us/{version}/workspace-plan-tasks/{id}/comments \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.dock.us/{version}/workspace-plan-tasks/{id}/comments"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.dock.us/{version}/workspace-plan-tasks/{id}/comments', 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/{id}/comments",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.dock.us/{version}/workspace-plan-tasks/{id}/comments"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.dock.us/{version}/workspace-plan-tasks/{id}/comments")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dock.us/{version}/workspace-plan-tasks/{id}/comments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"workspacePlanTaskComments": [
{
"id": "RiHO4e0Ju3DS",
"updatedAt": "2021-01-01T00:00:00.000Z",
"createdAt": "2021-01-01T00:00:00.000Z",
"object": "workspace-plan-task-comment",
"taskId": "RiHO4e0Ju3DS",
"body": "<p>Uploaded the <span style=\"font-weight:700\">signed</span> contract @Jane Doe</p>",
"author": {
"id": "RiHO4e0Ju3DS",
"updatedAt": "2021-01-01T00:00:00.000Z",
"createdAt": "2021-01-01T00:00:00.000Z",
"object": "user",
"url": "https://api.dock.us/v1/users/RiHO4e0Ju3DS",
"firstName": "John",
"lastName": "Doe",
"avatar": "https://dock.us/avatar.png",
"email": "john.doe@example.com",
"name": "John Doe"
},
"files": [
{
"id": "RiHO4e0Ju3DS",
"updatedAt": "2021-01-01T00:00:00.000Z",
"createdAt": "2021-01-01T00:00:00.000Z",
"object": "file",
"name": "contract.pdf",
"thumbnail": "https://storage.googleapis.com/dock-production-private/thumbnails/contract.png",
"size": 24576,
"url": "https://api.dock.us/v1/files/RiHO4e0Ju3DS",
"downloadUrl": "https://storage.googleapis.com/dock-production-private/signed-url",
"expiresAt": "2026-06-12T12:00:00.000Z",
"uploadStatus": "success",
"mimeType": "application/pdf"
}
]
}
],
"pageInfo": {
"page": 1,
"pages": 10,
"total": 100,
"pageTotal": 10,
"hasNextPage": true,
"hasPrevPage": false
}
}
}{
"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"
}
}Tasks
Retrieve a list of workspace plan task comments
Retrieve the comments on a workspace plan task, oldest first. Use filters[createdAfter] to fetch only new comments when syncing. Each comment returns only id and object unless more are requested with properties, for example properties=body&properties=author.email&properties=files.downloadUrl&properties=createdAt
GET
/
workspace-plan-tasks
/
{id}
/
comments
cURL
curl --request GET \
--url https://api.dock.us/{version}/workspace-plan-tasks/{id}/comments \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.dock.us/{version}/workspace-plan-tasks/{id}/comments"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.dock.us/{version}/workspace-plan-tasks/{id}/comments', 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/{id}/comments",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.dock.us/{version}/workspace-plan-tasks/{id}/comments"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.dock.us/{version}/workspace-plan-tasks/{id}/comments")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dock.us/{version}/workspace-plan-tasks/{id}/comments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"workspacePlanTaskComments": [
{
"id": "RiHO4e0Ju3DS",
"updatedAt": "2021-01-01T00:00:00.000Z",
"createdAt": "2021-01-01T00:00:00.000Z",
"object": "workspace-plan-task-comment",
"taskId": "RiHO4e0Ju3DS",
"body": "<p>Uploaded the <span style=\"font-weight:700\">signed</span> contract @Jane Doe</p>",
"author": {
"id": "RiHO4e0Ju3DS",
"updatedAt": "2021-01-01T00:00:00.000Z",
"createdAt": "2021-01-01T00:00:00.000Z",
"object": "user",
"url": "https://api.dock.us/v1/users/RiHO4e0Ju3DS",
"firstName": "John",
"lastName": "Doe",
"avatar": "https://dock.us/avatar.png",
"email": "john.doe@example.com",
"name": "John Doe"
},
"files": [
{
"id": "RiHO4e0Ju3DS",
"updatedAt": "2021-01-01T00:00:00.000Z",
"createdAt": "2021-01-01T00:00:00.000Z",
"object": "file",
"name": "contract.pdf",
"thumbnail": "https://storage.googleapis.com/dock-production-private/thumbnails/contract.png",
"size": 24576,
"url": "https://api.dock.us/v1/files/RiHO4e0Ju3DS",
"downloadUrl": "https://storage.googleapis.com/dock-production-private/signed-url",
"expiresAt": "2026-06-12T12:00:00.000Z",
"uploadStatus": "success",
"mimeType": "application/pdf"
}
]
}
],
"pageInfo": {
"page": 1,
"pages": 10,
"total": 100,
"pageTotal": 10,
"hasNextPage": true,
"hasPrevPage": false
}
}
}{
"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
Query Parameters
Select the comment properties to return. Comments return only id and object unless other properties are requested. Request author.<property> (for example author.email) to include the author, and files.<property> (for example files.downloadUrl) to include the attached files; both nested objects always carry their id, object and url
Available options:
taskId, body, author.createdAt, author.updatedAt, author.firstName, author.lastName, author.avatar, author.email, author.name, files.name, files.thumbnail, files.size, files.downloadUrl, files.expiresAt, files.uploadStatus, files.mimeType, createdAt, updatedAt, id, object, author.id, author.object, author.url, files.id, files.object, files.url