Skip to main content
GET
https://api.myweave.ai
/
functions
/
v1
/
users
/
:userId
/
threads
curl -X GET https://api.myweave.ai/functions/v1/users/user_abc123/threads \
  -H "X-API-Key: your-api-key-here"
{
  "data": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "title": "Leadership Development Session",
      "created_at": "2024-01-15T10:30:00Z",
      "updated_at": "2024-01-16T14:20:00Z",
      "coach_id": "coach_xyz789",
      "user_id": "user_abc123",
      "coach_profiles": {
        "name": "Dr. Sarah Johnson",
        "title": "Executive Leadership Coach"
      }
    },
    {
      "id": "660e8400-e29b-41d4-a716-446655440001",
      "title": "Career Planning Discussion",
      "created_at": "2024-01-10T09:15:00Z",
      "updated_at": "2024-01-12T16:45:00Z",
      "coach_id": "coach_abc456",
      "user_id": "user_abc123",
      "coach_profiles": {
        "name": "Michael Chen",
        "title": "Career Development Coach"
      }
    }
  ],
  "count": 2
}

Overview

Get all conversation threads for a user. Returns thread metadata including coach information, ordered by most recently updated.

Path Parameters

userId
string
required
User identifier

Query Parameters

coachId
string
Optional filter to get threads with a specific coach only

Response

data
array
Array of thread objects
count
number
Total number of threads returned
curl -X GET https://api.myweave.ai/functions/v1/users/user_abc123/threads \
  -H "X-API-Key: your-api-key-here"
{
  "data": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "title": "Leadership Development Session",
      "created_at": "2024-01-15T10:30:00Z",
      "updated_at": "2024-01-16T14:20:00Z",
      "coach_id": "coach_xyz789",
      "user_id": "user_abc123",
      "coach_profiles": {
        "name": "Dr. Sarah Johnson",
        "title": "Executive Leadership Coach"
      }
    },
    {
      "id": "660e8400-e29b-41d4-a716-446655440001",
      "title": "Career Planning Discussion",
      "created_at": "2024-01-10T09:15:00Z",
      "updated_at": "2024-01-12T16:45:00Z",
      "coach_id": "coach_abc456",
      "user_id": "user_abc123",
      "coach_profiles": {
        "name": "Michael Chen",
        "title": "Career Development Coach"
      }
    }
  ],
  "count": 2
}

Use Cases

  • User Dashboard: Display all conversations for a user
  • Coach Filter: Show threads with a specific coach
  • Conversation History: List all past consultations
  • Thread Management: Get thread IDs for continuing conversations

Response Details

  • Threads are ordered by updated_at in descending order (most recent first)
  • Includes coach profile information via join
  • Returns empty array if no threads found
  • Coach filter is optional - omit to get all threads