Skip to content
Join our SlackContact usGet started

List Subjects

client.Subjects.List(ctx, query) (*SubjectListResponse, error)
get/subjects

List Subjects

ParametersExpand Collapse
query SubjectListParams
Limit param.Field[int64]optional
maximum100
minimum1
Offset param.Field[int64]optional
minimum0
ReturnsExpand Collapse
type SubjectListResponse struct{…}
HasMore bool
Subjects []SubjectResource
ID string

The ID of the subject.

CreatedAt Time

The date and time the subject was created.

formatdate-time
Email string

The email of the subject.

formatemail
ExternalID string

The ID of the subject in your system. You may pass it to the API in place of the subject ID.

Metadata map[string, string]

Additional metadata about the subject. You may use this to store any custom data about the subject.

Name string

The name of the subject. Used for display in the dashboard.

List Subjects
package main

import (
  "context"
  "fmt"

  "github.com/stainless-sdks/-go"
  "github.com/stainless-sdks/-go/option"
)

func main() {
  client := lark.NewClient(
    option.WithAPIKey("My API Key"),
  )
  subjects, err := client.Subjects.List(context.TODO(), lark.SubjectListParams{

  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", subjects.HasMore)
}
{
  "has_more": true,
  "subjects": [
    {
      "id": "subj_VyX6Q96h5avMho8O7QWlKeXE",
      "created_at": "2025-11-01T00:00:00Z",
      "email": "john.doe@example.com",
      "external_id": "user_1234567890",
      "metadata": {},
      "name": "John Doe"
    }
  ]
}
Returns Examples
{
  "has_more": true,
  "subjects": [
    {
      "id": "subj_VyX6Q96h5avMho8O7QWlKeXE",
      "created_at": "2025-11-01T00:00:00Z",
      "email": "john.doe@example.com",
      "external_id": "user_1234567890",
      "metadata": {},
      "name": "John Doe"
    }
  ]
}