> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kylon.io/llms.txt
> Use this file to discover all available pages before exploring further.

# connection

> Manage connection webhooks and contacts; read events and drafts.

```text theme={null}
kylon workspace connection — kylon workspace help detail

connection — inbound webhooks, contacts, activity, and drafts for connected services
  A Connection attaches an external data source to the workspace: an account you call out to, or a webhook that pushes events in. Contacts identify addressable recipients. Events are locally persisted Email and IM activity and may be incomplete. Drafts are canonical, editable outbound messages shown as Draft Cards.


  kylon workspace connection list
    List connections usable by this activation, including verified delegated access, with stable Connection IDs for later commands.

  kylon workspace connection mcp add
    Send the current user a card for configuring a Remote MCP server. This command has no MCP configuration arguments: the user supplies the server URL and authentication in the card. It is available only inside a live human-triggered assignment and sends the card to the current room.

  kylon workspace connection webhook create --name <name> [--room <room_id>]
    Create an inbound webhook and return its URL once. Any system that can POST JSON can send events to it; each event opens its own thread in the bound room and activates that room's main agent. Defaults to the current room. Use this — not a webhook-triggered workflow — when inbound events should be handled as conversations. Payload: required "title", optional "_content" body, optional "_event_id" for idempotency; all other fields are preserved for the agent. The URL carries the token and is never shown again: give it once to the person who asked, then do not repeat it in a later message, a file, or another command.
  kylon workspace connection webhook list
    List this agent's webhooks with their bound room, status, and last event time.
  kylon workspace connection webhook rotate --id <endpoint_id>
    Issue a new URL and invalidate the old one. Use after a leak or a lost URL; the room binding and existing threads are unaffected. The new URL needs the same handling as the original.
  kylon workspace connection webhook revoke --id <endpoint_id>
    Stop accepting events. Threads the webhook already opened are unchanged.

  kylon workspace connection contact list --connection <connection_id> [--query <name-email-or-phone>] [--kind email_address|direct|group|room] [--status active|unavailable] [--limit <n>]
    Search addressable recipients for one Connection. Returned Contact IDs are internal identifiers for subsequent commands.
  kylon workspace connection contact get --id <contact_id>
    Read one Contact selected by list. LINE destination IDs remain internal.
  kylon workspace connection contact create --connection <connection_id> --address <email-or-whatsapp-number> [--name <display_name>] [--kind email_address|direct]
    Create or reuse an Email or WhatsApp recipient. LINE Contacts are discovered from inbound conversations.

  kylon workspace connection event list --connection <connection_id> [--query <text>] [--conversation <id>] [--direction inbound|outbound|unknown] [--since <date>] [--until <date>] [--latest-inbound] [--limit <n>] [--cursor <cursor>]
    Search locally persisted Events. Results include sender, conversation, subject, content preview, and attachment count. Inspect the returned collection start, status, and coverage warning. --latest-inbound returns conversations whose latest locally collected message is inbound and defaults to 20 results.
  kylon workspace connection event get --id <event_id>
    Read one Event selected by list, including its collection coverage warning.

  kylon workspace connection draft list [--query <text>] [--recipient <email-or-name>] [--subject <text>] [--type email|im] [--connection <connection_id>] [--status <status[,status...]>] [--since <date>] [--until <date>] [--limit <n>]
    Find visible Drafts and return their IDs. Statuses: draft, scheduled, sending, sent, failed, delivery_unknown, discarded.
  kylon workspace connection draft get --id <draft_id>
    Return the canonical Content and version required by revise.
  kylon workspace connection draft revise --id <draft_id> --expected-version <n> --json <content_json> [--quote-event-id <event_id>] [--clear-quote true]
    Replace the full Content returned by get when the version matches. Raw JSON needs no shell quotes.

Note: quote flag values that contain spaces; follow each command's JSON syntax.
```
