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

# Tasks

> Manage and track account-related action items and follow-ups

Tasks help teams manage and track action items, follow-ups, and deliverables related to customer accounts in the Thena platform.

## Understanding tasks

<CardGroup cols={1}>
  <Card title="Core purpose" icon="list-check">
    Tasks provide a structured way to manage work items, ensuring that all account-related activities are properly tracked, assigned, and completed. They help maintain accountability and drive customer success initiatives forward.
  </Card>
</CardGroup>

## Task categories

<CardGroup cols={2}>
  <Card title="Customer tasks" icon="users">
    • Follow-up calls <br />
    • Account reviews <br />
    • Training sessions <br />
    • Issue resolution <br />
  </Card>

  <Card title="Internal tasks" icon="building">
    • Team updates <br />
    • Resource allocation <br />
    • Process reviews <br />
    • Documentation updates <br />
  </Card>
</CardGroup>

## Standard fields

### Required fields

| Name        | Type   | Options  | Comments                      |
| :---------- | :----- | :------- | :---------------------------- |
| Account ID  | string | Required | Associated account identifier |
| Title       | string | Required | Task title                    |
| Assignee ID | string | Required | ID of assigned user           |

### Optional fields

| Name            | Type   | Options                                                                    | Comments                   |
| :-------------- | :----- | :------------------------------------------------------------------------- | :------------------------- |
| Activity ID     | string | Optional                                                                   | Related activity reference |
| Description     | string | Optional                                                                   | Detailed task description  |
| Type            | string | Optional, Values: \[FOLLOW\_UP (default), REVIEW, APPROVAL, CUSTOM]        | Task type reference        |
| Status          | string | Optional, Values: \[PENDING (default), IN\_PROGRESS, COMPLETED, CANCELLED] | Task status reference      |
| Priority        | string | Optional, Values: \[LOW (default), MEDIUM, HIGH]                           | Task priority reference    |
| Attachment URLs | array  | Optional                                                                   | List of attachment URLs    |

### System-managed fields

| Name       | Type      | Options        | Comments                            |
| :--------- | :-------- | :------------- | :---------------------------------- |
| Task ID    | bigserial | Auto-generated | Primary key                         |
| UID        | text      | Auto-generated | Unique identifier (ULID)            |
| Is Active  | boolean   | Default: true  | Task's active status                |
| Created By | bigint    | Auto-populated | References user table               |
| Created At | timestamp | Auto-populated | Creation timestamp with timezone    |
| Updated At | timestamp | Auto-populated | Last update timestamp with timezone |
| Deleted At | timestamp | Optional       | Soft delete timestamp with timezone |

<Note>
  Database types:

  * Account ID, Activity ID, Assignee ID, Type, Status, Priority are stored as `bigint` in the database
  * Title and Description are stored as `text`
  * System fields use their respective database types (`bigserial`, `text`, `boolean`, `timestamp with time zone`)
</Note>

## Task workflow

<Steps>
  <Step title="Creation">
    * Define clear objective
    * Set priority level
    * Assign ownership
    * Establish timeline
  </Step>

  <Step title="Execution">
    * Track progress
    * Update status
    * Document blockers
    * Manage dependencies
  </Step>

  <Step title="Completion">
    * Verify deliverables
    * Document outcomes
    * Create follow-ups
    * Update stakeholders
  </Step>
</Steps>

## Best practices

<CardGroup cols={2}>
  <Card title="Task management" icon="list-check">
    • Set clear deadlines <br />
    • Define ownership <br />
    • Track dependencies <br />
    • Monitor progress <br />
  </Card>

  <Card title="Collaboration" icon="people-group">
    • Communicate updates <br />
    • Share context <br />
    • Escalate blockers <br />
    • Document decisions <br />
  </Card>
</CardGroup>

## API endpoints

### Sample task

```json theme={null}
{
  "accountId": "ACC_01HFGZ2E9KZXP8W4YT0Q6XR1M9",
  "title": "Schedule technical deep dive for API integration",
  "assigneeId": "USR_01HFGZ4N8X7C9P2M3K5R1V6B8D",
  "activityId": "ACT_01HFGZ6B7V4M2N8P5X3J9K1L7H",
  "description": "Organize technical deep dive session with Acme Corp's engineering team to discuss:\n- OAuth2 implementation details\n- Rate limiting strategies\n- Webhook configuration\n- Error handling and retry mechanisms",
  "type": "FOLLOW_UP",
  "status": "PENDING",
  "priority": "HIGH",
  "attachmentUrls": [
    "https://storage.thena.ai/documents/api-requirements-draft.pdf",
    "https://storage.thena.ai/documents/integration-architecture.pdf"
  ]
}
```

<Note>
  When creating a task, the system will add additional fields in the response such as:

  * `id`: Unique identifier for the task
  * `account`: Name of the associated account
  * `creator`: Name of the task creator
  * `creatorId`: ID of the creator
  * `creatorEmail`: Email of the creator
  * `isActive`: Whether the task is active
  * `createdAt`: Creation timestamp
  * `updatedAt`: Last update timestamp
</Note>

### Available operations

<Accordion title="Task management" icon="list-check">
  ```bash theme={null}
  # List account tasks
  GET /v1/accounts/{accountId}/tasks

  # Create account task
  POST /v1/accounts/{accountId}/tasks
  Content-Type: application/json

  # Get task by ID
  GET /v1/accounts/{accountId}/tasks/{taskId}

  # Update task
  PATCH /v1/accounts/{accountId}/tasks/{taskId}
  Content-Type: application/json

  # Delete task
  DELETE /v1/accounts/{accountId}/tasks/{taskId}
  ```

  <Note>
    All endpoints require authentication with Bearer token, API key, and Organization ID in the headers.
  </Note>

  For detailed API specifications, see <a href="/api-reference/platform/accounts/tasks" target="_blank">Task Management</a>
</Accordion>

## Related resources

<CardGroup cols={2}>
  <Card title="Accounts overview" icon="building-user" href="/platform/core-concepts/accounts/overview">
    Learn about account management
  </Card>

  <Card title="Activities" icon="calendar-days" href="/platform/core-concepts/accounts/activities">
    Track customer interactions
  </Card>
</CardGroup>
