Skip to main content
POST
/
tasks
Manually create a task
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"
}
'
{ "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

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
task_type
enum<string>
required
Available options:
call,
email,
linkedin
task_title
string
required
Required string length: 1 - 500
assignee_id
string
required
Required string length: 1 - 64
targets
object
required

At least one target field is required.

priority
enum<string>
default:medium
Available options:
urgent,
high,
medium,
low
draft
object

Type-specific draft. Provide the fields matching task_type.

reason
string
Maximum string length: 2000
due_date
string<date-time>

Response

Task created.

task_id
string<uuid>
required
status
enum<string>
required
Available options:
pending,
completed,
dismissed,
cancelled
task_type
string | null

Task type. Canonical values: call, email, linkedin. Other non-canonical values may appear on older rows; draft is only populated for canonical types.

task_title
string | null
priority
enum<string> | null
Available options:
urgent,
high,
medium,
low,
null
assignee_id
string | null
agent_id
string | null

ID of the agent that generated this task. Null for manually created tasks.

targets
object

Entities this task is about. All fields optional.

draft
object

Type-specific draft content. Shape varies by task_type.

reason
string | null
due_date
string<date-time> | null
created_at
string<date-time> | null
updated_at
string<date-time> | null
completed_at
string<date-time> | null
dismissed_at
string<date-time> | null
dismiss_reason
string | null