Takes an issue: it becomes yours and it moves to in_progress.
Takes an issue: it becomes yours and it moves to in_progress. The holder is the CALLER, never an argument.
POST /v1/todo/projects/{key}/issues/{num}/claim
| Address | https://api.hanzo.ai/v1/todo/projects/{key}/issues/{num}/claim |
| Method | POST |
| Operation | post_todo_projects_by_key_issues_by_num_claim |
| Auth | Authorization: Bearer $HANZO_API_KEY |
Takes an issue: it becomes yours and it moves to in_progress.
The holder is the CALLER, never an argument. "Assign this to someone else" is a different act with different authority, and it already exists as a PATCH; conflating them would let anyone hand work to anyone by naming them.
Claiming something already held by someone else is refused rather than silently taken — two agents on one issue is the failure this prevents, and a claim that quietly wins a race is worse than one that says no.
Request
2 fields.
| Field | In | Type | Required | Description |
|---|---|---|---|---|
key | path | string | yes | |
num | path | integer | yes |
Response
| Status | Body | Meaning |
|---|---|---|
200 | issueHit | ok |
200 body — 10 fields.
| Field | In | Type | Always | Description |
|---|---|---|---|---|
assignee | body | string | — | Assignee is who holds the work. EMPTY MEANS UNHELD, which is what makes the issue claimable: claiming one already held by someone else is refused with 409… |
kind | body | string | — | Kind is what the row IS: issue, pr or epic. |
number | body | integer | — | Number is the issue's number on that board, from 1 and monotonic there. |
priority | body | string | — | Priority is urgent, high, medium, low or none. |
project | body | string | — | Project is the board key the issue is on. |
repo | body | string | — | Repo is the git repository the issue is bound to, empty when it is not repo-bound. |
source | body | string | — | Source is which surface opened it: team, git, crm, helpdesk, cms or agent. |
status | body | string | — | Status is the board column: backlog, todo, in_progress, done or canceled. |
title | body | string | — | Title is the issue's one-line summary — what the q filter matched, along with the description. |
url | body | string | — | URL is the row's external anchor — its extRef — which is a link only when the feeder sent one. |
Failure carries the platform error shape — see Errors.
Examples
hanzo todo projects issues claim <key> 1import { Configuration, TodoApi } from 'hanzoai';
const api = new TodoApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.postTodoProjectsByKeyIssuesByNumClaim({ key: 'key', num: 'num' });from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import TodoApi
client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = TodoApi(client).post_todo_projects_by_key_issues_by_num_claim(key='key', num='num')cfg := cloud.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := cloud.NewAPIClient(cfg)
resp, _, err := client.TodoAPI.PostTodoProjectsByKeyIssuesByNumClaim(context.Background()).Execute()
if err != nil {
return err
}use hanzo_cloud::apis::{configuration::Configuration, todo_api};
let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();
let result = todo_api::post_todo_projects_by_key_issues_by_num_claim(&cfg, Default::default()).await?;import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.TodoApi;
ApiClient client = new ApiClient();
client.setRequestInterceptor(b -> b.header("Authorization", "Bearer " + System.getenv("HANZO_API_KEY")));
var result = new TodoApi(client).postTodoProjectsByKeyIssuesByNumClaim();curl -X POST https://api.hanzo.ai/v1/todo/projects/<key>/issues/1/claim \
-H "Authorization: Bearer $HANZO_API_KEY"The door reaches todo through the todo tool, which names its 12 operations with its own verbs — this one among them, under a name only the door 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_todo_board"
}
}
}'How is this guide?