Use the Channels CLI
The socra channels namespace exposes Account-scoped messaging operations. Use it from a terminal or a runtime with terminal access.
Before you start
You need the Socra CLI and an authorized Account session. Install the Channels namespace, then check its commands:
socra install channels
socra channels --help
If the Account session is missing, run socra account login and select the intended Account. Keep credentials out of messages and shared command output.
Verify the session
Read the current workspace membership:
socra channels session get
Confirm that the returned membership belongs to the intended Account. An authentication error is not a successful connection.
List channels
Read up to 20 channels:
socra channels channel list --limit 20
Use the returned IDs when another command requires a channel identifier. An empty authorized result means there are no matching channels available to that request.
Read messages
Replace CHANNEL_ID with the ID of a channel you can access:
socra channels message list --channel-id CHANNEL_ID --limit 20
The commands above read existing data.
Send a message
Use an existing channel that you have permission to post in. You must be a member of the channel. Sending a message makes its content visible to the conversation's participants and can notify them.
Copy the channel's
idfromsocra channels channel list. A channel ID identifies the conversation; participant user IDs and member record IDs cannot replace it.Save this JSON as
message.json. ReplaceCHANNEL_IDwith the channel ID, replaceUNIQUE_MESSAGE_KEYwith a new identifier for this message, and enter the text you intend to send. Keep the key between 1 and 128 characters. Use a different key for each new message.JSON{ "channel_id": "CHANNEL_ID", "client_id": "UNIQUE_MESSAGE_KEY", "text": "The report is ready for review." }Send the saved request:
Bashsocra channels message create --file message.jsonCheck that the returned message has an
idand the intendedchannel_idandtext. To retrieve it again, replaceMESSAGE_IDwith that returnedid:Bashsocra channels message get MESSAGE_ID
Retry after an uncertain response
If the send command times out or loses its connection before returning a result, retry the unchanged message.json with the same Account and sender. Its client_id lets Channels return the existing message when the first send succeeded. Keep the destination and content unchanged for that retry.
If you omit client_id, the CLI generates a new value each time you run the command. Repeating that command can send another message.
If a request reports that the channel is unavailable, check the selected Account, the channel ID, and your channel membership. A channel can be visible in a list without allowing you to post. An archived channel does not accept new messages.
Reply in a thread
To reply to an existing top-level message, add "thread_id": "PARENT_MESSAGE_ID" to the JSON before sending. Replace PARENT_MESSAGE_ID with that message's id. The parent must be a live top-level message in the same channel. Use a new client_id for the reply.
Inspect command options
Use command help for filters and required fields:
socra channels channel list --help
socra channels message list --help
socra channels message create --help
For the native interface, follow Install Channels.