# Claim issues

URL: https://docs.hanzo.ai/docs/openapi/task/post-task-projects-by-key-issues-by-num-claim

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

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

> [Task →](https://docs.hanzo.ai/docs/openapi/task) · [All API references →](https://docs.hanzo.ai/docs/openapi) · [Get started →](https://docs.hanzo.ai/docs/guides)

|               |                                                                  |
| ------------- | ---------------------------------------------------------------- |
| **Address**   | `https://api.hanzo.ai/v1/task/projects/{key}/issues/{num}/claim` |
| **Method**    | `POST`                                                           |
| **Operation** | `post_task_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`     | task.issueHit   | ok      |
| `default` | problem-details | refused |

`200` body — 11 fields.

| Field      | In   | Type            | Always | Description                                                                                                                                |
| ---------- | ---- | --------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------ |
| `assignee` | body | string          | —      | Assignee is who holds the work.                                                                                                            |
| `kind`     | body | string          | —      | Kind is what the row IS: issue, pr or epic.                                                                                                |
| `number`   | body | integer (int64) | —      | 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.                                                         |
| `room`     | body | string          | —      | Room is the collaboration room the issue belongs to, spelled "\<space>\_\<room>" — empty when it is not room-bound, which is most of them. |
| `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](https://docs.hanzo.ai/docs/errors).

## Examples

**CLI**

```bash
hanzo task projects issues claim <key> 1
```

**SDK**

**.ts**

```ts
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' });
```

**.py**

```python
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')
```

**.go**

```go
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
}
```

**.rs**

```rust
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?;
```

**.java**

```java
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();
```

**HTTP**

```bash
curl -X POST https://api.hanzo.ai/v1/task/projects/<key>/issues/1/claim \
  -H "Authorization: Bearer $HANZO_API_KEY"
```

**MCP**

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:

```bash
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](https://docs.hanzo.ai/docs/openapi/task) · [All Hanzo APIs](https://docs.hanzo.ai/docs/openapi) · [Interactive reference](https://docs.hanzo.ai/docs/openapi/reference)
