ArchAstro. V1. Teams. Threads
(archastro v0.2.0)
Copy Markdown
TeamThread API resource.
Summary
Functions
@spec create( ArchAstro.Client.t(), String.t(), ArchAstro.Types.Operations.PostApiV1TeamsTeamThreads.Input.t() ) :: {:ok, ArchAstro.Types.Thread.t()} | {:error, ArchAstro.Error.reason()}
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.
The newly created thread.
@spec list( ArchAstro.Client.t(), String.t(), ArchAstro.Types.Operations.GetApiV1TeamsTeamThreads.Params.t() ) :: {:ok, ArchAstro.Types.Operations.GetApiV1TeamsTeamThreads.Response.t()} | {:error, ArchAstro.Error.reason()}
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, ordered with the team's
default thread first, then by most recent activity (newest first). Each
thread carries a last_activity timestamp — the most recent message's
creation time, falling back to the thread's own creation time. Use the
team-scoped thread endpoints to create, update, or delete individual
threads.
Successful response
metrics(client, team, params \\ %ArchAstro.Types.Operations.GetApiV1TeamsTeamThreadsMetrics.Params{})
@spec metrics( ArchAstro.Client.t(), String.t(), ArchAstro.Types.Operations.GetApiV1TeamsTeamThreadsMetrics.Params.t() ) :: {:ok, ArchAstro.Types.Operations.GetApiV1TeamsTeamThreadsMetrics.Response.t()} | {:error, ArchAstro.Error.reason()}
Get threads-created count for a team
Returns how many network-public team threads were created in the UTC-day
window. Counts come from realtime SQL aggregation over append-only
network_activity_events (thread.created rows co-committed with create):
team- or restricted-visibility threads (plus legacy open-team rows), never
private or mirror. Every Network member sees the same number. Hard-delete
co-commits a separate thread.deleted transition event and does not remove
create events (metric is "created", not "still present"). Visibility flips
after insert are ignored in v1.
Any authenticated team member may read this count-only Network summary. Requests from callers without team access return 404 so team existence is not disclosed.
Successful response