ReferenceWhat you can callLeadsmutateleads.updateStatus

leads.updateStatus

Set a lead’s status (legacy path, Clerk-authenticated, an API key cannot reach this; the MCP tool uses the org-scoped leads.update).

EndpointPOST /mcp/mutate
Scopewrite
Sandbox keyallowed
Extra entitlementnone
MCP toolsnone, HTTP only
Convex functionleads/mutations:updateLeadStatus

A free sandbox key may call it.

⚠️
A legacy entry. It is dispatched, and its own summary above says what that costs you.

Arguments

ArgumentTypeRequiredNotes
leadIdid<"leads">required
status"new" | "contacted" | "responded" | "qualified" | "quote" | ...required

Shapes that did not fit the table:

status: "new" | "contacted" | "responded" | "qualified" | "quote" | "unqualified"

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": "leads.updateStatus", "args": { "leadId": "<leadId>", "status": "new" } }'
{
  "fn": "leads.updateStatus",
  "args": {
    "leadId": "<leadId>",
    "status": "new"
  }
}

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. leads/mutations:updateLeadStatus 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.