curl --request POST \
--url https://app.hockeystack.com/api/revenue-agents/v1/tasks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"task_title": "<string>",
"assignee_id": "<string>",
"targets": {
"deal_id": "<string>",
"company_id": "<string>",
"meeting_id": "<string>"
},
"priority": "medium",
"draft": {
"talking_points": [
"<string>"
],
"subject": "<string>",
"body": "<string>",
"message": "<string>"
},
"reason": "<string>",
"due_date": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://app.hockeystack.com/api/revenue-agents/v1/tasks"
payload = {
"task_title": "<string>",
"assignee_id": "<string>",
"targets": {
"deal_id": "<string>",
"company_id": "<string>",
"meeting_id": "<string>"
},
"priority": "medium",
"draft": {
"talking_points": ["<string>"],
"subject": "<string>",
"body": "<string>",
"message": "<string>"
},
"reason": "<string>",
"due_date": "2023-11-07T05:31:56Z"
}
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({
task_title: '<string>',
assignee_id: '<string>',
targets: {deal_id: '<string>', company_id: '<string>', meeting_id: '<string>'},
priority: 'medium',
draft: {
talking_points: ['<string>'],
subject: '<string>',
body: JSON.stringify('<string>'),
message: '<string>'
},
reason: '<string>',
due_date: '2023-11-07T05:31:56Z'
})
};
fetch('https://app.hockeystack.com/api/revenue-agents/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://app.hockeystack.com/api/revenue-agents/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([
'task_title' => '<string>',
'assignee_id' => '<string>',
'targets' => [
'deal_id' => '<string>',
'company_id' => '<string>',
'meeting_id' => '<string>'
],
'priority' => 'medium',
'draft' => [
'talking_points' => [
'<string>'
],
'subject' => '<string>',
'body' => '<string>',
'message' => '<string>'
],
'reason' => '<string>',
'due_date' => '2023-11-07T05:31:56Z'
]),
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://app.hockeystack.com/api/revenue-agents/v1/tasks"
payload := strings.NewReader("{\n \"task_title\": \"<string>\",\n \"assignee_id\": \"<string>\",\n \"targets\": {\n \"deal_id\": \"<string>\",\n \"company_id\": \"<string>\",\n \"meeting_id\": \"<string>\"\n },\n \"priority\": \"medium\",\n \"draft\": {\n \"talking_points\": [\n \"<string>\"\n ],\n \"subject\": \"<string>\",\n \"body\": \"<string>\",\n \"message\": \"<string>\"\n },\n \"reason\": \"<string>\",\n \"due_date\": \"2023-11-07T05:31:56Z\"\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://app.hockeystack.com/api/revenue-agents/v1/tasks")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"task_title\": \"<string>\",\n \"assignee_id\": \"<string>\",\n \"targets\": {\n \"deal_id\": \"<string>\",\n \"company_id\": \"<string>\",\n \"meeting_id\": \"<string>\"\n },\n \"priority\": \"medium\",\n \"draft\": {\n \"talking_points\": [\n \"<string>\"\n ],\n \"subject\": \"<string>\",\n \"body\": \"<string>\",\n \"message\": \"<string>\"\n },\n \"reason\": \"<string>\",\n \"due_date\": \"2023-11-07T05:31:56Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.hockeystack.com/api/revenue-agents/v1/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 \"task_title\": \"<string>\",\n \"assignee_id\": \"<string>\",\n \"targets\": {\n \"deal_id\": \"<string>\",\n \"company_id\": \"<string>\",\n \"meeting_id\": \"<string>\"\n },\n \"priority\": \"medium\",\n \"draft\": {\n \"talking_points\": [\n \"<string>\"\n ],\n \"subject\": \"<string>\",\n \"body\": \"<string>\",\n \"message\": \"<string>\"\n },\n \"reason\": \"<string>\",\n \"due_date\": \"2023-11-07T05:31:56Z\"\n}"
response = http.request(request)
puts response.read_body{
"task_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"task_type": "<string>",
"task_title": "<string>",
"assignee_id": "<string>",
"agent_id": "<string>",
"targets": {
"contact": {
"email": "<string>",
"linkedin_url": "<string>",
"phone_number": "<string>",
"name": "<string>",
"title": "<string>"
},
"deal_id": "<string>",
"company_id": "<string>",
"meeting_id": "<string>"
},
"draft": {
"talking_points": [
"<string>"
],
"subject": "<string>",
"body": "<string>",
"message": "<string>"
},
"reason": "<string>",
"due_date": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"dismissed_at": "2023-11-07T05:31:56Z",
"dismiss_reason": "<string>"
}Manually create a task
Create a task. Most tasks are agent-generated; this endpoint is for callers who want to create tasks programmatically (e.g., from external triggers).
curl --request POST \
--url https://app.hockeystack.com/api/revenue-agents/v1/tasks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"task_title": "<string>",
"assignee_id": "<string>",
"targets": {
"deal_id": "<string>",
"company_id": "<string>",
"meeting_id": "<string>"
},
"priority": "medium",
"draft": {
"talking_points": [
"<string>"
],
"subject": "<string>",
"body": "<string>",
"message": "<string>"
},
"reason": "<string>",
"due_date": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://app.hockeystack.com/api/revenue-agents/v1/tasks"
payload = {
"task_title": "<string>",
"assignee_id": "<string>",
"targets": {
"deal_id": "<string>",
"company_id": "<string>",
"meeting_id": "<string>"
},
"priority": "medium",
"draft": {
"talking_points": ["<string>"],
"subject": "<string>",
"body": "<string>",
"message": "<string>"
},
"reason": "<string>",
"due_date": "2023-11-07T05:31:56Z"
}
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({
task_title: '<string>',
assignee_id: '<string>',
targets: {deal_id: '<string>', company_id: '<string>', meeting_id: '<string>'},
priority: 'medium',
draft: {
talking_points: ['<string>'],
subject: '<string>',
body: JSON.stringify('<string>'),
message: '<string>'
},
reason: '<string>',
due_date: '2023-11-07T05:31:56Z'
})
};
fetch('https://app.hockeystack.com/api/revenue-agents/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://app.hockeystack.com/api/revenue-agents/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([
'task_title' => '<string>',
'assignee_id' => '<string>',
'targets' => [
'deal_id' => '<string>',
'company_id' => '<string>',
'meeting_id' => '<string>'
],
'priority' => 'medium',
'draft' => [
'talking_points' => [
'<string>'
],
'subject' => '<string>',
'body' => '<string>',
'message' => '<string>'
],
'reason' => '<string>',
'due_date' => '2023-11-07T05:31:56Z'
]),
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://app.hockeystack.com/api/revenue-agents/v1/tasks"
payload := strings.NewReader("{\n \"task_title\": \"<string>\",\n \"assignee_id\": \"<string>\",\n \"targets\": {\n \"deal_id\": \"<string>\",\n \"company_id\": \"<string>\",\n \"meeting_id\": \"<string>\"\n },\n \"priority\": \"medium\",\n \"draft\": {\n \"talking_points\": [\n \"<string>\"\n ],\n \"subject\": \"<string>\",\n \"body\": \"<string>\",\n \"message\": \"<string>\"\n },\n \"reason\": \"<string>\",\n \"due_date\": \"2023-11-07T05:31:56Z\"\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://app.hockeystack.com/api/revenue-agents/v1/tasks")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"task_title\": \"<string>\",\n \"assignee_id\": \"<string>\",\n \"targets\": {\n \"deal_id\": \"<string>\",\n \"company_id\": \"<string>\",\n \"meeting_id\": \"<string>\"\n },\n \"priority\": \"medium\",\n \"draft\": {\n \"talking_points\": [\n \"<string>\"\n ],\n \"subject\": \"<string>\",\n \"body\": \"<string>\",\n \"message\": \"<string>\"\n },\n \"reason\": \"<string>\",\n \"due_date\": \"2023-11-07T05:31:56Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.hockeystack.com/api/revenue-agents/v1/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 \"task_title\": \"<string>\",\n \"assignee_id\": \"<string>\",\n \"targets\": {\n \"deal_id\": \"<string>\",\n \"company_id\": \"<string>\",\n \"meeting_id\": \"<string>\"\n },\n \"priority\": \"medium\",\n \"draft\": {\n \"talking_points\": [\n \"<string>\"\n ],\n \"subject\": \"<string>\",\n \"body\": \"<string>\",\n \"message\": \"<string>\"\n },\n \"reason\": \"<string>\",\n \"due_date\": \"2023-11-07T05:31:56Z\"\n}"
response = http.request(request)
puts response.read_body{
"task_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"task_type": "<string>",
"task_title": "<string>",
"assignee_id": "<string>",
"agent_id": "<string>",
"targets": {
"contact": {
"email": "<string>",
"linkedin_url": "<string>",
"phone_number": "<string>",
"name": "<string>",
"title": "<string>"
},
"deal_id": "<string>",
"company_id": "<string>",
"meeting_id": "<string>"
},
"draft": {
"talking_points": [
"<string>"
],
"subject": "<string>",
"body": "<string>",
"message": "<string>"
},
"reason": "<string>",
"due_date": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"dismissed_at": "2023-11-07T05:31:56Z",
"dismiss_reason": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
call, email, linkedin 1 - 5001 - 64At least one target field is required.
Show child attributes
Show child attributes
urgent, high, medium, low Type-specific draft. Provide the fields matching task_type.
Show child attributes
Show child attributes
2000Response
Task created.
pending, completed, dismissed, cancelled Task type. Canonical values: call, email, linkedin. Other
non-canonical values may appear on older rows; draft is only
populated for canonical types.
urgent, high, medium, low, null ID of the agent that generated this task. Null for manually created tasks.
Entities this task is about. All fields optional.
Show child attributes
Show child attributes
Type-specific draft content. Shape varies by task_type.
Show child attributes
Show child attributes
Was this page helpful?