Skip to content

Variable: MastraThreadsResponseSchema

const MastraThreadsResponseSchema: ZodObject<{ hasMore: ZodBoolean; page: ZodNumber; perPage: ZodNumber; threads: ZodArray<ZodObject<{ createdAt: ZodString; id: ZodString; metadata: ZodOptional<ZodUnknown>; resourceId: ZodString; title: ZodOptional<ZodString>; updatedAt: ZodString; }, $strip>>; total: ZodNumber; }, $strip>

JSON payload returned by GET ${basePath}/threads. One page of the caller’s conversation threads, newest (updatedAt DESC) first.

Fields:

  • threads: page of threads for the caller’s resource.
  • page: zero-indexed page that produced this response.
  • perPage: number of items requested per page.
  • total: total number of threads the resource owns.
  • hasMore: true when at least one more page is available.