# Inbox commands

Find conversations, read messages, and send replies with explicit account IDs; inspect comments, reviews, and workflow runs.

Read the conversation before sending a reply. Inbox writes can contact real customers, so verify both the account and recipient before execution. [Authenticate](/cli/authentication) first.

## First command

Get `ACCOUNT_ID` from `zernio accounts:list`, then list active conversations:

```bash
zernio inbox:conversations --accountId "$ACCOUNT_ID" \
  --status active --limit 20 --pretty
```

The response contains `data` and pagination metadata. Copy the intended conversation's `id` into `CONVERSATION_ID`; confirm its participant and account before continuing.

## Commands

| Task | Command | Effect |
|---|---|---|
| List conversations | `zernio inbox:conversations --accountId "$ACCOUNT_ID"` | Read |
| Inspect a conversation | `zernio inbox:conversation "$CONVERSATION_ID" --accountId "$ACCOUNT_ID"` | Read |
| Read messages | `zernio inbox:messages "$CONVERSATION_ID" --accountId "$ACCOUNT_ID" --sortOrder desc` | Read |
| Send a DM reply | `zernio inbox:send "$CONVERSATION_ID" --accountId "$ACCOUNT_ID" --message "Thanks for reaching out."` | Customer-visible write |
| Find posts with comments | `zernio inbox:comments --accountId "$ACCOUNT_ID"` | Read |
| Read a post's comments | `zernio inbox:post-comments "$POST_ID" --accountId "$ACCOUNT_ID"` | Read |
| Reply to a comment | `zernio inbox:reply "$POST_ID" --accountId "$ACCOUNT_ID" --commentId "$COMMENT_ID" --message "Thank you!"` | Public write |
| List reviews | `zernio inbox:reviews --accountId "$ACCOUNT_ID"` | Read |
| Reply to a review | `zernio inbox:review-reply "$REVIEW_ID" --accountId "$ACCOUNT_ID" --message "Thank you!"` | Public write |
| Inspect workflow runs | `zernio workflows:list-executions "$WORKFLOW_ID" --limit 10` | Read |

IDs come from the relevant listing response, not from a guessed URL. Run a command with `--help` before adding attachments, templates, or platform-specific interactive payloads.

## Read, reply, verify

With both IDs set from the listing, read the messages first:

```bash
zernio inbox:messages "$CONVERSATION_ID" --accountId "$ACCOUNT_ID" --sortOrder desc --pretty
```

After approval of the recipient and exact text, send once and read again:

```bash
zernio inbox:send "$CONVERSATION_ID" --accountId "$ACCOUNT_ID" \
  --message "Yes, we ship to Portugal."
zernio inbox:messages "$CONVERSATION_ID" --accountId "$ACCOUNT_ID" --sortOrder desc --pretty
```

If sending times out, inspect the conversation before sending again. A transport failure does not prove the message was not delivered.

## More inbox workflows

| Need | CLI group | Reference |
|---|---|---|
| Customer records and fields | `contacts:`, `customfields:` | [Contacts](/contacts/list-contacts) |
| Bulk messaging | `broadcasts:` | [Broadcasts](/broadcasts/list-broadcasts) |
| Follow-up sequences | `sequences:` | [Sequences](/sequences/list-sequences) |
| Comment-triggered actions | `automations:` | [Comment automations](/comment-automations/list-comment-automations) |
| Triggered node graphs | `workflows:` | [Workflows](/products/automations/workflows) |

Find the exact subcommand in `zernio --help`. Creating or launching a broadcast, sequence, or workflow is a write and can affect multiple recipients.

### Workflows

Use `workflows:list-executions` with the workflow ID to inspect runs. Add `--status waiting` to focus on waiting executions and `--limit` to bound the response.

## How it behaves

- Conversation and message commands require different inputs. `inbox:messages` and `inbox:send` require `--accountId` even when the conversation ID is known.
- Messages default to oldest-first, up to 100 per page. Use `--sortOrder desc` to inspect recent replies, and follow returned cursors when reconciling older messages.
- The CLI requests 20 conversations by default. Continue with `--cursor` using `pagination.nextCursor` while `pagination.hasMore` is true.
- A cross-account conversation list can include failures in `meta`. Inspect them rather than interpreting a partial result as an empty inbox.
- Platform permissions and messaging windows still apply. A saved Zernio credential does not grant every platform messaging capability.

## Related

- [List conversations](/messages/list-inbox-conversations)
- [Inbox analytics](/cli/analytics)
- [Broadcasts](/broadcasts/list-broadcasts)
- [CLI for agents](/cli/agents)