Skip to main content

Get a thread and its messages

1 min read
get/messages/threads/{id}
Request example
Response
get/messages/threads/{id}

Authorization

Authorizationstringheaderrequired#
Better Auth session token. Go resolves the token in the session table and maps it to users.id via auth_user_id. The profile is taken from the path param :studioId when applicable.

Path parameters

idstringrequired#

Query parameters

limitinteger#

Default: 50

Range: 1–100

beforestring#
Return messages created before this RFC3339 timestamp.

Responses

application/json
OK.
dataobjectrequired#
Show child attributes
idstringrequired#
profileobjectrequired#
Show child attributes
studioIdstringrequired#
handlestringrequired#
namestringrequired#
imageUrlstring#
subscriberobjectrequired#
Show child attributes
userIdstringrequired#
namestring#
avatarUrlstring#
ownerobjectrequired#
Show child attributes
userIdstringrequired#
namestring#
avatarUrlstring#
lastMessageobject#
Show child attributes
idstringrequired#
threadIdstringrequired#
senderUserIdstringrequired#
bodystringrequired#

Length: max 4000

createdAtstringrequired#
lastMessageAtstring#
unreadCountintegerrequired#
viewerRoleenum<string>required#
Options:ownersubscriber
subscriptionActivebooleanrequired#
canOwnerChatbooleanrequired#
blockedbooleanrequired#
canSendbooleanrequired#
createdAtstringrequired#
updatedAtstringrequired#
messagesobject[]required#
Show child attributes
idstringrequired#
threadIdstringrequired#
senderUserIdstringrequired#
bodystringrequired#

Length: max 4000

createdAtstringrequired#
request_idstring#