> ## Documentation Index
> Fetch the complete documentation index at: https://docs2.travtus.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Task webhook events

> Events triggered when create or update a task

The task webhook allows you to subscribe to task events, the creation, update and deletion of tasks.

## Overview

A webhook event payload includes two top-level fields:

* `event_type`: identifies the type of event (e.g., `task.create`, `task.update`, `task.delete`).
* `message_id`: a unique identifier for the webhook delivery.
* `body`: an object containing the task data.

***

## Event Metadata

| Field           | Type            | Description                                                                          | Example                                  |
| --------------- | --------------- | ------------------------------------------------------------------------------------ | ---------------------------------------- |
| **event\_type** | `string`        | Type of webhook event. Possible values: `task.create`, `task.update`, `task.delete`. | `"task.update"`                          |
| **message\_id** | `string (UUID)` | Unique identifier for this webhook message. Used for idempotency and deduplication.  | `"51d155b3-496f-434e-b664-406836be35a0"` |

***

## Task Body Fields

| Field                        | Type                    | Description                                                                                                                                                                                                               | Example                                         |
| ---------------------------- | ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------- |
| **identifier**               | `string (UUID)`         | Travtus internal identifier of the task. Used for update or retrieval.                                                                                                                                                    | `"26d2f5f9-b128-48cd-add8-303e067df958"`        |
| **external\_ref**            | `string`                | Client’s external reference for the task.                                                                                                                                                                                 | `"1234567890"`                                  |
| **action\_type**             | `string`                | Free text field describing the type of action requested (e.g., “Assistance”).                                                                                                                                             | `"Assistance"`                                  |
| **title**                    | `string`                | Title or short name of the task.                                                                                                                                                                                          | `"a title"`                                     |
| **summary**                  | `string`                | Summary of the task’s scope.<br /><br />N.B. this field does not have a character limit.                                                                                                                                  | `"a summary"`                                   |
| **description**              | `string`                | Detailed explanation of the task.                                                                                                                                                                                         | `"a description"`                               |
| **category**                 | `string`                | The category of the task. Independent from `topic`.                                                                                                                                                                       | `"Customer Support"`                            |
| **topic**                    | `string`                | The topic of the conversation or request that created the task.                                                                                                                                                           | `"maintenance"`                                 |
| **user\_goal**               | `string`                | The specific intent or objective expressed by the user.                                                                                                                                                                   | `"fix_shower"`                                  |
| **importance**               | `enum`                  | Importance level of the task. One of: `low`, `normal`, `high`, `very_high`.                                                                                                                                               | `"very_high"`                                   |
| **priority\_score**          | `integer (0–1000)`      | Numeric priority value for sorting or SLA weighting.                                                                                                                                                                      | `500`                                           |
| **status**                   | `enum`                  | Current task state. One of: `created`, `in_progress`, `completed`, `deleted`.                                                                                                                                             | `"created"`                                     |
| **queue\_name**              | `enum or null`          | Department or work queue responsible for the task. One of: `Accounts`, `Collections`, `Facilities`, `Leasing`, `Legal`, `Off-Boarding`, `Onboarding`, `Public Safety`, `Renewals`, `Retention`, `Services`, `Technology`. | `null`                                          |
| **onsite\_indicator**        | `enum`                  | Indicates whether onsite expertise is required. One of: `onsite`, `offsite`.                                                                                                                                              | `"onsite"`                                      |
| **attachments**              | `object`                | URLs of attachments related to the task, keyed by file label.                                                                                                                                                             | `{"file_A": "https://u.dev.hiadam.co/pi5fwe3"}` |
| **notes**                    | `string or null`        | Additional free-text notes.                                                                                                                                                                                               | `null`                                          |
| **escalation\_flag**         | `boolean`               | True if the task is an escalation due to severity or delay.                                                                                                                                                               | `false`                                         |
| **due\_datetime**            | `datetime`              | When the task is due.                                                                                                                                                                                                     | `"2023-12-19T12:00:00+00:00"`                   |
| **reminder\_datetime**       | `datetime or null`      | When a reminder should be triggered.                                                                                                                                                                                      | `null`                                          |
| **completed\_datetime**      | `datetime or null`      | When the task was completed.                                                                                                                                                                                              | `null`                                          |
| **datetime\_created**        | `datetime`              | When the task record was created. System-generated.                                                                                                                                                                       | `"2023-12-20T17:32:49.143000+00:00"`            |
| **datetime\_updated**        | `datetime`              | When the task record was last modified. System-generated.                                                                                                                                                                 | `"2024-01-15T15:07:27.440000+00:00"`            |
| **relevant\_conversation**   | `string or null`        | Transcript of the conversation that led to task creation.                                                                                                                                                                 | `null`                                          |
| **portfolio\_id**            | `string (UUID)`         | Travtus internal ID for the community/portfolio.                                                                                                                                                                          | `"b0234194-e61b-4a57-967f-6eaaee4d5219"`        |
| **portfolio\_external\_ref** | `string`                | Client’s external reference for the community/portfolio.                                                                                                                                                                  | `"P1234"`                                       |
| **unit\_identifier**         | `string (UUID)`         | Travtus internal identifier for the housing unit.                                                                                                                                                                         | `"4efdccb7-10ca-47b0-811c-de2fae9f6682"`        |
| **unit\_number**             | `string`                | Client-visible unit number.                                                                                                                                                                                               | `"2016"`                                        |
| **lease\_external\_ref**     | `string`                | Client’s external reference for the lease.                                                                                                                                                                                | `"A1234"`                                       |
| **resident\_address**        | `string`                | Address of the resident’s housing unit.                                                                                                                                                                                   | `"10 Executive Park West NE"`                   |
| **resident\_id**             | `string (UUID) or null` | Travtus internal identifier for the resident.                                                                                                                                                                             | `null`                                          |
| **assignee\_id**             | `string (UUID) or null` | Travtus internal identifier of the person assigned to the task.                                                                                                                                                           | `null`                                          |

***

## Creator Object

The `creator` field contains information about the individual or system that created the task.

| Field                    | Type            | Description                                | Example                                  |
| ------------------------ | --------------- | ------------------------------------------ | ---------------------------------------- |
| **email**                | `string`        | Creator’s email address.                   | `"support@travtus.com"`                  |
| **first\_name**          | `string`        | Creator’s first name.                      | `"Bob"`                                  |
| **last\_name**           | `string`        | Creator’s last name.                       | `"James"`                                |
| **phone\_number**        | `string`        | Creator’s phone number in E.164 format.    | `"+447549111111"`                        |
| **unit\_external\_ref**  | `string`        | Client’s external reference for the unit.  | `"P~4770692~467~2016"`                   |
| **lease\_external\_ref** | `string`        | Client’s external reference for the lease. | `"A1234"`                                |
| **resident\_address**    | `string`        | Address of the resident’s housing unit.    | `"10 Executive Park West NE"`            |
| **unit\_identifier**     | `string (UUID)` | Travtus internal identifier of the unit.   | `"4efdccb7-10ca-47b0-811c-de2fae9f6682"` |
| **unit\_number**         | `string`        | The visible or client-facing unit number.  | `"2016"`                                 |

***

## Relationships and Behavior

* `identifier` or `external_ref` can be used to reference or update a task.
* `topic` and `user_goal` are related conceptually, where `user_goal` expresses the intent arising from a `topic`.
* `category`, `topic`, and `queue_name` are independent classification fields.
* `importance`, `priority_score`, and `onsite_indicator` influence task routing and SLA handling.
* `portfolio_id` / `portfolio_external_ref` and `unit_identifier` provide context about where the task applies.
* `creator` fields document the originator of the task.

***

<RequestExample>
  ```bash Example Request theme={null}
  {
    "body": {
      "action_type": "Assistance",
      "assignee_id": null,
      "attachments": {
        "file_A": "https://u.dev.hiadam.co/pi5fwe3"
      },
      "completed_datetime": null,
      "creator": {
        "email": "support@travtus.com",
        "unit_external_ref": "P~4770692~467~2016",
        "lease_external_ref": "A1234",
        "first_name": "Bob",
        "last_name": "James",
        "phone_number": "+447549111111",
        "resident_address": "10 Executive Park West NE",
        "unit_identifier": "4efdccb7-10ca-47b0-811c-de2fae9f6682",
        "unit_number": "2016"
      },
      "datetime_created": "2023-12-20T17:32:49.143000+00:00",
      "datetime_updated": "2024-01-15T15:07:27.440000+00:00",
      "description": "a description",
      "due_datetime": "2023-12-19T12:00:00+00:00",
      "external_ref": "1234567890",
      "identifier": "26d2f5f9-b128-48cd-add8-303e067df958",
      "importance": "very_high",
      "notes": null,
      "portfolio_external_ref": "P1234",
      "portfolio_id": "b0234194-e61b-4a57-967f-6eaaee4d5219",
      "priority_score": 500,
      "queue_name": null,
      "relevant_conversation": null,
      "reminder_datetime": null,
      "resident_id": null,
      "status": "created",
      "category": "Customer Support",
      "summary": "a summary",
      "title": "a title",
      "onsite_indicator": "onsite",
      "topic": "maintenance",
      "user_goal": "fix_shower",
      "escalation_flag": false
    },
    "event_type": "task.update",
    "message_id": "51d155b3-496f-434e-b664-406836be35a0"
  }
  ```
</RequestExample>
