Skip to content
V2 (Legacy) API ReferenceGet started

Get a chat by ID

client.Chats.Get(ctx, chatID) (*Chat, error)
GET/v3/chats/{chatId}

Retrieve a chat by its unique identifier.

ParametersExpand Collapse
chatID string
formatuuid
ReturnsExpand Collapse
type Chat struct{โ€ฆ}
ID string

Unique identifier for the chat

formatuuid
CreatedAt Time

When the chat was created

formatdate-time
DisplayName string

Display name for the chat. Defaults to a comma-separated list of recipient handles. Can be updated for group chats.

Handles []ChatHandle

List of chat participants with full handle details. Always contains at least two handles (your phone number and the other participant).

ID string

Unique identifier for this handle

formatuuid
Handle string

Phone number (E.164) or email address of the participant

JoinedAt Time

When this participant joined the chat

formatdate-time
Service ServiceType

Messaging service type

One of the following:
const ServiceTypeiMessage ServiceType = "iMessage"
const ServiceTypeSMS ServiceType = "SMS"
const ServiceTypeRCS ServiceType = "RCS"
IsMe boolOptional

Whether this handle belongs to the sender (your phone number)

LeftAt TimeOptional

When they left (if applicable)

formatdate-time
Status ChatHandleStatusOptional

Participant status

One of the following:
const ChatHandleStatusActive ChatHandleStatus = "active"
const ChatHandleStatusLeft ChatHandleStatus = "left"
const ChatHandleStatusRemoved ChatHandleStatus = "removed"
IsArchived bool

Whether the chat is archived

IsGroup bool

Whether this is a group chat

UpdatedAt Time

When the chat was last updated

formatdate-time
HealthScore ChatHealthScoreOptional

[BETA] Health assessment for a chat. Higher score is healthier. null when a score isnโ€™t available yet. Scoring may change during beta.

Reason string

Short summary of whatโ€™s affecting the score. Empty when the score is 100.

Score int64

Health score from 0 to 100. Higher is healthier.

minimum0
maximum100
UpdatedAt Time

When this health score was last computed.

formatdate-time
Service ServiceTypeOptional

Messaging service type

One of the following:
const ServiceTypeiMessage ServiceType = "iMessage"
const ServiceTypeSMS ServiceType = "SMS"
const ServiceTypeRCS ServiceType = "RCS"

Get a chat by ID

package main

import (
  "context"
  "fmt"

  "github.com/linq-team/linq-go"
  "github.com/linq-team/linq-go/option"
)

func main() {
  client := linqgo.NewClient(
    option.WithAPIKey("My API Key"),
  )
  chat, err := client.Chats.Get(context.TODO(), "550e8400-e29b-41d4-a716-446655440000")
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", chat.ID)
}
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "created_at": "2024-01-15T10:30:00Z",
  "display_name": "+14155551234, +14155559876",
  "handles": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440010",
      "handle": "+14155551234",
      "joined_at": "2025-05-21T15:30:00.000Z",
      "service": "iMessage",
      "is_me": true,
      "left_at": "2019-12-27T18:11:19.117Z",
      "status": "active"
    },
    {
      "id": "550e8400-e29b-41d4-a716-446655440011",
      "handle": "+14155559876",
      "joined_at": "2025-05-21T15:30:00.000Z",
      "service": "iMessage",
      "is_me": false,
      "left_at": "2019-12-27T18:11:19.117Z",
      "status": "active"
    }
  ],
  "is_archived": true,
  "is_group": true,
  "updated_at": "2024-01-15T10:30:00Z",
  "health_score": {
    "reason": "Not enough engagement",
    "score": 35,
    "updated_at": "2026-05-01T18:28:25Z"
  },
  "service": "iMessage"
}
{
  "error": {
    "status": 401,
    "code": 2004,
    "message": "Unauthorized - missing or invalid authentication token"
  },
  "success": false
}
{
  "error": {
    "status": 404,
    "code": 2001,
    "message": "Resource not found"
  },
  "success": false
}
{
  "error": {
    "status": 500,
    "code": 3006,
    "message": "Internal server error"
  },
  "success": false
}
Returns Examples
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "created_at": "2024-01-15T10:30:00Z",
  "display_name": "+14155551234, +14155559876",
  "handles": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440010",
      "handle": "+14155551234",
      "joined_at": "2025-05-21T15:30:00.000Z",
      "service": "iMessage",
      "is_me": true,
      "left_at": "2019-12-27T18:11:19.117Z",
      "status": "active"
    },
    {
      "id": "550e8400-e29b-41d4-a716-446655440011",
      "handle": "+14155559876",
      "joined_at": "2025-05-21T15:30:00.000Z",
      "service": "iMessage",
      "is_me": false,
      "left_at": "2019-12-27T18:11:19.117Z",
      "status": "active"
    }
  ],
  "is_archived": true,
  "is_group": true,
  "updated_at": "2024-01-15T10:30:00Z",
  "health_score": {
    "reason": "Not enough engagement",
    "score": 35,
    "updated_at": "2026-05-01T18:28:25Z"
  },
  "service": "iMessage"
}
{
  "error": {
    "status": 401,
    "code": 2004,
    "message": "Unauthorized - missing or invalid authentication token"
  },
  "success": false
}
{
  "error": {
    "status": 404,
    "code": 2001,
    "message": "Resource not found"
  },
  "success": false
}
{
  "error": {
    "status": 500,
    "code": 3006,
    "message": "Internal server error"
  },
  "success": false
}