Create issues
Opens a work item on the board, filed as YOU, where the repository lives: an issue on the deployment's forge, or on GitHub for a repository the forge mirrors from there or does not hold at all.
POST /v1/task/projects/{key}/issues
| Address | https://api.hanzo.ai/v1/task/projects/{key}/issues |
| Method | POST |
| Operation | post_task_projects_by_key_issues |
| Auth | Authorization: Bearer $HANZO_API_KEY |
Opens a work item on the board, filed as YOU, where the
repository lives: an issue on the deployment's forge, or on GitHub for a
repository the forge mirrors from there or does not hold at all. Answers the
card with the issue's address as url.
The column and priority are written as LABELS, which is what makes the card and the issue the same object: someone relabelling in the web UI has moved your card.
Asked for in a chat thread, the issue is bound to that thread, and what happens to it on GitHub is said there.
Request
12 fields, body application/json (required).
| Field | In | Type | Required | Description |
|---|---|---|---|---|
key | path | string | yes | Key is the board — the repository name, from the path. |
description | body | string | — | Description becomes the issue body. |
key | body | string | — | Key is the board — the repository name, from the path. |
priority | body | string | — | Priority is one of none, urgent, high, medium or low. |
reply | body | task.Reply | — | |
reply.channel | body | string | — | Channel is the room inside that workspace, and it is what decides whether there is an address at all. |
reply.provider | body | string | — | Provider is the transport the conversation is on — slack, discord, telegram, teams — and it is what decides who can carry the text at all. |
reply.thread | body | string | — | Thread narrows the address to one thread inside the channel — on Slack the parent message's ts, the same value a reply carries as thread_ts. |
reply.turn | body | string | — | Turn is the turn that renders a run started here: the session whose one message the run's progress and its outcome are shown in. |
reply.user | body | string | — | User is the platform's id for the person the conversation is with — whose run it is. |
status | body | string | — | Status is the board column to open into: backlog, todo, in_progress, done or canceled. |
title | body | string | — | Title is the one line the card is read by on the board. |
Response
| Status | Body | Meaning |
|---|---|---|
200 | task.issueView | ok |
default | problem-details | refused |
200 body — 19 fields.
| Field | In | Type | Always | Description |
|---|---|---|---|---|
assignee | body | string | — | Assignee is who holds the work — an IAM username, or the login of the FIRST assignee when a forge issue has several. |
createdAt | body | integer (int64) | — | CreatedAt is when the item was opened, in unix seconds. |
description | body | string | — | Description is the body, markdown as its author wrote it. |
dueAt | body | integer (int64) | — | DueAt is when the work is due, in unix seconds; absent means no due date. |
extRef | body | string | — | ExtRef anchors the item to something outside the task — a mirrored issue ("github:owner/repo#123"), a pushed PR branch, or a record on another plane. |
id | body | string | — | ID is the work item's opaque handle, and it is NOT how you address it — ProjectKey plus Number is. |
identifier | body | string | — | Identifier is the human handle, "<key>#<number>" — the board and the number on it, joined. |
kind | body | string | — | Kind is what the item IS: issue, pr or epic. |
labels | body | string[] | — | Labels are the item's remaining tags, with the status and priority labels lifted OUT — a column that stayed here would render twice, once as the card's column and once as a chip on the card. |
number | body | integer (int64) | — | Number is the item's number ON ITS BOARD, from 1 and monotonic there — the forge's own issue number for a forge row, allocated inside the create transaction for an index row so it cannot race. |
priority | body | string | — | Priority is urgent, high, medium, low or none. |
projectKey | body | string | — | ProjectKey is the board this item is on: the repository name for a forge issue, the index board's key otherwise. |
repo | body | string | — | Repo is the git repository the item is bound to, so a repository's Issues and PRs tabs are filters over this one table. |
source | body | string | — | Source is which surface OPENED it: team, git, crm, helpdesk, cms or agent. |
startAt | body | integer (int64) | — | StartAt is when the work starts, in unix seconds; absent means unscheduled. |
status | body | string | — | Status is the board column: backlog, todo, in_progress, done or canceled, and nothing else. |
title | body | string | — | Title is the item's one-line summary. |
updatedAt | body | integer (int64) | — | UpdatedAt is when it last changed, in unix seconds. |
url | body | string | — | URL is where a person reads the item: its page on the forge or on GitHub. |
Failure carries the platform error shape — see Errors.
Examples
hanzo task projects issues create <key>import { Configuration, TaskApi } from 'hanzoai';
const api = new TaskApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.postTaskProjectsByKeyIssues({ key: 'key', description: "<description>", key: "<key>" });from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import TaskApi
client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = TaskApi(client).post_task_projects_by_key_issues(key='key', description="<description>", key="<key>")cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)
resp, _, err := client.TaskAPI.PostTaskProjectsByKeyIssues(context.Background()).Execute()
if err != nil {
return err
}use hanzo_client::apis::{configuration::Configuration, task_api};
let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();
let result = task_api::post_task_projects_by_key_issues(&cfg, Default::default()).await?;import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.TaskApi;
ApiClient client = new ApiClient();
client.setBearerToken(System.getenv("HANZO_API_KEY"));
var result = new TaskApi(client).postTaskProjectsByKeyIssues();curl -X POST https://api.hanzo.ai/v1/task/projects/<key>/issues \
-H "Authorization: Bearer $HANZO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"description": "<description>",
"key": "<key>"
}'MCP reaches task through the task tool, which names its 10 operations with its own verbs — this one among them, under a name only MCP declares. describe explains any of them:
curl -X POST https://api.hanzo.ai/v1/mcp \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "describe",
"arguments": {
"op": "get_task_board"
}
}
}'