@archastro/sdk
    Preparing search index...

    Class TeamThreadResource

    Index

    Constructors

    Methods

    Constructors

    Methods

    • Create a thread for a team Creates a new thread owned by the specified team. The authenticated caller must have access to the team; requests from callers without team access are rejected with 404. If a profile_picture is provided in the thread params, it must be base64-encoded image data. The image is uploaded and associated with the thread before creation completes. Omit profile_picture to skip this step. By default the platform sends an automatic welcome message into the new thread. Pass skip_welcome_message: true to suppress this behavior, for example when creating threads programmatically in bulk or seeding test data.

      Parameters

      • team: string

        Team ID (tem_...) whose threads should be listed.

      • input: {
            skip_welcome_message?: boolean;
            thread: {
                create_legacy_agent?: boolean;
                description?: string;
                is_unlisted?: boolean;
                key?: string;
                metadata?: Record<string, unknown>;
                muted?: boolean;
                org_id?: string;
                profile_picture?: { data?: string; filename?: string; mime_type?: string };
                settings?: { agent_enabled?: boolean };
                title?: string;
            };
        }

        Request body.

        • Optionalskip_welcome_message?: boolean

          When true, suppresses the automatic welcome message that is otherwise sent into the thread on creation. Defaults to false.

        • thread: {
              create_legacy_agent?: boolean;
              description?: string;
              is_unlisted?: boolean;
              key?: string;
              metadata?: Record<string, unknown>;
              muted?: boolean;
              org_id?: string;
              profile_picture?: { data?: string; filename?: string; mime_type?: string };
              settings?: { agent_enabled?: boolean };
              title?: string;
          }

          Attributes for the new thread. See ThreadCreateParams for available fields.

      Returns Promise<Thread>

      The newly created thread.

    • List threads for a team Returns all threads owned by the specified team that the authenticated caller has permission to view. The caller must have access to the team; requests without team access are rejected with 404. Threads are returned in a single data array. Use the team-scoped thread endpoints to create, update, or delete individual threads.

      Parameters

      • team: string

        Team ID (tem_...) whose threads should be listed.

      Returns Promise<
          {
              data: {
                  agent_user?: string;
                  created_at?: string;
                  creator?: {
                      alias?: string;
                      app?: string;
                      app_name?: string;
                      email?: string;
                      id: string;
                      is_system_user?: boolean;
                      metadata?: Record<string, unknown>;
                      name?: string;
                      org?: string;
                      org_name?: string;
                      org_role?: string;
                      sandbox?: string;
                      sandbox_name?: string;
                  };
                  description?: string;
                  id: string;
                  is_channel?: boolean;
                  is_default?: boolean;
                  is_transient?: boolean;
                  is_unlisted?: boolean;
                  key?: string;
                  last_activity?: string;
                  metadata?: Record<string, unknown>;
                  muted?: boolean;
                  org?: string;
                  parent_message?: {
                      actors?: {
                          alias?: string;
                          id?: string;
                          name?: string;
                          profile_picture?: {
                              file?: ...;
                              height?: ...;
                              media?: ...;
                              mime_type?: ...;
                              refresh_url?: ...;
                              url?: ...;
                              width?: ...;
                          };
                      }[];
                      agent?: string;
                      agent_mode?: "cli"
                      | "embedded";
                      attachments?: {
                          content_type?: string;
                          description?: string;
                          filename?: string;
                          height?: number;
                          id: string;
                          image_height?: number;
                          image_source?: {
                              file?: ...;
                              height?: ...;
                              media?: ...;
                              mime_type?: ...;
                              refresh_url?: ...;
                              url?: ...;
                              width?: ...;
                          };
                          image_url?: string;
                          image_width?: number;
                          media_type?: string;
                          name?: string;
                          object?: Record<(...), (...)>;
                          title?: string;
                          type: string;
                          url?: string;
                          variants?: (...)[];
                          version?: number;
                          width?: number;
                      }[];
                      branched_thread?: string;
                      content?: string;
                      created_at?: string;
                      has_replies?: boolean;
                      id: string;
                      idempotency_key?: string;
                      legacy_agent?: string;
                      metadata?: Record<string, unknown>;
                      org?: string;
                      reactions?: {
                          payload?: Record<(...), (...)>;
                          type: string;
                          user?: string;
                      }[];
                      rendering_mode?: string;
                      replies?: Record<string, unknown>[];
                      replies_after_cursor?: string;
                      replies_before_cursor?: string;
                      reply_count?: number;
                      reply_to?: Record<string, unknown>;
                      sandbox?: string;
                      team?: string;
                      thread?: string;
                      user?: string;
                  };
                  participant?: string[];
                  participants?: {
                      alias?: string;
                      app?: string;
                      app_name?: string;
                      email?: string;
                      id: string;
                      is_system_user?: boolean;
                      metadata?: Record<string, unknown>;
                      name?: string;
                      org?: string;
                      org_name?: string;
                      org_role?: string;
                      sandbox?: string;
                      sandbox_name?: string;
                  }[];
                  participating_actor?: string[];
                  participating_agents?: {
                      acl?: { add?: (...)[]; grants?: (...)[]; remove?: (...)[] };
                      app?: string;
                      created_at?: string;
                      default_model?: string;
                      email?: string;
                      id: string;
                      identity?: string;
                      last_applied_template_config?: string;
                      lookup_key?: string;
                      metadata?: Record<string, unknown>;
                      name?: string;
                      org?: string;
                      org_name?: string;
                      originator?: string;
                      phone_number?: string;
                      sandbox?: string;
                      source_solution?: {
                          solution: {
                              category_keys?: (...) | (...);
                              created_at?: (...) | (...);
                              description?: (...) | (...);
                              id: string;
                              kind: string;
                              latest_solution?: (...) | (...);
                              latest_version?: (...) | (...);
                              lookup_key?: (...) | (...);
                              metadata?: (...) | (...);
                              name?: (...) | (...);
                              org?: (...) | (...);
                              org_logo?: (...) | (...);
                              org_name?: (...) | (...);
                              org_slug?: (...) | (...);
                              owners: (...)[];
                              readme_url?: (...) | (...);
                              solution_id?: (...) | (...);
                              solution_version?: (...) | (...);
                              tag_keys?: (...) | (...);
                              template_kind?: (...) | (...);
                              templates: (...)[];
                              updated_at?: (...) | (...);
                              upgrade_available: boolean;
                              virtual_path?: (...) | (...);
                          };
                          template: {
                              created_at?: (...)
                              | (...);
                              description?: (...) | (...);
                              display_name?: (...) | (...);
                              id: string;
                              kind: string;
                              lookup_key?: (...) | (...);
                              name?: (...) | (...);
                              updated_at?: (...) | (...);
                              virtual_path?: (...) | (...);
                          };
                      };
                      team?: string;
                      template_upgrade_available?: boolean;
                      updated_at?: string;
                      user?: string;
                  }[];
                  role?: string;
                  sandbox?: string;
                  settings?: { agent_enabled?: boolean };
                  slug?: string;
                  sub_threads?: Record<string, unknown>[];
                  team?: string;
                  title?: string;
                  ttl?: number;
                  unread_count?: number;
                  updated_at?: string;
                  user?: string;
              }[];
          },
      >

      Successful response