@archastro/sdk
    Preparing search index...
    Index

    Constructors

    Methods

    Constructors

    Methods

    • Add a member to a thread Adds a user or agent as a member of the specified thread. The authenticated user must have access to the thread. On success the new membership record is returned with HTTP 201. Supply either user or agent depending on the value of type. Attempting to add a principal that is already a member of the thread returns a 422 error.

      Parameters

      • thread: string

        Thread ID (thr_...) identifying the thread to remove the member from.

      • input: { agent?: string; membership_type?: string; type: string; user?: string }

        Request body.

        • Optionalagent?: string

          Agent ID of the principal to add. Required when type is "agent".

        • Optionalmembership_type?: string

          Role granted to the new member. One of "owner" or "member". Defaults to "member".

        • type: string

          Kind of principal being added. Must be "user" or "agent".

        • Optionaluser?: string

          User ID of the principal to add. Required when type is "user".

      Returns Promise<ThreadMember>

      The newly created thread membership record.

    • List members of a thread Returns all current members of the specified thread, including both user and agent members. The authenticated user must have visibility into the thread; requests from users without access return 403. Results are returned as a flat array in the data field. The list is not paginated — all members are returned in a single response.

      Parameters

      • thread: string

        Thread ID (thr_...) identifying the thread to remove the member from.

      Returns Promise<
          {
              data: {
                  membership_type?: string;
                  thread?: string;
                  user?: {
                      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;
                  };
              }[];
          },
      >

      Successful response

    • Remove a member from a thread Removes a user or agent membership from the specified thread. The authenticated user must have access to the thread. A successful removal returns HTTP 204 with no response body. Supply either user or agent depending on the value of type. Returns 404 if the thread or the membership record does not exist.

      Parameters

      • thread: string

        Thread ID (thr_...) identifying the thread to remove the member from.

      Returns Promise<void>

      Empty response body. HTTP 204 on success.