Claim issues

Takes an issue: it becomes yours and it moves to in_progress.

POST /v1/task/projects/{key}/issues/{num}/claim

Addresshttps://api.hanzo.ai/v1/task/projects/{key}/issues/{num}/claim
MethodPOST
Operationpost_task_projects_by_key_issues_by_num_claim
AuthAuthorization: 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.

FieldInTypeRequiredDescription
keypathstringyes
numpathintegeryes

Response

StatusBodyMeaning
200task.issueHitok
defaultproblem-detailsrefused

200 body — 11 fields.

FieldInTypeAlwaysDescription
assigneebodystring—Assignee is who holds the work.
kindbodystring—Kind is what the row IS: issue, pr or epic.
numberbodyinteger (int64)—Number is the issue's number on that board, from 1 and monotonic there.
prioritybodystring—Priority is urgent, high, medium, low or none.
projectbodystring—Project is the board key the issue is on.
repobodystring—Repo is the git repository the issue is bound to, empty when it is not repo-bound.
roombodystring—Room is the collaboration room the issue belongs to, spelled "<space>_<room>" — empty when it is not room-bound, which is most of them.
sourcebodystring—Source is which surface opened it: team, git, crm, helpdesk, cms or agent.
statusbodystring—Status is the board column: backlog, todo, in_progress, done or canceled.
titlebodystring—Title is the issue's one-line summary — what the q filter matched, along with the description.
urlbodystring—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 task projects issues claim <key> 1
import { Configuration, TaskApi } from 'hanzoai';

const api = new TaskApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.postTaskProjectsByKeyIssuesByNumClaim({ key: 'key', num: 'num' });
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_by_num_claim(key='key', num='num')
cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

resp, _, err := client.TaskAPI.PostTaskProjectsByKeyIssuesByNumClaim(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_by_num_claim(&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).postTaskProjectsByKeyIssuesByNumClaim();
curl -X POST https://api.hanzo.ai/v1/task/projects/<key>/issues/1/claim \
  -H "Authorization: Bearer $HANZO_API_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"
         }
       }
     }'

Task API · All Hanzo APIs · Interactive reference

Was this page useful?