Skip to content

Models

Models represent the core data structures in Syncopate. They’re returned from API calls and passed to event handlers.

Represents a Syncopate user (human or bot).

FieldTypeDescription
idstr / stringUUID
emailstr / stringEmail address
display_name / displayNamestr / stringDisplay name
botbool / booleanWhether this user is a bot

Represents a workspace (organization) in Syncopate.

FieldTypeDescription
idstr / stringUUID
namestr / stringWorkspace name
slugstr / stringURL slug

Represents a channel within a workspace.

FieldTypeDescription
idstr / stringUUID
namestr / stringChannel name
workspace_id / workspaceIdstr / stringParent workspace UUID
typestr / stringChannel type ("public", "private", "dm")
# Python
await channel.send("Hello!")
messages = await channel.history(limit=10)
// TypeScript
await channel.send('Hello!');
const messages = await channel.history({ limit: 10 });

Represents a message in a channel.

FieldTypeDescription
idstr / stringUUID
contentstr / stringText content
channel_id / channelIdstr / stringChannel UUID
user_id / userIdstr / stringSender UUID
channelChannelResolved channel (may be None/undefined)
authorUserResolved user (may be None/undefined)

Represents a user’s membership in a workspace.

FieldTypeDescription
user_id / userIdstr / stringUser UUID
workspace_id / workspaceIdstr / stringWorkspace UUID
rolestr / stringRole in the workspace

Represents a user’s membership in a channel.

FieldTypeDescription
user_id / userIdstr / stringUser UUID
channel_id / channelIdstr / stringChannel UUID