Skip to content

Conjoint

Port: REST :3130 · gRPC :5130

Real-time messaging infrastructure. Manages messaging identities (accounts), conversation spaces (channels), contact directories, channel memberships, and messages. Message delivery uses EMQX/MQTT via the publisher worker.

Collections

CollectionPathPurpose
Accounts/conjoint/accountsMessaging identity
Channels/conjoint/channelsConversation container
Contacts/conjoint/contactsContact directory entries
Members/conjoint/membersAccount-to-channel membership
Messages/conjoint/messagesMessages inside a channel

conjoint/accounts

A messaging identity that can participate in channels and messages.

Required Create Fields

FieldRequiredTypeDescription
typeAccountTypeHUMAN, ROBOT

Optional Fields

FieldTypeDescription
profileMongoIdidentity/profiles reference
biostringShort bio text
statusstringLocal status string

Population

PathCollection
profileidentity/profiles

conjoint/channels

A conversation space — group, broadcast stream, or direct conversation.

Required Create Fields

FieldRequiredTypeDescription
typeChannelTypeGROUP, BROADCAST, CONVERSATION
scopeChannelScopePUBLIC, PRIVATE, PROTECTED

Optional Fields

FieldTypeDescription
namestringShort channel name
titlestringHuman-readable title
profileMongoIdidentity/profiles reference
accountMongoIdOwning conjoint/accounts
pinned_messagesMongoId[]Pinned message IDs (raw, not populatable)

Population

PathCollection
profileidentity/profiles
accountconjoint/accounts

conjoint/contacts

Contact directory entry, optionally linked to a messaging account.

Required Create Fields

FieldRequiredTypeDescription
typeContactTypeMAIN, HOME, WORK, OTHER

Optional Fields

FieldTypeDescription
phonestringPhone number
emailstringEmail address
accountMongoIdconjoint/accounts reference
nicknamestringDisplay nickname

Population

PathCollection
accountconjoint/accounts

conjoint/members

Joins an account to a channel with optional role and permissions.

Required Create Fields

FieldRequiredTypeDescription
accountMongoIdconjoint/accounts
channelMongoIdconjoint/channels

Optional Fields

FieldTypeDescription
rolestringMembership role label
permissionsstring[]Fine-grained permission labels

The { account, channel } pair has a unique compound index — duplicate memberships are not valid.

Population

PathCollection
accountconjoint/accounts
channelconjoint/channels

conjoint/messages

Polymorphic messages inside a channel.

Required Create Fields

FieldRequiredTypeDescription
typeMessageTypeTEXT, FILE, IMAGE, VIDEO, AUDIO, STICKER, GALLERY, CONTACT, COMMAND, DOCUMENT, LOCATION, PULL
contentanyPolymorphic message body

Optional Fields

FieldTypeDescription
accountMongoIdSender account
channelMongoIdTarget channel
captionstringOptional caption
mentionsMongoId[]Mentioned account IDs (not user IDs)
reply_toMongoIdParent message ID (raw, not populatable)
hashtagsstring[]Hashtag strings
reactionsobject[]Reaction objects
scheduled_atdateScheduled send timestamp
forwarded_fromMongoIdForwarding account ID
originate_fromMongoIdOriginal sender account ID

mentions are conjoint/accounts IDs — not identity/users IDs.

Population

PathCollection
accountconjoint/accounts
channelconjoint/channels
mentionsconjoint/accounts
originate_fromconjoint/accounts
forwarded_fromconjoint/accounts

Query Tips

  • Scope message queries by channel for conversation history.
  • Use created_at descending sort for message history pagination.
  • Query memberships by channel to list members, or by account to list channel memberships.