---
title: "Ensure Thread For Healthie User"
method: PUT
path: "/longevity/healthie-users/{healthie_user_id}/thread"
tags: ["Clients"]
---

# Ensure Thread For Healthie User

`PUT /longevity/healthie-users/{healthie_user_id}/thread`

## Request

- Base URL: `https://api.puppeteerai.com`
- URL: `https://api.puppeteerai.com/longevity/healthie-users/{healthie_user_id}/thread`
- Auth: none declared. Required headers: `Authorization`

Idempotently ensure a Puppeteer thread exists for the given Healthie patient.

Fetches patient data from Healthie before thread resolution so new threads are
created with the voice phone number already set, and existing threads missing
a phone number are backfilled. Seeds json_data with email / full name /
first name / last name / dob / location, matching the webhook path's outcome
after SetJsonDataFromWebhook + HealthieFetchUserData have run.

Returns 201 when a new thread is created, 200 when an existing one is returned.

## Path parameters

- `healthie_user_id` string, required

## Headers

- `Authorization` string, required

## Request body

- EnsureThreadRequest
  - `project_id` string, required: The Puppeteer project id that owns the Longevity agent config.

## Response `200`

Successful Response

- EnsureThreadResponse
  - `thread_id` string, required: The Puppeteer thread id for this Healthie patient.
  - `created` boolean, required: True if the thread was created on this call; false if one already existed.

## Other responses

- `201`: Thread was created on this call.
- `422`: Validation Error

---

[API](https://skmtc.dev/getpuppeteer/apis/puppeteer-core-api.md) - [All operations](https://skmtc.dev/getpuppeteer/apis/puppeteer-core-api/llms.txt) - [OpenAPI document](https://skmtc.dev/getpuppeteer/apis/puppeteer-core-api/revisions/94b4e928b42f?raw)
