Account

Send an event of your own

account_emit_event · Changes data · Markdown

Sends an event the agent names, custom.<name>, to the channels subscribed to it and to account_events.

$0.005 per channel it goes to

From your agent’s balance. A call that fails costs nothing.

An example

When you qualify a lead, tell Luis and our CRM sync without me picking channels each time.

Your agent callsaccount_emit_event$0.005 per channel it goes to

The example business is Halverson Cycle & Repair, a bike shop with a repair workshop in Portland, Oregon. The reply is the one the tool really gives.

With these arguments
{
  "kind": "custom.lead_qualified",
  "title": "The Alder Street Hotel is ready for a quote",
  "data": {
    "company": "The Alder Street Hotel",
    "bikes": 8,
    "deal_id": 4120
  }
}
What comes back
{
  "event": {
    "event_id": 4101,
    "kind": "custom.lead_qualified",
    "title": "The Alder Street Hotel is ready for a quote",
    "text": null,
    "data": {
      "company": "The Alder Street Hotel",
      "bikes": 8,
      "deal_id": 4120,
      "sent_by": {
        "bot": "Pip",
        "team": null
      }
    },
    "link": null,
    "occurred_at": "2026-10-14T08:00:00+00:00"
  },
  "channels": 0
}

Use it when

Something the agent did should reach Slack, a webhook or another team's agent, routed by the business's subscriptions instead of named channels.

What it does

Send an event you name, custom.<name> (custom.lead_qualified, custom.order_shipped), to every channel subscribed to it (notify_subscribe with "custom.*" or its name: Slack, Teams, a webhook to Zapier, Make, n8n or the business's own systems) and to account_events, where another team's bot can pick it up. data is any JSON object (up to 10 KB); sent_by is added with this bot's name and team. $0.005 for each channel it goes to; free when no channel is subscribed.

What comes back

The event as kept (event_id, kind, title, data with sent_by, time) and channels: how many it goes to. Every reply also carries cost_usd and balance_usd.

Inputs

NameTypeWhat it is
kindRequiredstringcustom. and a name of lowercase letters, digits, dots, dashes and _. 8 to 66 characters, matches ^custom\.[a-z0-9][a-z0-9_.-]*$.
titleRequiredstring1 to 200 characters.
textstringUp to 4,000 characters.
dataobject
linkstringUp to 1,000 characters, matches ^https://.

The call

Over MCP, call account_emit_event on https://api.conecto.chat/mcp/account. Over REST:

Terminal
curl -X POST https://api.conecto.chat/v1/tools/account_emit_event \
  -H "Authorization: Bearer $CONECTO_KEY" \
  -H "Content-Type: application/json" \
  -d '{"kind":"custom.lead_qualified","title":"The Alder Street Hotel is ready for a quote","data":{"company":"The Alder Street Hotel","bikes":8,"deal_id":4120}}'

When it refuses

A refused call costs nothing and says what to do next.

CodeWhenWhat to do
invalid_input400kind is not custom. and a name of lowercase letters, digits, dots, dashes and _.Use a kind like custom.lead_qualified.
too_large413data is over 10 KB of JSON.Send less, and link to the record instead.
unavailable503The event could not be saved.Try again in a moment.

Give this to your agent.

Set up Conecto from https://conecto.chat/SKILL.md