Skip to content

Add channel communication methods (messages, mailbox, inbox) #3

@artugro

Description

@artugro

Summary

SDK methods for sending messages within a communication network and polling inbox.

New methods

Sending

  • send_message(network_id, sender_id, recipient_id, content)NetworkMessage
  • send_to_mailbox(network_id, sender_id, recipient_id, content)NetworkMessage

Receiving

  • get_inbox(network_id, participant_id, limit=50)list[NetworkMessage]
  • acknowledge_messages(network_id, message_ids)int

Messages

  • list_messages(network_id, limit=100)list[NetworkMessage]

New model

class NetworkMessage:
    id: str
    network_id: str
    sender_participant_id: str
    recipient_participant_id: str | None
    channel_type: str  # call | message | mailbox
    content: str
    status: str  # pending | delivered | read | failed
    created_at: str

Design notes

  • Calls (POST /networks/{id}/call) can be added later — they're more complex (synchronous, blocking)
  • Keep the API simple: client.send_message(...) not client.networks.channels.message.send(...)

Backend endpoints

  • POST /networks/{id}/messages/send
  • POST /networks/{id}/mailbox
  • GET /networks/{id}/inbox/{pid}
  • POST /networks/{id}/messages/ack
  • GET /networks/{id}/messages

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions