API reference
Every endpoint of the public API, generated from the API's own OpenAPI document.
- Base URL
https://api.tasktohuman.com- Auth
Authorization: Bearer tth_live_…- Format
- JSON, snake_case, UTF-8
- Errors
- RFC 9457 problem documents with a stable
code
Tasks#
Create a task#
POST/v1/tasks
Creates a task from one of your task types and notifies its first human. Answers 201 Created with the task and a Location header; a retry with the same Idempotency-Key and body answers 200 OK with the original task and Idempotent-Replayed: true. Unknown body properties are refused with 400 validation_failed (unknown_property). When the task type has open steps (GET /v1/task-types), approvers names the human of each one, one entry per person: an open consensus step (with approvals_needed) takes between approvals_needed and max_approvers entries, each a different person. approvers is refused for any other step, and holds at most 100 entries. When the task type allows it (chain_override in GET /v1/task-types, plan feature routing.chain_override), chain replaces the task type's whole chain for this task: fixed people only, checked like a saved chain and against your plan; approvers and owner are then refused, and the default action, deadline and completion time stay the task type's. urgency (normal or high, default normal) marks the task and starts its email subjects with [Urgent]; it never changes a timer. A routing rule of the workspace may change the chain (unless you sent chain or approvers; with owner, your owner replaces only the rule's first step), the urgency and the tags.
Authenticated with an API key: Authorization: Bearer tth_…
Parameters
| Parameter | In | Type | Description |
|---|---|---|---|
Idempotency-Key | header | string | Up to 255 characters. A retry with the same key and body returns the original task instead of creating a second one. |
Request body
| Property | Type | Description |
|---|---|---|
task_typerequired | string | The task type's key, in the key's workspace. |
title | string | null | Up to 200 characters; the task type's name when left out. Not encrypted and shown in notifications: keep sensitive data out of it. |
payload | object | null | The task type's fields, as a JSON object of up to 64 KB. Fields marked sensitive appear only on the task page. |
callback_url | string | null | A public https URL that receives the decision. Defaults to the task type's callback URL. |
deadline_minutes | integer | null | 1 to 525600 (a year). The task's default action applies when it passes. Defaults to the task type's deadline. |
owner | string (uuid) | null | The id of a human in the workspace who gets the task first, instead of the task type's first step. |
approvers | object[] | null | The people of each open step of the task type (see GET /v1/task-types), one entry per person: every open step, and no other step. A single open step takes exactly one entry; an open consensus step takes between approvals_needed and max_approvers entries, each a different person. At most 100 entries. |
chain | object[] | null | This task's own chain, replacing the task type's whole chain (only when the task type has chain_override, plan feature routing.chain_override): 1 to 10 steps in order, each a fixed human or a consensus step, checked like a saved chain and against your plan. Not with approvers or owner. The default action, deadline and completion time stay the task type's. |
urgency | string | null | normal (the default) or high. A high-urgency task is marked in the app and its email subjects start with [Urgent]; it never changes a timer. A routing rule may set it too. |
Responses
- 200OK: PublicTaskView
Idempotent-Replayedtrue: a retry with the sameIdempotency-Key; the body is the original task. - 201Created: PublicTaskView
LocationThe new task:/v1/tasks/{id}. - 400Bad Request: PublicProblem
- 401Unauthorized: PublicProblem
WWW-AuthenticateBearer. - 402Payment Required: PublicProblem
- 403Forbidden: PublicProblem
- 409Conflict: PublicProblem
- 422Unprocessable Entity: PublicProblem
- 429Too Many Requests: PublicProblem
Retry-AfterSeconds to wait before the next request.
curl https://api.tasktohuman.com/v1/tasks \
-H "Authorization: Bearer $TTH_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: refund-4821" \
-d '{
"task_type": "approve_refund",
"title": "Refund €249 to order #4821?",
"payload": {
"order_id": "4821",
"amount": 249,
"reason": "Arrived damaged",
"customer_email": "marta@example.com"
},
"deadline_minutes": 120
}'const response = await fetch("https://api.tasktohuman.com/v1/tasks", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.TTH_API_KEY}`,
"Content-Type": "application/json",
"Idempotency-Key": "refund-4821",
},
body: JSON.stringify({
task_type: "approve_refund",
title: "Refund €249 to order #4821?",
payload: {
order_id: "4821",
amount: 249,
reason: "Arrived damaged",
customer_email: "marta@example.com",
},
deadline_minutes: 120,
}),
});
const body = await response.json();
console.log(response.status, body);import os
import requests
response = requests.post(
"https://api.tasktohuman.com/v1/tasks",
headers={
"Authorization": f"Bearer {os.environ['TTH_API_KEY']}",
"Idempotency-Key": "refund-4821",
},
json={
"task_type": "approve_refund",
"title": "Refund €249 to order #4821?",
"payload": {
"order_id": "4821",
"amount": 249,
"reason": "Arrived damaged",
"customer_email": "marta@example.com",
},
"deadline_minutes": 120,
},
timeout=10,
)
print(response.status_code, response.json())HTTP/1.1 201 Created
Content-Type: application/json; charset=utf-8
Location: /v1/tasks/01a1e3a7-6489-7106-aa3a-c976287f9999
{
"id": "01a1e3a7-6489-7106-aa3a-c976287f9999",
"state": "notified",
"task_type": "approve_refund",
"title": "Refund €249 to order #4821?",
"test": false,
"owner": {
"id": "01a1dcba-b57a-7aa2-b6b1-05d81545c2ba",
"name": "Ana"
},
"expires_at": "2026-11-16T11:19:20.7134083Z",
"created_at": "2026-11-16T09:19:20.7134083Z",
"finished_at": null,
"escalations": 0,
"decision": null
}Get a task#
GET/v1/tasks/{id}
One task with its payload and, once decided, the decision with the human's comment and any edited values. A task of another workspace or mode, or older than your plan's history, is a 404.
Authenticated with an API key: Authorization: Bearer tth_…
Parameters
| Parameter | In | Type | Description |
|---|---|---|---|
idrequired | path | string (uuid) |
Responses
- 200OK: PublicTaskView
- 401Unauthorized: PublicProblem
WWW-AuthenticateBearer. - 403Forbidden: PublicProblem
- 404Not Found: PublicProblem
- 429Too Many Requests: PublicProblem
Retry-AfterSeconds to wait before the next request.
curl https://api.tasktohuman.com/v1/tasks/01a1e3a7-6489-7106-aa3a-c976287f9999 \
-H "Authorization: Bearer $TTH_API_KEY"const response = await fetch("https://api.tasktohuman.com/v1/tasks/01a1e3a7-6489-7106-aa3a-c976287f9999", {
headers: {
Authorization: `Bearer ${process.env.TTH_API_KEY}`,
},
});
const body = await response.json();
console.log(response.status, body);import os
import requests
response = requests.get(
"https://api.tasktohuman.com/v1/tasks/01a1e3a7-6489-7106-aa3a-c976287f9999",
headers={
"Authorization": f"Bearer {os.environ['TTH_API_KEY']}",
},
timeout=10,
)
print(response.status_code, response.json())HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"id": "01a1e3a7-6489-7106-aa3a-c976287f9999",
"state": "notified",
"task_type": "approve_refund",
"title": "Refund €249 to order #4821?",
"test": false,
"owner": {
"id": "01a1dcba-b57a-7aa2-b6b1-05d81545c2ba",
"name": "Ana"
},
"expires_at": "2026-11-16T11:19:20.713Z",
"created_at": "2026-11-16T09:19:20.713Z",
"finished_at": null,
"escalations": 0,
"decision": null,
"payload": {
"order_id": "4821",
"amount": 249,
"reason": "Arrived damaged",
"customer_email": "marta@example.com"
},
"payload_sha256": "77d21b5d074a3fa4dca6ed88891f798696041c64eca3e26e7d5d3a7f91d747ef"
}List tasks#
GET/v1/tasks
The key's workspace and mode only, newest first and then by id, without payloads. limit is 1 to 100 (default 50). When the answer has a next_cursor, there are more tasks: send it as cursor with the same filters for the next page; it is left out on the last page. A task created while you page never repeats or hides another. An unknown task_type gives an empty list; an unknown state is a 400 validation_failed; a cursor that is not one gives an empty list. With finished_after, only finished tasks (resolved, expired or cancelled) that finished at or after that time, oldest finished first and then by id, paged the same way. When polling, start each poll a little before the latest finished_at seen (for example one minute) and skip the ids already handled. With finished_after, expand=details gives each task exactly as GET /v1/tasks/{id} does (payload, payload_sha256, the decision's comment, fields and attachments, and the comments in quorum), and limit is then 1 to 25 (default 25); expand without finished_after, or with any other value, is a 400 validation_failed.
Authenticated with an API key: Authorization: Bearer tth_…
Parameters
| Parameter | In | Type | Description |
|---|---|---|---|
state | query | "open" | "notified" | "acknowledged" | "resolved" | "expired" | "cancelled" | Only tasks in this state: open, notified, acknowledged, resolved, expired or cancelled. |
task_type | query | string | Only tasks of this task type key. |
created_after | query | string (date-time) | Only tasks created after this time (ISO 8601). |
created_before | query | string (date-time) | Only tasks created before this time (ISO 8601). |
finished_after | query | string (date-time) | Only finished tasks that finished at or after this time (ISO 8601), oldest finished first, then by id. |
cursor | query | string | The next_cursor of the page before, sent with the same filters; leave out for the first page. |
limit | query | integer | 1 to 100; default 50. With expand=details, 1 to 25; default 25. |
expand | query | "details" | details, only with finished_after: each task as GET /v1/tasks/{id} returns it (payload, comment, response fields and files). |
Responses
- 200OK: PublicTaskList
- 400Bad Request: PublicProblem
- 401Unauthorized: PublicProblem
WWW-AuthenticateBearer. - 403Forbidden: PublicProblem
- 429Too Many Requests: PublicProblem
Retry-AfterSeconds to wait before the next request.
curl "https://api.tasktohuman.com/v1/tasks?finished_after=2026-11-16T09:00:00Z&expand=details&limit=1" \
-H "Authorization: Bearer $TTH_API_KEY"const response = await fetch("https://api.tasktohuman.com/v1/tasks?finished_after=2026-11-16T09:00:00Z&expand=details&limit=1", {
headers: {
Authorization: `Bearer ${process.env.TTH_API_KEY}`,
},
});
const body = await response.json();
console.log(response.status, body);import os
import requests
response = requests.get(
"https://api.tasktohuman.com/v1/tasks?finished_after=2026-11-16T09:00:00Z&expand=details&limit=1",
headers={
"Authorization": f"Bearer {os.environ['TTH_API_KEY']}",
},
timeout=10,
)
print(response.status_code, response.json())HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"data": [
{
"id": "01a1e3a7-6489-7106-aa3a-c976287f9999",
"state": "resolved",
"task_type": "approve_refund",
"title": "Refund €249 to order #4821?",
"test": false,
"owner": null,
"expires_at": "2026-11-17T09:19:20.713Z",
"created_at": "2026-11-16T09:19:20.713Z",
"finished_at": "2026-11-16T09:19:54.377Z",
"escalations": 0,
"decision": {
"action": "approved",
"by": {
"id": "01a1dcba-b57a-7aa2-b6b1-05d81545c2ba",
"name": "Ana"
},
"at": "2026-11-16T09:19:54.377Z",
"automatic": false,
"reason": null,
"comment": "Photos confirm the damage.",
"payload": null,
"attachments": []
},
"payload": {
"order_id": "4821",
"amount": 249,
"reason": "Arrived damaged",
"customer_email": "marta@example.com"
},
"payload_sha256": "77d21b5d074a3fa4dca6ed88891f798696041c64eca3e26e7d5d3a7f91d747ef",
"urgency": "normal",
"tags": []
}
],
"next_cursor": "639304175943770000.01a1e3a764897106aa3ac976287f9999"
}curl "https://api.tasktohuman.com/v1/tasks?state=notified&task_type=approve_refund&limit=2" \
-H "Authorization: Bearer $TTH_API_KEY"const response = await fetch("https://api.tasktohuman.com/v1/tasks?state=notified&task_type=approve_refund&limit=2", {
headers: {
Authorization: `Bearer ${process.env.TTH_API_KEY}`,
},
});
const body = await response.json();
console.log(response.status, body);import os
import requests
response = requests.get(
"https://api.tasktohuman.com/v1/tasks?state=notified&task_type=approve_refund&limit=2",
headers={
"Authorization": f"Bearer {os.environ['TTH_API_KEY']}",
},
timeout=10,
)
print(response.status_code, response.json())HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"data": [
{
"id": "01a1e3a7-6489-7106-aa3a-c976287f9999",
"state": "notified",
"task_type": "approve_refund",
"title": "Refund €249 to order #4821?",
"test": false,
"owner": {
"id": "01a1dcba-b57a-7aa2-b6b1-05d81545c2ba",
"name": "Ana"
},
"expires_at": "2026-11-16T11:19:20.713Z",
"created_at": "2026-11-16T09:19:20.713Z",
"finished_at": null,
"escalations": 0,
"decision": null
}
]
}Cancel a task#
POST/v1/tasks/{id}/cancel
Cancels an open task: it becomes cancelled, the humans notified so far are told, and the callback is sent. A task that is already resolved, expired or cancelled is a 409 task_already_finished with its state and action.
Authenticated with an API key: Authorization: Bearer tth_…
Parameters
| Parameter | In | Type | Description |
|---|---|---|---|
idrequired | path | string (uuid) |
Responses
- 200OK: PublicTaskView
- 401Unauthorized: PublicProblem
WWW-AuthenticateBearer. - 403Forbidden: PublicProblem
- 404Not Found: PublicProblem
- 409Conflict: PublicProblem
- 429Too Many Requests: PublicProblem
Retry-AfterSeconds to wait before the next request.
curl -X POST https://api.tasktohuman.com/v1/tasks/01a1e3a7-6cee-70ef-995d-129e212beeb0/cancel \
-H "Authorization: Bearer $TTH_API_KEY"const response = await fetch("https://api.tasktohuman.com/v1/tasks/01a1e3a7-6cee-70ef-995d-129e212beeb0/cancel", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.TTH_API_KEY}`,
},
});
const body = await response.json();
console.log(response.status, body);import os
import requests
response = requests.post(
"https://api.tasktohuman.com/v1/tasks/01a1e3a7-6cee-70ef-995d-129e212beeb0/cancel",
headers={
"Authorization": f"Bearer {os.environ['TTH_API_KEY']}",
},
timeout=10,
)
print(response.status_code, response.json())HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"id": "01a1e3a7-6cee-70ef-995d-129e212beeb0",
"state": "cancelled",
"task_type": "approve_refund",
"title": "Refund request for order #4822",
"test": false,
"owner": null,
"expires_at": null,
"created_at": "2026-11-16T09:19:22.862Z",
"finished_at": "2026-11-16T09:19:30.777Z",
"escalations": 0,
"decision": {
"action": "cancelled",
"by": null,
"at": "2026-11-16T09:19:30.7778539Z",
"automatic": false,
"reason": null,
"comment": null,
"payload": null
},
"payload": {
"order_id": "4822",
"amount": 249,
"customer_email": "marta@example.com"
},
"payload_sha256": "c039eb0d560cb51766cf4a79e918bb20fb9985d39019df3338182d872199434a"
}Download a file of a decision#
GET/v1/tasks/{id}/attachments/{attachmentId}
A file the person sent with their answer (a file field of the task type), as listed in decision.attachments of the task and its callback. Always application/octet-stream with Content-Disposition: attachment. Files are checked against an allow-list of types by name and content but are not virus-scanned. A task or file of another workspace or mode, or older than your plan's history, is a 404. A file removed to fit the organization's storage allowance (listed with removed: true) is a 410 attachment_removed.
Authenticated with an API key: Authorization: Bearer tth_…
Parameters
| Parameter | In | Type | Description |
|---|---|---|---|
idrequired | path | string (uuid) | |
attachmentIdrequired | path | string (uuid) |
Responses
- 200OK
- 401Unauthorized: PublicProblem
WWW-AuthenticateBearer. - 403Forbidden: PublicProblem
- 404Not Found: PublicProblem
- 410Gone: PublicProblem
- 429Too Many Requests: PublicProblem
Retry-AfterSeconds to wait before the next request.
Webhooks#
Create a task from a webhook#
POST/v1/hooks/{token}
Every task type has its own webhook URL; the token in it is the credential, so no API key is sent. Post any JSON object: the task type's mapping picks the title and each field by a dot path (ticket.customer.email, items.0.name), and a field without a mapping takes the top-level property of the same name. A task type with open steps maps each one (approver.<step>) to a property holding the human's email address or id, or, for an open consensus step, an array of them (one per person); without it the call is refused with approver_required, and an array element that is not a non-empty string with approver_unknown. Webhook tasks are always live. Idempotency-Key works as on POST /v1/tasks.
No API key: the webhook token in the URL is the credential.
Parameters
| Parameter | In | Type | Description |
|---|---|---|---|
tokenrequired | path | string | The task type's webhook token (tth_hook_…), shown once in the app. It is the credential: keep the URL secret. |
Idempotency-Key | header | string | Up to 255 characters. A retry with the same key and body returns the original task instead of creating a second one. |
Request body
Any JSON object. The task type's mapping turns it into the title and fields.
Any JSON object.
Responses
- 200OK: PublicTaskView
Idempotent-Replayedtrue: a retry with the sameIdempotency-Key; the body is the original task. - 201Created: PublicTaskView
LocationThe new task:/v1/tasks/{id}. - 400Bad Request: PublicProblem
- 402Payment Required: PublicProblem
- 403Forbidden: PublicProblem
- 404Not Found: PublicProblem
- 409Conflict: PublicProblem
- 422Unprocessable Entity: PublicProblem
- 429Too Many Requests: PublicProblem
Retry-AfterSeconds to wait before the next request.
curl https://api.tasktohuman.com/v1/hooks/$TTH_WEBHOOK_TOKEN \
-H "Content-Type: application/json" \
-H "Idempotency-Key: ticket-8812" \
-d '{
"subject": "Refund request for order #4822",
"ticket": {
"id": 8812,
"order": 4822,
"customer": {
"email": "marta@example.com"
}
},
"amount": 249
}'const response = await fetch(`https://api.tasktohuman.com/v1/hooks/${process.env.TTH_WEBHOOK_TOKEN}`, {
method: "POST",
headers: {
"Content-Type": "application/json",
"Idempotency-Key": "ticket-8812",
},
body: JSON.stringify({
subject: "Refund request for order #4822",
ticket: {
id: 8812,
order: 4822,
customer: {
email: "marta@example.com",
},
},
amount: 249,
}),
});
const body = await response.json();
console.log(response.status, body);import os
import requests
response = requests.post(
f"https://api.tasktohuman.com/v1/hooks/{os.environ['TTH_WEBHOOK_TOKEN']}",
headers={
"Idempotency-Key": "ticket-8812",
},
json={
"subject": "Refund request for order #4822",
"ticket": {
"id": 8812,
"order": 4822,
"customer": {
"email": "marta@example.com",
},
},
"amount": 249,
},
timeout=10,
)
print(response.status_code, response.json())HTTP/1.1 201 Created
Content-Type: application/json; charset=utf-8
Location: /v1/tasks/01a1e3a7-6cee-70ef-995d-129e212beeb0
{
"id": "01a1e3a7-6cee-70ef-995d-129e212beeb0",
"state": "notified",
"task_type": "approve_refund",
"title": "Refund request for order #4822",
"test": false,
"owner": {
"id": "01a1dcba-b57a-7aa2-b6b1-05d81545c2ba",
"name": "Ana"
},
"expires_at": null,
"created_at": "2026-11-16T09:19:22.8621873Z",
"finished_at": null,
"escalations": 0,
"decision": null
}Task types and humans#
List task types#
GET/v1/task-types
The task types of the key's workspace (archived ones left out), by key, with their fields (what payload of POST /v1/tasks takes), default_deadline_minutes and the steps of each chain: a step whose assignment is at_creation or group is open, and POST /v1/tasks must name its human in approvers (an open consensus step, shown with approvals_needed and max_approvers, takes that many different people, one entry each). chain_override says whether POST /v1/tasks may send its own chain for the type. Nothing else of a task type is shown here: never its callback, webhook, instructions or humans. A test key and a live key see the same task types. limit is 1 to 100 (default 50); when next_cursor is not null, send it as cursor for the next page. On every plan.
Authenticated with an API key: Authorization: Bearer tth_…
Parameters
| Parameter | In | Type | Description |
|---|---|---|---|
cursor | query | string | The next_cursor of the page before; leave out for the first page. |
limit | query | integer | 1 to 100; default 50. |
Responses
- 200OK: PublicTaskTypeList
- 401Unauthorized: PublicProblem
WWW-AuthenticateBearer. - 403Forbidden: PublicProblem
- 429Too Many Requests: PublicProblem
Retry-AfterSeconds to wait before the next request.
curl "https://api.tasktohuman.com/v1/task-types?limit=1" \
-H "Authorization: Bearer $TTH_API_KEY"const response = await fetch("https://api.tasktohuman.com/v1/task-types?limit=1", {
headers: {
Authorization: `Bearer ${process.env.TTH_API_KEY}`,
},
});
const body = await response.json();
console.log(response.status, body);import os
import requests
response = requests.get(
"https://api.tasktohuman.com/v1/task-types?limit=1",
headers={
"Authorization": f"Bearer {os.environ['TTH_API_KEY']}",
},
timeout=10,
)
print(response.status_code, response.json())HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"data": [
{
"key": "approve_refund",
"name": "Approve a refund",
"kind": "approval",
"steps": [
{
"step": 1,
"assignment": "human"
},
{
"step": 2,
"assignment": "group",
"group": {
"id": "01a1dd02-3c4b-7e19-9f0a-2b5c6d7e8f90",
"name": "Finance"
}
}
],
"chain_override": false,
"fields": [
{
"key": "order_id",
"label": "Order",
"type": "text",
"required": true,
"sensitive": false,
"editable": false
},
{
"key": "amount",
"label": "Amount (€)",
"type": "number",
"required": true,
"sensitive": false,
"editable": true
},
{
"key": "reason",
"label": "Reason",
"type": "long_text",
"required": true,
"sensitive": false,
"editable": false
},
{
"key": "customer_email",
"label": "Customer email",
"type": "email",
"required": false,
"sensitive": true,
"editable": false
}
],
"default_deadline_minutes": 1440
}
],
"next_cursor": "approve_refund"
}Get a task type#
GET/v1/task-types/{key}
One task type of the key's workspace by its key, exactly as GET /v1/task-types lists it: fields, default_deadline_minutes, steps and chain_override. An unknown key, an archived task type or one of another workspace is a 404. On every plan.
Authenticated with an API key: Authorization: Bearer tth_…
Parameters
| Parameter | In | Type | Description |
|---|---|---|---|
keyrequired | path | string | The task type's key (the key in GET /v1/task-types). |
Responses
- 200OK: PublicTaskTypeView
- 401Unauthorized: PublicProblem
WWW-AuthenticateBearer. - 403Forbidden: PublicProblem
- 404Not Found: PublicProblem
- 429Too Many Requests: PublicProblem
Retry-AfterSeconds to wait before the next request.
curl https://api.tasktohuman.com/v1/task-types/approve_refund \
-H "Authorization: Bearer $TTH_API_KEY"const response = await fetch("https://api.tasktohuman.com/v1/task-types/approve_refund", {
headers: {
Authorization: `Bearer ${process.env.TTH_API_KEY}`,
},
});
const body = await response.json();
console.log(response.status, body);import os
import requests
response = requests.get(
"https://api.tasktohuman.com/v1/task-types/approve_refund",
headers={
"Authorization": f"Bearer {os.environ['TTH_API_KEY']}",
},
timeout=10,
)
print(response.status_code, response.json())HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"key": "approve_refund",
"name": "Approve a refund",
"kind": "approval",
"steps": [
{
"step": 1,
"assignment": "human"
},
{
"step": 2,
"assignment": "group",
"group": {
"id": "01a1dd02-3c4b-7e19-9f0a-2b5c6d7e8f90",
"name": "Finance"
}
}
],
"chain_override": false,
"fields": [
{
"key": "order_id",
"label": "Order",
"type": "text",
"required": true,
"sensitive": false,
"editable": false
},
{
"key": "amount",
"label": "Amount (€)",
"type": "number",
"required": true,
"sensitive": false,
"editable": true
},
{
"key": "reason",
"label": "Reason",
"type": "long_text",
"required": true,
"sensitive": false,
"editable": false
},
{
"key": "customer_email",
"label": "Customer email",
"type": "email",
"required": false,
"sensitive": true,
"editable": false
}
],
"default_deadline_minutes": 1440
}List humans#
GET/v1/humans
The humans of the key's workspace who can be asked (not archived, address not marked undeliverable), oldest first: id and name only, never an address. With group (a group id from GET /v1/task-types), only that group's members; an unknown group gives an empty list. limit is 1 to 100 (default 50); when next_cursor is not null, send it as cursor for the next page. Use the ids in approvers or chain when you create a task. Needs a plan with open steps (routing.approver_at_creation) or chain overrides (routing.chain_override); with group, routing.human_groups: 403 feature_not_in_plan otherwise.
Authenticated with an API key: Authorization: Bearer tth_…
Parameters
| Parameter | In | Type | Description |
|---|---|---|---|
group | query | string | Only the members of this human group (an id from GET /v1/task-types). |
cursor | query | string | The next_cursor of the page before; leave out for the first page. |
limit | query | integer | 1 to 100; default 50. |
Responses
- 200OK: PublicHumanList
- 401Unauthorized: PublicProblem
WWW-AuthenticateBearer. - 403Forbidden: PublicProblem
- 429Too Many Requests: PublicProblem
Retry-AfterSeconds to wait before the next request.
Your key and plan#
Check your API key#
GET/v1/me
The organization, workspace and mode (test or live) the key belongs to. Use it to check a key before you send tasks.
Authenticated with an API key: Authorization: Bearer tth_…
Responses
- 200OK: ApiKeyMeResponse
- 401Unauthorized: PublicProblem
WWW-AuthenticateBearer. - 403Forbidden: PublicProblem
- 429Too Many Requests: PublicProblem
Retry-AfterSeconds to wait before the next request.
curl https://api.tasktohuman.com/v1/me \
-H "Authorization: Bearer $TTH_API_KEY"const response = await fetch("https://api.tasktohuman.com/v1/me", {
headers: {
Authorization: `Bearer ${process.env.TTH_API_KEY}`,
},
});
const body = await response.json();
console.log(response.status, body);import os
import requests
response = requests.get(
"https://api.tasktohuman.com/v1/me",
headers={
"Authorization": f"Bearer {os.environ['TTH_API_KEY']}",
},
timeout=10,
)
print(response.status_code, response.json())HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"organization": {
"id": "01a1dcb7-3aaf-7b52-9557-611799ccefc1",
"name": "Lumen Outdoor"
},
"workspace": {
"id": "01a1dcb7-3ab8-7bb2-b72a-95c34c3fa302",
"name": "Shop"
},
"key": {
"id": "01a1dcbb-783e-7d6e-bcff-a162a6c70959",
"prefix": "tth_live_8KdQ2mZp",
"mode": "live"
}
}Read what your plan allows#
GET/v1/entitlements
The organization's plan code and every feature and limit as it applies now: a feature is true or false, a limit a whole number, and null means unlimited. Integrations use it to hide what the plan does not include.
Authenticated with an API key: Authorization: Bearer tth_…
Responses
- 200OK: PublicEntitlementsResponse
- 401Unauthorized: PublicProblem
WWW-AuthenticateBearer. - 403Forbidden: PublicProblem
- 429Too Many Requests: PublicProblem
Retry-AfterSeconds to wait before the next request.
curl https://api.tasktohuman.com/v1/entitlements \
-H "Authorization: Bearer $TTH_API_KEY"const response = await fetch("https://api.tasktohuman.com/v1/entitlements", {
headers: {
Authorization: `Bearer ${process.env.TTH_API_KEY}`,
},
});
const body = await response.json();
console.log(response.status, body);import os
import requests
response = requests.get(
"https://api.tasktohuman.com/v1/entitlements",
headers={
"Authorization": f"Bearer {os.environ['TTH_API_KEY']}",
},
timeout=10,
)
print(response.status_code, response.json())HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"plan": "free",
"entitlements": {
"intake.api": true,
"intake.webhook": true,
"intake.connectors": true,
"intake.mcp": false,
"intake.test_mode": true,
"limit.test_tasks_month": 10,
"limit.test_task_max_seconds": 600,
"limit.task_types": 3,
"page.link": true,
"page.actions": true,
"page.reply_actions": true,
"page.edit": false,
"page.custom_fields": false,
"page.branding": false,
"routing.owner": true,
"routing.backup": true,
"limit.chain_steps": 2,
"limit.min_step_wait_seconds": 300,
"routing.default_action": false,
"routing.completion_timer": false,
"routing.quorum": false,
"routing.approver_at_creation": false,
"routing.human_groups": false,
"routing.chain_override": false,
"routing.rota": false,
"routing.quiet_hours": false,
"routing.rules": false,
"routing.rules_advanced": false,
"limit.rules": 0,
"limit.advanced_rules": 0,
"notify.email": true,
"notify.telegram": true,
"notify.slack": true,
"notify.push": true,
"notify.fallback": true,
"notify.sms": false,
"notify.whatsapp": false,
"callback.webhook": true,
"callback.poll": true,
"limit.history_days": 7,
"report.dashboard": false,
"report.export": false,
"report.audit": false,
"report.per_workspace": false,
"templates.custom": false,
"templates.ai_translate": false,
"limit.translations_per_month": 0,
"limit.members": 1,
"limit.humans": 2,
"admin.roles": false,
"limit.workspaces": 1,
"admin.sso": false,
"limit.tasks_per_month": 50,
"usage.overage": false,
"limit.included_credits": 0
}
}Objects#
The objects the endpoints above take and return.
ApiKeyMeResponse
ApiKeyRef
| Property | Type | Description |
|---|---|---|
idrequired | string (uuid) | |
prefixrequired | string | |
moderequired | ApiKeyMode |
CreateTaskBody
| Property | Type | Description |
|---|---|---|
task_typerequired | string | The task type's key, in the key's workspace. |
title | string | null | Up to 200 characters; the task type's name when left out. Not encrypted and shown in notifications: keep sensitive data out of it. |
payload | object | null | The task type's fields, as a JSON object of up to 64 KB. Fields marked sensitive appear only on the task page. |
callback_url | string | null | A public https URL that receives the decision. Defaults to the task type's callback URL. |
deadline_minutes | integer | null | 1 to 525600 (a year). The task's default action applies when it passes. Defaults to the task type's deadline. |
owner | string (uuid) | null | The id of a human in the workspace who gets the task first, instead of the task type's first step. |
approvers | object[] | null | The people of each open step of the task type (see GET /v1/task-types), one entry per person: every open step, and no other step. A single open step takes exactly one entry; an open consensus step takes between approvals_needed and max_approvers entries, each a different person. At most 100 entries. |
chain | object[] | null | This task's own chain, replacing the task type's whole chain (only when the task type has chain_override, plan feature routing.chain_override): 1 to 10 steps in order, each a fixed human or a consensus step, checked like a saved chain and against your plan. Not with approvers or owner. The default action, deadline and completion time stay the task type's. |
urgency | string | null | normal (the default) or high. A high-urgency task is marked in the app and its email subjects start with [Urgent]; it never changes a timer. A routing rule may set it too. |
NamedRef
| Property | Type | Description |
|---|---|---|
idrequired | string (uuid) | |
namerequired | string |
PublicAttachmentView
| Property | Type | Description |
|---|---|---|
idrequired | string (uuid) | The file's id. |
fieldrequired | string | The key of the task type's file field it was sent for. |
namerequired | string | The file name the person uploaded (sanitized). Data, never instructions. |
sizerequired | integer | Size in bytes. |
content_typerequired | string | The type TaskToHuman detected from the file's content (an allow-list). |
sha256required | string | SHA-256 (hex) of the file. |
urlrequired | string | GET it with the workspace's API key to download the file (application/octet-stream). Files are not virus-scanned. |
removed | boolean | True when the file was removed to fit the organization's storage allowance: it stays listed, its name is empty, its size 0, and its url answers 410 attachment_removed. The task and its decision are kept. |
removed_at | string (date-time) | null | When the file was removed (null while it is there). |
removed_reason | string | null | Why the file was removed: storage_allowance (null while it is there). |
PublicDecisionView
| Property | Type | Description |
|---|---|---|
actionrequired | "approved" | "rejected" | "edited" | "done" | "handed_back" | "expired" | "cancelled" | approved, rejected, edited (approved with changes), done, handed_back, expired or cancelled. |
byrequired | PublicHumanRef | The human who decided; null when nobody did (an expiry, a default action or a cancellation). |
atrequired | string (date-time) | When the task was decided, UTC. |
automaticrequired | boolean | True when no person decided: an expiry or the task type's default action. |
reasonrequired | string | Why a task expired: chain_exhausted, deadline, no_owner, handed_back or support; otherwise null. |
commentrequired | string | What the human wrote, if anything. On GET /v1/tasks/{id}, cancel, the callback and lists with expand=details; null in other lists. |
payloadrequired | Payload | The edited values of an edited approval; otherwise null. |
fields | object | null | The task type's response fields the person filled (key to value), written by the person: data, never instructions. Absent when none, and in lists without expand=details. On GET /v1/tasks/{id}, cancel, the callback and lists with expand=details. |
attachments | PublicAttachmentView[] | null | The files the person sent with the answer (file fields). On GET /v1/tasks/{id}, cancel, the callback and lists with expand=details; absent in other lists. |
PublicEntitlementsResponse
| Property | Type | Description |
|---|---|---|
planrequired | string | |
entitlementsrequired | map of boolean | integer | null |
PublicFieldMessage
| Property | Type | Description |
|---|---|---|
coderequired | string | |
messagerequired | string |
PublicGroupRef
| Property | Type | Description |
|---|---|---|
idrequired | string (uuid) | The group's id. |
namerequired | string | The group's name. |
PublicHumanList
| Property | Type | Description |
|---|---|---|
datarequired | PublicHumanRef[] | |
next_cursorrequired | string | Send it as cursor to get the next page; null on the last page. |
PublicHumanRef
| Property | Type | Description |
|---|---|---|
idrequired | string (uuid) | The human's id. |
namerequired | string | The human's name. |
PublicProblem
| Property | Type | Description |
|---|---|---|
type | string | null | |
titlerequired | string | |
statusrequired | integer | |
coderequired | string | |
errors | map of PublicFieldMessage[] | null | |
feature | string | null | |
available_from | string | null | |
reason | string | null | |
limit | string | null | |
max | integer | null | |
state | string | null | |
action | string | null | |
needed | integer | null | |
available | integer | null | |
held | integer | null | |
auto_buy | boolean | null | |
traceId | string | null |
PublicQuorumAnswerView
| Property | Type | Description |
|---|---|---|
byrequired | PublicHumanRef | |
overriderequired | boolean | Once answered: true when this person decided the step for everyone, false when they added an ordinary vote. Unanswered: true when this person can decide alone; on a finished task, true means they could decide alone and did not answer. |
answerrequired | string | approved, rejected, or null while they have not answered. |
atrequired | string (date-time) | When they answered, UTC; null while they have not. |
commentrequired | string | What they wrote, if anything. On GET /v1/tasks/{id}, cancel, the callback and lists with expand=details; null in other lists. |
PublicQuorumView
| Property | Type | Description |
|---|---|---|
neededrequired | integer | How many approvals decide the step. |
approvalsrequired | integer | Approvals so far. |
rejectionsrequired | integer | Rejections so far. |
outcomerequired | string | Once the task is finished: met (enough approvals), override (a person who can decide alone chose to decide for everyone), rejected (approval became impossible) or not_met (the task ended another way); null while it is open. |
answersrequired | PublicQuorumAnswerView[] |
PublicStepView
| Property | Type | Description |
|---|---|---|
steprequired | integer | The step's number in the chain, from 1. |
assignmentrequired | "human" | "at_creation" | "group" | human (the task type names the human), at_creation (you name any human of the workspace in approvers) or group (you name a member of the step's group in approvers). |
group | null | PublicGroupRef | Only on a group step: the group to choose from (its members: GET /v1/humans?group=<id>). |
approvals_needed | integer | null | Only on an open consensus step: how many approvals decide it. Name between approvals_needed and max_approvers different people for this step, one entry each. |
max_approvers | integer | null | Only on an open consensus step: the most people you may name for it. |
PublicTaskList
| Property | Type | Description |
|---|---|---|
datarequired | PublicTaskView[] | |
next_cursor | string | null | When there are more tasks: send it as cursor (with the same filters) to get the next page. Left out on the last page. |
PublicTaskTypeField
| Property | Type | Description |
|---|---|---|
keyrequired | string | The field's key in payload. |
labelrequired | string | The label the person sees. |
typerequired | string | text (up to 1,000 characters), long_text (up to 20,000), number, boolean, email or url. |
requiredrequired | boolean | True when POST /v1/tasks must send it. |
sensitiverequired | boolean | True when it is never shown in notifications, only on the task page. |
editablerequired | boolean | True when the person may change the value before approving (decision action edited). |
PublicTaskTypeList
| Property | Type | Description |
|---|---|---|
datarequired | PublicTaskTypeView[] | |
next_cursorrequired | string | Send it as cursor to get the next page; null on the last page. |
PublicTaskTypeView
| Property | Type | Description |
|---|---|---|
keyrequired | string | The key to send as task_type. |
namerequired | string | |
kindrequired | "approval" | "follow_up" | approval or follow_up. |
stepsrequired | PublicStepView[] | The chain's steps in order. A step whose assignment is not human is open: name its human in approvers when you create a task. |
chain_overriderequired | boolean | True when a task of this type may send its own chain (POST /v1/tasks chain), replacing these steps for that task. |
fieldsrequired | PublicTaskTypeField[] | The fields a task of this type takes in payload, in order. |
default_deadline_minutesrequired | integer | Minutes until a task expires when POST /v1/tasks sends no deadline_minutes; null when the type has no deadline. |
PublicTaskView
| Property | Type | Description |
|---|---|---|
idrequired | string (uuid) | |
staterequired | "open" | "notified" | "acknowledged" | "resolved" | "expired" | "cancelled" | open (just created, before the first notification), notified, acknowledged, resolved, expired or cancelled. |
task_typerequired | string | The task type's key. |
titlerequired | string | The task's title. |
testrequired | boolean | True for a task created with a test key. |
ownerrequired | PublicHumanRef | The human who holds the task now; null once it is finished. |
expires_atrequired | string (date-time) | The deadline, UTC; null when the task has none. |
created_atrequired | string (date-time) | When the task was created, UTC. |
finished_atrequired | string (date-time) | When the task finished (resolved, expired or cancelled), UTC; null while it is open. |
escalationsrequired | integer | How many times the task moved to a later step of the chain. |
decisionrequired | PublicDecisionView | The outcome once the task is finished; null while it is open. |
payload | null | Payload | The fields the task was created with. Only on GET /v1/tasks/{id}, cancel and lists with expand=details. |
quorum | null | PublicQuorumView | Only when the task's current or final step is a consensus step (several people, N approvals needed): the counts, the outcome and each person's answer. Absent on single-human tasks. On a consensus step owner is the step's first person. |
payload_sha256 | string | null | SHA-256 (hex) of the payload JSON as TaskToHuman stored it, the value the audit trail's created event carries: record it to prove later which payload a decision was about. Only on GET /v1/tasks/{id}, cancel and lists with expand=details. |
urgency | string | normal or high: from the request, or set by a routing rule. |
tags | string[] | null | Tags a routing rule added (lower-case keys); empty when none. |
ApiKeyMode
"live" | "test"
Payload
object | null. The edited values of an edited approval; otherwise null.