> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.athenaintel.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.athenaintel.com/_mcp/server.

# Create a task

POST https://api.athenaintel.com/api/v0/tasks
Content-Type: application/json

Create a task (an assignable to-do) in a workspace the caller belongs to, with an optional due date and time, priority, assignee, labels, links to the records it is about and a folder or project to put it in. It is the caller's own unless assignee_ref names someone who can already open it (assigning never shares it) or is null. Each link must be a record the caller can open, and a parent folder needs edit access.

Reference: https://docs.athenaintel.com/api-reference/tasks/create

## Authentication

- `X-API-KEY` header (required) — API Key authentication via header

## Request

### Body (application/json)

This endpoint expects a CreateTaskRequestIn.

- `title` (string, required) — What to do, in a short line (at most 500 characters).
- `workspace_id` (string, required) — The workspace to create it in; the caller must be a member.
- `assignee_ref` (string, optional, nullable) — Who it is for: user_… for a person, agent_asset_… for an agent, or me. Left out, the task is the caller's own; null, nobody's. Assigning never shares the task: the assignee must already be able to open it.
- `description` (string, optional, nullable) — Details, in markdown.
- `due_date` (string, optional, nullable) — YYYY-MM-DD: a calendar day, with no time zone.
- `due_time` (string, optional, nullable) — HH:MM on a 24-hour clock; needs due_date and due_time_zone.
- `due_time_zone` (string, optional, nullable) — The IANA time zone of due_time, such as America/New_York.
- `labels` (list of TaskLabelIn, optional, nullable) — Labels to put on it.
- `links` (list of TaskLinkIn, optional, nullable) — The records it is about (at most 10). Each must be one the caller can open.
- `parent_folder_id` (string, optional, nullable) — A folder or project to put it in; needs edit access there.
- `priority` (enum, optional, nullable) — How much it matters; left out, none.
  - Allowed values: `none`, `low`, `medium`, `high`

## Response

### 201

The task, read as the caller.

- `assignee` (TaskAssigneeOut, required, nullable) — Who it is for, or null for nobody.
- `can_edit` (boolean, required, nullable) — Whether the caller may change it; null in a list.
- `completed_at` (datetime, required, nullable) — When it was marked done.
- `completed_by_ref` (string, required, nullable) — Who marked it done.
- `created_at` (datetime, required, nullable)
- `created_by` (string, required, nullable) — The user who created it.
- `description` (string, required, nullable) — Markdown.
- `due_date` (string, required, nullable) — YYYY-MM-DD, or null.
- `due_time` (string, required, nullable) — HH:MM (24-hour), or null.
- `due_time_zone` (string, required, nullable) — The IANA time zone of due_time.
- `id` (string, required) — The task's asset id.
- `is_archived` (boolean, required) — Whether it is in the trash.
- `labels` (list of TaskLabelOut, required)
- `links` (list of TaskLinkOut, required) — The records it is about, read as the caller. Always empty in a list.
- `priority` (enum, required)
  - Allowed values: `none`, `low`, `medium`, `high`
- `status` (enum, required)
  - Allowed values: `open`, `done`
- `title` (string, required)
- `updated_at` (datetime, required, nullable)
- `workspace_id` (string, required)

## Errors

### 400 Bad Request Error

A field cannot be a task's (a bad date, time zone or label), or the folder cannot hold it.

- `any`

### 401 Unauthorized Error

The API key or token is missing or not valid.

- `any`

### 403 Forbidden Error

The caller is not a member of the workspace named, or (on create) may not give the task that assignee, link or folder.

- `any`

### 404 Not Found Error

The parent folder was not found.

- `any`

### 422 Unprocessable Entity Error

Validation Error

- `detail` (list of ValidationError, optional)

### 503 Service Unavailable Error

Tasks are not ready on this deployment yet (its database update has not run).

- `any`

## Types

### TaskLabelIn

A label to put on a task.

- `name` (string, required) — The label's name (at most 64 characters, matched case-insensitively).
- `color` (string, optional, nullable) — #RRGGBB. Left out, a label the task already has keeps its color.

### TaskLinkIn

A record a task is about: an asset, an ontology object or a web page.

- `referenced` (enum, required) — asset, ontology_object or external_url.
  - Allowed values: `asset`, `ontology_object`, `external_url`
- `anchor` (map from string to any, optional, nullable) — A place inside the asset (a cell range, a page), when one is meant.
- `id` (string, optional, nullable) — The asset or ontology object id (asset and ontology_object).
- `url` (string, optional, nullable) — The web page's URL (external_url).

### TaskAssigneeOut

Who a task is assigned to: a person or an agent.

- `display_name` (string, required, nullable) — Their name, when the caller may see it (an agent's only when they can open it).
- `kind` (enum, required) — person or agent.
  - Allowed values: `person`, `agent`
- `ref` (string, required) — user_… for a person, agent_asset_… for an agent.

### TaskLabelOut

A label on a task: its name, color and who applied it.

- `applied_at` (string, required) — When it was applied (ISO 8601).
- `applied_by_ref` (string, required) — Principal ref of who applied it.
- `color` (string, required, nullable) — #RRGGBB, or null.
- `name` (string, required)

### TaskLinkOut

A record a task is about, read as the caller.

- `detail` (string, required, nullable) — Its asset or object type, read as the caller.
- `id` (string, required, nullable) — The asset or object id; null when unreadable.
- `readable` (boolean, required) — Whether the caller can open it. One they can't shows its kind only: no id, URL or title.
- `referenced` (string, required) — asset, ontology_object or external_url.
- `title` (string, required, nullable) — Its title, read as the caller.
- `url` (string, required, nullable) — The web page's URL; null when unreadable.

### ValidationError

- `loc` (list of ValidationErrorLocItems, required)
- `msg` (string, required)
- `type` (string, required)
- `ctx` (ValidationErrorCtx, optional)
- `input` (any, optional)

### ValidationErrorLocItems

- string
- integer

### ValidationErrorCtx

## Examples

**Request**

```json
{
  "title": "Send the deck to Mayfield",
  "workspace_id": "ws_abc123-def456",
  "due_date": "2026-11-13",
  "due_time": "15:00",
  "due_time_zone": "America/New_York",
  "labels": [
    {
      "name": "Investor"
    }
  ],
  "links": [
    {
      "referenced": "external_url",
      "url": "https://example.com"
    }
  ],
  "priority": "high"
}
```

**Response**

```json
{
  "assignee": {
    "display_name": "Ada Lovelace",
    "kind": "person",
    "ref": "user_123"
  },
  "can_edit": true,
  "completed_at": "2024-01-15T09:30:00Z",
  "completed_by_ref": "string",
  "created_at": "2026-11-11T15:00:00+00:00",
  "created_by": "user_123",
  "description": "string",
  "due_date": "2026-11-13",
  "due_time": "15:00",
  "due_time_zone": "America/New_York",
  "id": "asset_7c1e5b2a-4f3d-4e8a-9b6c-1d2e3f4a5b6c",
  "is_archived": false,
  "labels": [
    {
      "applied_at": "2026-11-11T15:00:00+00:00",
      "applied_by_ref": "user_123",
      "color": "string",
      "name": "Investor"
    }
  ],
  "links": [
    {
      "detail": "string",
      "id": "string",
      "readable": true,
      "referenced": "external_url",
      "title": "example.com",
      "url": "https://example.com"
    }
  ],
  "priority": "high",
  "status": "open",
  "title": "Send the deck to Mayfield",
  "updated_at": "2026-11-11T15:00:00+00:00",
  "workspace_id": "ws_abc123-def456"
}
```

**SDK Code**

```python
import requests

url = "https://api.athenaintel.com/api/v0/tasks"

payload = {
    "title": "Send the deck to Mayfield",
    "workspace_id": "ws_abc123-def456",
    "due_date": "2026-11-13",
    "due_time": "15:00",
    "due_time_zone": "America/New_York",
    "labels": [{ "name": "Investor" }],
    "links": [
        {
            "referenced": "external_url",
            "url": "https://example.com"
        }
    ],
    "priority": "high"
}
headers = {
    "X-API-KEY": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.athenaintel.com/api/v0/tasks';
const options = {
  method: 'POST',
  headers: {'X-API-KEY': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"title":"Send the deck to Mayfield","workspace_id":"ws_abc123-def456","due_date":"2026-11-13","due_time":"15:00","due_time_zone":"America/New_York","labels":[{"name":"Investor"}],"links":[{"referenced":"external_url","url":"https://example.com"}],"priority":"high"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.athenaintel.com/api/v0/tasks"

	payload := strings.NewReader("{\n  \"title\": \"Send the deck to Mayfield\",\n  \"workspace_id\": \"ws_abc123-def456\",\n  \"due_date\": \"2026-11-13\",\n  \"due_time\": \"15:00\",\n  \"due_time_zone\": \"America/New_York\",\n  \"labels\": [\n    {\n      \"name\": \"Investor\"\n    }\n  ],\n  \"links\": [\n    {\n      \"referenced\": \"external_url\",\n      \"url\": \"https://example.com\"\n    }\n  ],\n  \"priority\": \"high\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("X-API-KEY", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.athenaintel.com/api/v0/tasks")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"title\": \"Send the deck to Mayfield\",\n  \"workspace_id\": \"ws_abc123-def456\",\n  \"due_date\": \"2026-11-13\",\n  \"due_time\": \"15:00\",\n  \"due_time_zone\": \"America/New_York\",\n  \"labels\": [\n    {\n      \"name\": \"Investor\"\n    }\n  ],\n  \"links\": [\n    {\n      \"referenced\": \"external_url\",\n      \"url\": \"https://example.com\"\n    }\n  ],\n  \"priority\": \"high\"\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.athenaintel.com/api/v0/tasks")
  .header("X-API-KEY", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"title\": \"Send the deck to Mayfield\",\n  \"workspace_id\": \"ws_abc123-def456\",\n  \"due_date\": \"2026-11-13\",\n  \"due_time\": \"15:00\",\n  \"due_time_zone\": \"America/New_York\",\n  \"labels\": [\n    {\n      \"name\": \"Investor\"\n    }\n  ],\n  \"links\": [\n    {\n      \"referenced\": \"external_url\",\n      \"url\": \"https://example.com\"\n    }\n  ],\n  \"priority\": \"high\"\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.athenaintel.com/api/v0/tasks', [
  'body' => '{
  "title": "Send the deck to Mayfield",
  "workspace_id": "ws_abc123-def456",
  "due_date": "2026-11-13",
  "due_time": "15:00",
  "due_time_zone": "America/New_York",
  "labels": [
    {
      "name": "Investor"
    }
  ],
  "links": [
    {
      "referenced": "external_url",
      "url": "https://example.com"
    }
  ],
  "priority": "high"
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'X-API-KEY' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.athenaintel.com/api/v0/tasks");
var request = new RestRequest(Method.POST);
request.AddHeader("X-API-KEY", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"title\": \"Send the deck to Mayfield\",\n  \"workspace_id\": \"ws_abc123-def456\",\n  \"due_date\": \"2026-11-13\",\n  \"due_time\": \"15:00\",\n  \"due_time_zone\": \"America/New_York\",\n  \"labels\": [\n    {\n      \"name\": \"Investor\"\n    }\n  ],\n  \"links\": [\n    {\n      \"referenced\": \"external_url\",\n      \"url\": \"https://example.com\"\n    }\n  ],\n  \"priority\": \"high\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "X-API-KEY": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "title": "Send the deck to Mayfield",
  "workspace_id": "ws_abc123-def456",
  "due_date": "2026-11-13",
  "due_time": "15:00",
  "due_time_zone": "America/New_York",
  "labels": [["name": "Investor"]],
  "links": [
    [
      "referenced": "external_url",
      "url": "https://example.com"
    ]
  ],
  "priority": "high"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.athenaintel.com/api/v0/tasks")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```