Create a task
curl --request POST \
--url https://api.assembly.com/v1/tasks \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"clientId": "64734088-94c7-47dd-b2fe-e5ac7e5cfaf4",
"companyId": "550e8400-e29b-41d4-a716-446655440000",
"description": "Write the welcome email for new clients.",
"dueDate": "2025-05-01T16:18:54Z",
"internalUserId": "64734088-94c7-47dd-b2fe-e5ac7e5cfaf4",
"isArchived": false,
"name": "Draft the onboarding email",
"parentTaskId": "550e8400-e29b-41d4-a716-446655440000",
"status": "todo",
"templateId": "550e8400-e29b-41d4-a716-446655440000",
"viewers": [
{
"clientId": "64734088-94c7-47dd-b2fe-e5ac7e5cfaf4",
"companyId": "550e8400-e29b-41d4-a716-446655440000"
}
]
}
'import requests
url = "https://api.assembly.com/v1/tasks"
payload = {
"clientId": "64734088-94c7-47dd-b2fe-e5ac7e5cfaf4",
"companyId": "550e8400-e29b-41d4-a716-446655440000",
"description": "Write the welcome email for new clients.",
"dueDate": "2025-05-01T16:18:54Z",
"internalUserId": "64734088-94c7-47dd-b2fe-e5ac7e5cfaf4",
"isArchived": False,
"name": "Draft the onboarding email",
"parentTaskId": "550e8400-e29b-41d4-a716-446655440000",
"status": "todo",
"templateId": "550e8400-e29b-41d4-a716-446655440000",
"viewers": [
{
"clientId": "64734088-94c7-47dd-b2fe-e5ac7e5cfaf4",
"companyId": "550e8400-e29b-41d4-a716-446655440000"
}
]
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
clientId: '64734088-94c7-47dd-b2fe-e5ac7e5cfaf4',
companyId: '550e8400-e29b-41d4-a716-446655440000',
description: 'Write the welcome email for new clients.',
dueDate: '2025-05-01T16:18:54Z',
internalUserId: '64734088-94c7-47dd-b2fe-e5ac7e5cfaf4',
isArchived: false,
name: 'Draft the onboarding email',
parentTaskId: '550e8400-e29b-41d4-a716-446655440000',
status: 'todo',
templateId: '550e8400-e29b-41d4-a716-446655440000',
viewers: [
{
clientId: '64734088-94c7-47dd-b2fe-e5ac7e5cfaf4',
companyId: '550e8400-e29b-41d4-a716-446655440000'
}
]
})
};
fetch('https://api.assembly.com/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.assembly.com/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([
'clientId' => '64734088-94c7-47dd-b2fe-e5ac7e5cfaf4',
'companyId' => '550e8400-e29b-41d4-a716-446655440000',
'description' => 'Write the welcome email for new clients.',
'dueDate' => '2025-05-01T16:18:54Z',
'internalUserId' => '64734088-94c7-47dd-b2fe-e5ac7e5cfaf4',
'isArchived' => false,
'name' => 'Draft the onboarding email',
'parentTaskId' => '550e8400-e29b-41d4-a716-446655440000',
'status' => 'todo',
'templateId' => '550e8400-e29b-41d4-a716-446655440000',
'viewers' => [
[
'clientId' => '64734088-94c7-47dd-b2fe-e5ac7e5cfaf4',
'companyId' => '550e8400-e29b-41d4-a716-446655440000'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>"
],
]);
$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.assembly.com/v1/tasks"
payload := strings.NewReader("{\n \"clientId\": \"64734088-94c7-47dd-b2fe-e5ac7e5cfaf4\",\n \"companyId\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"description\": \"Write the welcome email for new clients.\",\n \"dueDate\": \"2025-05-01T16:18:54Z\",\n \"internalUserId\": \"64734088-94c7-47dd-b2fe-e5ac7e5cfaf4\",\n \"isArchived\": false,\n \"name\": \"Draft the onboarding email\",\n \"parentTaskId\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"status\": \"todo\",\n \"templateId\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"viewers\": [\n {\n \"clientId\": \"64734088-94c7-47dd-b2fe-e5ac7e5cfaf4\",\n \"companyId\": \"550e8400-e29b-41d4-a716-446655440000\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
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.assembly.com/v1/tasks")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"clientId\": \"64734088-94c7-47dd-b2fe-e5ac7e5cfaf4\",\n \"companyId\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"description\": \"Write the welcome email for new clients.\",\n \"dueDate\": \"2025-05-01T16:18:54Z\",\n \"internalUserId\": \"64734088-94c7-47dd-b2fe-e5ac7e5cfaf4\",\n \"isArchived\": false,\n \"name\": \"Draft the onboarding email\",\n \"parentTaskId\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"status\": \"todo\",\n \"templateId\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"viewers\": [\n {\n \"clientId\": \"64734088-94c7-47dd-b2fe-e5ac7e5cfaf4\",\n \"companyId\": \"550e8400-e29b-41d4-a716-446655440000\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.assembly.com/v1/tasks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"clientId\": \"64734088-94c7-47dd-b2fe-e5ac7e5cfaf4\",\n \"companyId\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"description\": \"Write the welcome email for new clients.\",\n \"dueDate\": \"2025-05-01T16:18:54Z\",\n \"internalUserId\": \"64734088-94c7-47dd-b2fe-e5ac7e5cfaf4\",\n \"isArchived\": false,\n \"name\": \"Draft the onboarding email\",\n \"parentTaskId\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"status\": \"todo\",\n \"templateId\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"viewers\": [\n {\n \"clientId\": \"64734088-94c7-47dd-b2fe-e5ac7e5cfaf4\",\n \"companyId\": \"550e8400-e29b-41d4-a716-446655440000\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"createdAt": "2024-01-15T09:30:00Z",
"deleted": true,
"description": "Write the welcome email for new clients.",
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Draft the onboarding email",
"object": "client",
"updatedAt": "2024-02-20T14:05:00Z"
}{
"code": "<string>",
"data": "<unknown>",
"message": "<string>"
}{
"code": "<string>",
"data": "<unknown>",
"message": "<string>"
}{
"code": "<string>",
"data": "<unknown>",
"message": "<string>"
}{
"code": "<string>",
"data": "<unknown>",
"message": "<string>"
}{
"code": "<string>",
"data": "<unknown>",
"message": "<string>"
}{
"code": "<string>",
"data": "<unknown>",
"message": "<string>"
}Tasks
Create a task
Creates a task via the Tasks marketplace app installed on the workspace. The request body is validated against the app’s registered resource schema and proxied to the app’s task API. Requires the Tasks app to be installed.
POST
/
v1
/
tasks
Create a task
curl --request POST \
--url https://api.assembly.com/v1/tasks \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"clientId": "64734088-94c7-47dd-b2fe-e5ac7e5cfaf4",
"companyId": "550e8400-e29b-41d4-a716-446655440000",
"description": "Write the welcome email for new clients.",
"dueDate": "2025-05-01T16:18:54Z",
"internalUserId": "64734088-94c7-47dd-b2fe-e5ac7e5cfaf4",
"isArchived": false,
"name": "Draft the onboarding email",
"parentTaskId": "550e8400-e29b-41d4-a716-446655440000",
"status": "todo",
"templateId": "550e8400-e29b-41d4-a716-446655440000",
"viewers": [
{
"clientId": "64734088-94c7-47dd-b2fe-e5ac7e5cfaf4",
"companyId": "550e8400-e29b-41d4-a716-446655440000"
}
]
}
'import requests
url = "https://api.assembly.com/v1/tasks"
payload = {
"clientId": "64734088-94c7-47dd-b2fe-e5ac7e5cfaf4",
"companyId": "550e8400-e29b-41d4-a716-446655440000",
"description": "Write the welcome email for new clients.",
"dueDate": "2025-05-01T16:18:54Z",
"internalUserId": "64734088-94c7-47dd-b2fe-e5ac7e5cfaf4",
"isArchived": False,
"name": "Draft the onboarding email",
"parentTaskId": "550e8400-e29b-41d4-a716-446655440000",
"status": "todo",
"templateId": "550e8400-e29b-41d4-a716-446655440000",
"viewers": [
{
"clientId": "64734088-94c7-47dd-b2fe-e5ac7e5cfaf4",
"companyId": "550e8400-e29b-41d4-a716-446655440000"
}
]
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
clientId: '64734088-94c7-47dd-b2fe-e5ac7e5cfaf4',
companyId: '550e8400-e29b-41d4-a716-446655440000',
description: 'Write the welcome email for new clients.',
dueDate: '2025-05-01T16:18:54Z',
internalUserId: '64734088-94c7-47dd-b2fe-e5ac7e5cfaf4',
isArchived: false,
name: 'Draft the onboarding email',
parentTaskId: '550e8400-e29b-41d4-a716-446655440000',
status: 'todo',
templateId: '550e8400-e29b-41d4-a716-446655440000',
viewers: [
{
clientId: '64734088-94c7-47dd-b2fe-e5ac7e5cfaf4',
companyId: '550e8400-e29b-41d4-a716-446655440000'
}
]
})
};
fetch('https://api.assembly.com/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.assembly.com/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([
'clientId' => '64734088-94c7-47dd-b2fe-e5ac7e5cfaf4',
'companyId' => '550e8400-e29b-41d4-a716-446655440000',
'description' => 'Write the welcome email for new clients.',
'dueDate' => '2025-05-01T16:18:54Z',
'internalUserId' => '64734088-94c7-47dd-b2fe-e5ac7e5cfaf4',
'isArchived' => false,
'name' => 'Draft the onboarding email',
'parentTaskId' => '550e8400-e29b-41d4-a716-446655440000',
'status' => 'todo',
'templateId' => '550e8400-e29b-41d4-a716-446655440000',
'viewers' => [
[
'clientId' => '64734088-94c7-47dd-b2fe-e5ac7e5cfaf4',
'companyId' => '550e8400-e29b-41d4-a716-446655440000'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>"
],
]);
$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.assembly.com/v1/tasks"
payload := strings.NewReader("{\n \"clientId\": \"64734088-94c7-47dd-b2fe-e5ac7e5cfaf4\",\n \"companyId\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"description\": \"Write the welcome email for new clients.\",\n \"dueDate\": \"2025-05-01T16:18:54Z\",\n \"internalUserId\": \"64734088-94c7-47dd-b2fe-e5ac7e5cfaf4\",\n \"isArchived\": false,\n \"name\": \"Draft the onboarding email\",\n \"parentTaskId\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"status\": \"todo\",\n \"templateId\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"viewers\": [\n {\n \"clientId\": \"64734088-94c7-47dd-b2fe-e5ac7e5cfaf4\",\n \"companyId\": \"550e8400-e29b-41d4-a716-446655440000\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
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.assembly.com/v1/tasks")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"clientId\": \"64734088-94c7-47dd-b2fe-e5ac7e5cfaf4\",\n \"companyId\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"description\": \"Write the welcome email for new clients.\",\n \"dueDate\": \"2025-05-01T16:18:54Z\",\n \"internalUserId\": \"64734088-94c7-47dd-b2fe-e5ac7e5cfaf4\",\n \"isArchived\": false,\n \"name\": \"Draft the onboarding email\",\n \"parentTaskId\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"status\": \"todo\",\n \"templateId\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"viewers\": [\n {\n \"clientId\": \"64734088-94c7-47dd-b2fe-e5ac7e5cfaf4\",\n \"companyId\": \"550e8400-e29b-41d4-a716-446655440000\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.assembly.com/v1/tasks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"clientId\": \"64734088-94c7-47dd-b2fe-e5ac7e5cfaf4\",\n \"companyId\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"description\": \"Write the welcome email for new clients.\",\n \"dueDate\": \"2025-05-01T16:18:54Z\",\n \"internalUserId\": \"64734088-94c7-47dd-b2fe-e5ac7e5cfaf4\",\n \"isArchived\": false,\n \"name\": \"Draft the onboarding email\",\n \"parentTaskId\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"status\": \"todo\",\n \"templateId\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"viewers\": [\n {\n \"clientId\": \"64734088-94c7-47dd-b2fe-e5ac7e5cfaf4\",\n \"companyId\": \"550e8400-e29b-41d4-a716-446655440000\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"createdAt": "2024-01-15T09:30:00Z",
"deleted": true,
"description": "Write the welcome email for new clients.",
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Draft the onboarding email",
"object": "client",
"updatedAt": "2024-02-20T14:05:00Z"
}{
"code": "<string>",
"data": "<unknown>",
"message": "<string>"
}{
"code": "<string>",
"data": "<unknown>",
"message": "<string>"
}{
"code": "<string>",
"data": "<unknown>",
"message": "<string>"
}{
"code": "<string>",
"data": "<unknown>",
"message": "<string>"
}{
"code": "<string>",
"data": "<unknown>",
"message": "<string>"
}{
"code": "<string>",
"data": "<unknown>",
"message": "<string>"
}Body
application/json
Task fields
Response
OK