# Complete a human task

Logs the outcome of a task, with a note. `no_answer` brings the task back after its `retry_after_days` until `max_attempts` (then a flow continues); `skip` continues a flow; `done_positive` and `done_negative` stop or continue a flow, as its step says (`outcomes`). A task gets one outcome.

A human task is something a person on the team does for one lead: a call, a voice note, a follow-up, a review or research. It comes from a `human_task` step of a flow (the sequence waits until the task has an outcome), after a positive or negative reply (branch `on_reply` of the flow), or you create one (a call script, a briefing). The user sees them under Human tasks in the menu, below the Inbox, and logs outcomes there or through you. These routes are the tools `list_human_tasks`, `create_human_task` and `complete_human_task` of the assistant server. A task is free; only finding a phone number (POST /person/phone) costs the normal price.

## Authentication

Send `Authorization: Bearer gtk_…`. Create the key under **API keys in the menu**. Every `gtk_` key can call these routes, also while the Signals API is closed. A missing, invalid or revoked key is **401**.

### Path parameters

- **`id`** `string` · **required** — The id of the task.

### Body parameters

- **`outcome`** `string` · **required** — What came of it. One of: `done_positive`, `done_negative`, `no_answer`, `skip`.
- **`note`** `string` — What happened, up to 2000 characters.
- **`phone`** `string` — A number that was dialled and mySDR did not know; kept on the task.

## Response

- **`object`** `string` · **required** — Always `human_task`. One of: `human_task`.
- **`id`** `string` · **required** — The id of the task.
- **`source`** `string` · **required** — `flow` (a step of a sequence, which waits on it), `reply` (after a reply) or `adhoc` (created by you or the user). One of: `flow`, `reply`, `adhoc`.
- **`kind`** `string` · **required** — What kind of task. One of: `call`, `voice_note`, `follow_up`, `review`, `research`, `custom`.
- **`instruction / reason`** `string / string | null` · **required** — What to do, and why now.
- **`status`** `string` · **required** — `open`, or its outcome: `done_positive`, `done_negative`, `no_answer` (after the last attempt), `skipped`, or `cancelled` (the sequence stopped or the lead replied first). One of: `open`, `done_positive`, `done_negative`, `no_answer`, `skipped`, `cancelled`.
- **`name / company / title / linkedin_url / email / phone`** `string | null` · **required** — The person.
- **`phone_needed`** `boolean` · **required** — A call without a known number that waits for one (`if_no_phone: find_phone`): POST /person/phone with its `linkedin_url`; the number shows here once found.
- **`due_at / deadline_at / overdue`** `string | null / boolean` · **required** — From when it is due (later after a `no_answer`), when it is overdue, and whether it is.
- **`owner`** `object | null` · **required** — Who does it: `id` and `name`.
- **`attempts / max_attempts`** `integer` · **required** — How many outcomes were logged, and after how many `no_answer` the task closes.
- **`outcome_note / completed_at`** `string | null` · **required** — The last note, and when it got its outcome.
- **`flow / flow_step / campaign_id / outreach_id / row_id`** `string | null` · **required** — Where it comes from: the flow and its step, the campaign, the sequence (outreach) and the row of the Leads table.
- **`outcomes`** `object` · **required** — What each outcome does: for a flow task, whether the sequence stops or continues.
- **`created_at / via`** `string / string | null` · **required** — When the task was created, and the key that created it (`Claude`), null for a task from a flow or a reply.
- **`next`** `string` — Only on a call that waits for a phone number: how to find it.
- **`dashboard_url`** `string` · **required** — The task on the Human tasks page.
- **`flow_result`** `string` · **required** — What happened to the sequence: `continued`, `stopped`, `retry` (the task comes back), `not_waiting` (it no longer waited on this task) or `none` (not a flow task).
- **`next_step`** `object | null` · **required** — The next step of the sequence (`type`, `at`, `flow_step`), when it continued.
- **`summary`** `string` · **required** — The same in one sentence.

## Credits

Free. This call never uses credits.

## Errors

- **400** `invalid_request` — No `outcome`, a note that is too long, a phone number that is not valid, or an unknown field.
- **404** `not_found` — The workspace has no human task with this id.
- **409** `invalid_state` — The task already has an outcome.
- **409** `invalid_state` — The key has no user behind it, so mySDR cannot record who did it.
- **401** `authentication_error` — The Authorization header is missing, or the key is unknown or revoked.
- **403** `permission_error` — API access is not part of your plan, or your account is suspended.
- **429** `rate_limit_error` — More than 60 requests per minute, or more than 3 at the same time, on one key. Wait for the Retry-After header.
- **503** `service_unavailable` — The API is temporarily unavailable. Retry later.
- **500** `internal_error` — Something went wrong on our side.

## Example

### cURL

```bash
curl -X POST "https://mysdr.app/api/v1/human-tasks/6f1c0f2e-4a1b-4d2e-9f6a-2b7c1d3e4f50/complete" \
  -H "Authorization: Bearer $MYSDR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "outcome": "no_answer",
    "note": "Voicemail, left no message."
  }'
```

### JavaScript

```javascript
const response = await fetch('https://mysdr.app/api/v1/human-tasks/6f1c0f2e-4a1b-4d2e-9f6a-2b7c1d3e4f50/complete', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.MYSDR_API_KEY}`,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    "outcome": "no_answer",
    "note": "Voicemail, left no message."
  })
});
const body = await response.json();
```

### Python

```python
import json
import os
import urllib.request

payload = {
  "outcome": "no_answer",
  "note": "Voicemail, left no message."
}

request = urllib.request.Request(
    "https://mysdr.app/api/v1/human-tasks/6f1c0f2e-4a1b-4d2e-9f6a-2b7c1d3e4f50/complete",
    headers={
    "Authorization": f"Bearer {os.environ['MYSDR_API_KEY']}",
    "Content-Type": "application/json"
    },
    data=json.dumps(payload).encode(),
    method="POST",
)
with urllib.request.urlopen(request) as response:
    body = json.load(response)
```

### Example response

```json
{
  "object": "human_task",
  "id": "6f1c0f2e-4a1b-4d2e-9f6a-2b7c1d3e4f50",
  "source": "flow",
  "kind": "call",
  "instruction": "Call to ask whether the demo invite landed. Mention the funding round.",
  "reason": "No reaction after 3 days: step call_1 of flow cfo_after_funding.",
  "status": "open",
  "name": "Jane Example",
  "company": "Acme",
  "title": "CFO",
  "linkedin_url": "https://www.linkedin.com/in/jane-example",
  "email": null,
  "phone": "+32 470 12 34 56",
  "phone_needed": false,
  "due_at": "2026-10-31T09:00:00.000Z",
  "deadline_at": "2026-10-31T09:00:00.000Z",
  "overdue": false,
  "owner": {
    "id": "0b5a3c3e-1111-4c2e-9a3f-1234567890ab",
    "name": "Louis"
  },
  "attempts": 1,
  "max_attempts": 3,
  "outcome_note": "Voicemail, left no message.",
  "completed_at": null,
  "flow": "cfo_after_funding",
  "flow_step": "call_1",
  "campaign_id": null,
  "outreach_id": null,
  "row_id": null,
  "created_at": "2026-10-29T09:00:00.000Z",
  "via": null,
  "outcomes": {
    "done_positive": "the flow stops",
    "done_negative": "the flow stops",
    "no_answer": "the task comes back in 2 days",
    "skip": "the flow continues"
  },
  "dashboard_url": "https://mysdr.app/en/gtm/human-tasks?task=6f1c0f2e-4a1b-4d2e-9f6a-2b7c1d3e4f50",
  "flow_result": "retry",
  "next_step": null,
  "summary": "No answer: the task comes back on 2026-10-31."
}
```
