ReferenceWhat you can callCampaignsquerycampaigns.messageStructure

campaigns.messageStructure

Read what a campaign’s message is made of: every block, which ones ship verbatim, the instruction behind each generated one, the shape, and whether it is locked.

EndpointPOST /mcp/query
Scoperead
Sandbox keyallowed
Extra entitlementnone
MCP toolsselda_get_message_structure
Convex functioncampaignBlueprints:messageStructureForApi

A free sandbox key may call it.

Arguments

ArgumentTypeRequiredNotes
campaignIdstringrequired

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/query \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{ "fn": "campaigns.messageStructure", "args": { "campaignId": "<campaignId>" } }'
{
  "fn": "campaigns.messageStructure",
  "args": {
    "campaignId": "<campaignId>"
  }
}

Example response

Every endpoint answers in the same envelope.

{
  "value": <any | null>,
  "request_id": "req_..."
}

The function declares a return validator, so value is any | null.

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.