ArchAstro.V1.ThreadMessages (archastro v0.1.0)

Copy Markdown

ThreadMessage API resource.

Summary

Functions

delete(client, message)

@spec delete(ArchAstro.Client.t(), String.t()) ::
  {:ok, :ok} | {:error, ArchAstro.Error.reason()}

Delete a thread message

Permanently removes the specified message from its thread. This action cannot be undone.

A message may be deleted by its author, an admin of the org the message belongs to, an admin of the team that owns the thread, or the agent that sent it. Service-to-service callers with elevated (all_powerful) scope may delete any message in a thread they can access. Returns 403 Forbidden when the caller is not permitted to delete the message.

Empty body. The server responds with HTTP 204 No Content on success.

replace(client, message, input)

Update a thread message

Edits the content of an existing thread message and returns the updated message object.

A regular user may only edit messages they authored. Service-to-service callers with elevated (all_powerful) scope may edit any accessible message without an ownership check. Returns 403 Forbidden when the caller does not own the message.

The updated message object reflecting the new content.

replies(client, message, params \\ %ArchAstro.Types.Operations.GetApiV1ThreadMessagesMessageReplies.Params{})

List replies to a thread message

Returns a cursor-paginated list of reply messages for the specified thread message. By default only direct (first-level) replies are returned. Set tree to true to retrieve the full nested reply tree in a flat list, ordered by creation time ascending.

The authenticated user must have access to the thread that contains the message. If the message belongs to a team-scoped thread, the viewer is automatically scoped to that team before the query executes.

Use before_cursor and after_cursor together with limit to page through large reply threads. The has_more field in the response indicates whether additional pages exist.

Cursor-paginated list of reply messages for the requested thread message.