Skip to content

Tasks

Get a task

Get one authorized task by its workspace reference or internal task ID, including its contact (the vendor or office to call, with phone and email).

Method

GET

Path

/v1/tasks/{taskId}

Required scope

tasks:read

Request

curl -X GET "https://api.endurancehq.app/v1/tasks/{taskId}" \
  -H "Authorization: Bearer $EHQ_API_KEY"

Path parameters

taskIdstring, required

Response

Success status: 200

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "reference": {
          "type": "string",
          "pattern": "^[A-Z][A-Z0-9]{0,7}-[1-9]\\d*$"
        },
        "organizationId": {
          "type": [
            "string",
            "null"
          ]
        },
        "eventId": {
          "type": [
            "string",
            "null"
          ]
        },
        "eventTitle": {
          "type": [
            "string",
            "null"
          ]
        },
        "projectId": {
          "type": [
            "string",
            "null"
          ]
        },
        "projectName": {
          "type": [
            "string",
            "null"
          ]
        },
        "title": {
          "type": "string"
        },
        "description": {
          "type": [
            "string",
            "null"
          ]
        },
        "status": {
          "type": "string",
          "enum": [
            "not_started",
            "in_progress",
            "blocked",
            "completed"
          ],
          "description": "not_started, in_progress, blocked (open work stuck until something outside it changes; still open) or completed. Cancelled tasks read as completed."
        },
        "priority": {
          "type": "string",
          "enum": [
            "low",
            "medium",
            "high"
          ]
        },
        "category": {
          "type": "string"
        },
        "phase": {
          "type": "string",
          "enum": [
            "planning",
            "setup",
            "live",
            "teardown",
            "closeout"
          ]
        },
        "parkedAt": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
            },
            {
              "type": "null"
            }
          ]
        },
        "waitingExternalAt": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
            },
            {
              "type": "null"
            }
          ]
        },
        "dueDate": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
            },
            {
              "type": "null"
            }
          ]
        },
        "tags": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "assigneeId": {
          "type": [
            "string",
            "null"
          ]
        },
        "assigneeName": {
          "type": [
            "string",
            "null"
          ]
        },
        "assignees": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "name": {
                "type": "string"
              },
              "team": {
                "description": "The team this person is on the task as part of, or null for someone assigned alone.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "doneAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "When this team member's own part was done, or null while it is open."
              },
              "allHands": {
                "type": "boolean",
                "description": "True on the one assignee of an All hands task (name \"All hands\"): the task is given to everyone on its event's team."
              }
            },
            "required": [
              "id",
              "name",
              "team",
              "doneAt",
              "allHands"
            ],
            "additionalProperties": false
          },
          "description": "Everyone on the task. assigneeId/assigneeName repeat the first."
        },
        "teams": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "done": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "total": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "name",
              "done",
              "total"
            ],
            "additionalProperties": false
          },
          "description": "Teams that split the task, with each one's parts done; the task completes when every part is done."
        },
        "contact": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "name": {
                  "description": "The person to reach.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "organization": {
                  "description": "The vendor or organization, for example Sunbelt Rentals.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "phone": {
                  "description": "E.164 (+19165550142) when saved through the API or dashboard; older tasks may keep the text they were given.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "email": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "name",
                "organization",
                "phone",
                "email"
              ],
              "additionalProperties": false
            },
            {
              "type": "null"
            }
          ],
          "description": "Who to call about the task (a vendor or office), or null when it has none."
        },
        "activity": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "text": {
                "type": "string"
              },
              "type": {
                "type": "string"
              },
              "createdAt": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              "editedAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "authorName": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "text",
              "type",
              "createdAt",
              "editedAt",
              "authorName"
            ],
            "additionalProperties": false
          }
        },
        "attachments": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "url": {
                "type": "string",
                "format": "uri"
              },
              "size": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "type": {
                "type": "string"
              },
              "uploadedAt": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              "uploadedByName": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "name",
              "url",
              "size",
              "type",
              "uploadedAt",
              "uploadedByName"
            ],
            "additionalProperties": false
          }
        },
        "createdById": {
          "description": "The account that added the task; null when an automation added it (the inbox, an import).",
          "type": [
            "string",
            "null"
          ]
        },
        "createdByName": {
          "description": "Who added the task, as the dashboard shows it: a person's name, or what added it (\"the inbox\"); null when no name is known.",
          "type": [
            "string",
            "null"
          ]
        },
        "createdAt": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        }
      },
      "required": [
        "id",
        "reference",
        "organizationId",
        "eventId",
        "eventTitle",
        "projectId",
        "projectName",
        "title",
        "description",
        "status",
        "priority",
        "category",
        "phase",
        "parkedAt",
        "waitingExternalAt",
        "dueDate",
        "tags",
        "assigneeId",
        "assigneeName",
        "assignees",
        "teams",
        "contact",
        "activity",
        "attachments",
        "createdById",
        "createdByName",
        "createdAt",
        "updatedAt"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "data"
  ],
  "additionalProperties": false
}

Other surfaces

CLI: ehq tasks get <task_id_or_reference>

MCP tool: ehq_tasks_get