ReferenceWhat you can callInboxmutateinbox.addMessage

inbox.addMessage

Put one message into a lead’s Sales Inbox thread, in either direction, even for somebody who was never in a campaign. Creates the lead if it is new. This can send nothing.

EndpointPOST /mcp/mutate
Scopewrite
Sandbox keyallowed
Extra entitlementnone
MCP toolsselda_add_inbox_message
Convex functionmcpQueries:addInboxMessage

A free sandbox key may call it.

Arguments

ArgumentTypeRequiredNotes
projectIdstringrequired
leadIdstringoptionalAn existing lead. Omit it and name the person in identity instead.
identityobjectoptional
direction"inbound" | "outbound"requiredinbound = they wrote it. outbound = we did, somewhere else. Nothing here sends.
bodystringrequired
subjectstringoptional
occurredAtstring | numberoptionalWhen it actually happened. Defaults to now; a wrong “now” on old history is a lie.

Shapes that did not fit the table:

identity: { email?: string; name?: string; firstName?: string; lastName?: string; company?: string; jobTitle?: string; domain?: string; linkedinUrl?: string; phone?: string }

What Selda fills in

You never send these. The HTTP layer overwrites them from the API key, which is what keeps one organisation’s data out of another’s reach.

ArgumentFilled in from
orgIdyour organisation, resolved from the API key

Example request

Required arguments only. Values in angle brackets are yours to fill in; the optional ones are in the table above.

curl -X POST https://api.selda.ai/mcp/mutate \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{ "fn": "inbox.addMessage", "args": { "projectId": "<projectId>", "direction": "inbound", "body": "<body>" } }'
{
  "fn": "inbox.addMessage",
  "args": {
    "projectId": "<projectId>",
    "direction": "inbound",
    "body": "<body>"
  }
}

Example response

Every endpoint answers in the same envelope.

{
  "value": <the function's return value>,
  "request_id": "req_..."
}

The shape of value is not documented here. mcpQueries:addInboxMessage declares no returns validator, so there is nothing to derive it from, and a shape written out by hand here is a shape that goes stale without anything noticing. Call it once against a test key and read what comes back.

On failure the body is { "error": { "type", "code", "message", "request_id" }, "request_id" } and request_id is echoed in the X-Request-Id header.


Generated from convex/lib/mcpRegistry.ts. Nothing in this reference sends: launchRun is in no registry and never will be, so a script can prepare a campaign completely and a person still presses send in the app.