---
title: "Call the createConnectorRule MCP tool"
method: POST
path: "/api/v1/actions/createConnectorRule"
tags: ["Actions"]
---

# Call the createConnectorRule MCP tool

`POST /api/v1/actions/createConnectorRule`

## Request

- Base URL: `https://app.reachium.io`
- URL: `https://app.reachium.io/api/v1/actions/createConnectorRule`
- Auth: HTTP bearer

Save a NEW automation rule on a connected integration. The rule is always saved OFF: nothing runs until activateConnectorRule (launch scope) or Settings turns it on. direction "outbound" reacts to a Reachium event (trigger.event from the webhook catalog, e.g. lead.accepted) and runs one of the provider's own actions (action.type such as add_lead_to_campaign, with params like { provider_campaign_id }); direction "inbound" reacts to a provider event (trigger.event provider.*) and runs a Reachium action: add_to_campaign { campaign_id }, add_tag / remove_tag { tag }, set_lead_status { status }, mark_booked {}, record_booking {}, or send_linkedin_message { template } which, once activated, DMs the matched lead automatically. Events and action names are validated against the specific provider, so an unsupported pairing is refused with the reason. Each action type accepts exactly its own params (see the schema); unknown keys are refused. Pull getPlaybook("integrations", "connectors") first for the recipes and template variables.

Called through the Actions bridge: the response is that tool's own result, wrapped as `{ data: <tool result> }` under HTTP 200. Billing, daily-cap, and confirm-step outcomes are embedded INSIDE `data`, never remapped to an HTTP status (see the templated `/api/v1/actions/{toolName}` operation above for the full protocol, and `x-mcp-actions` for this tool's machine-readable scope/cap/confirm_behavior fields). Authentication, request-shape, and optional idempotency-protocol failures still use their documented non-200 statuses.

## Headers

- `Idempotency-Key` string

## Request body

- object
  - `integration_id` string, uuid, required: From getConnectors.
  - `direction` 'outbound' | 'inbound', required: "outbound": a Reachium event calls the provider. "inbound": a provider event acts inside Reachium.
  - `trigger` object, required
    - `event` 'reply.received' | 'reply.flagged' | 'reply.agent_sent' | 'lead.accepted' | 'lead.booked' | 'lead.sequence_completed' | 'leadmagnet.keyword_comment' | 'scrape.completed' | 'lead.invited' | 'lead.invite_expired' | 'lead.enrolled' | 'lead.state_changed' | 'lead.tags_changed' | 'message.sent' | 'message.received' | 'account.status_changed' | 'campaign.status_changed' | 'integration.disabled' | 'provider.reply_received' | 'provider.lead_interested' | 'provider.lead_category_changed' | 'provider.lead_unsubscribed' | 'provider.email_bounced' | 'provider.sequence_completed' | 'provider.meeting_booked' | 'provider.meeting_canceled' | 'provider.meeting_rescheduled', required: The event this rule fires on. Outbound rules use Reachium events (lead.*, reply.*, ...); inbound rules use provider.* events.
    - `filters` object: Optional narrowing filters for the trigger event.
      - `campaign_ids` string[]
      - `categories` string[]
      - `provider_campaign_id` string
  - `action` union, required: What runs when the rule fires: exactly one action type with its own params. Provider action names for outbound rules; Reachium actions (add_to_campaign, add_tag, remove_tag, set_lead_status, mark_booked, record_booking, send_linkedin_message) for inbound rules.
    - object
      - `type` 'add_lead_to_campaign', required
      - `params` object, required: Parameters for add_lead_to_campaign. Only the listed keys are accepted.
        - `provider_campaign_id` string, required: Smartlead campaign / Instantly campaign
      - `field_map` object: Outbound only: map provider custom fields to dotted paths of the Reachium event (lead.company, campaign.name) or a single-quoted literal.
    - object
      - `type` 'add_tag', required
      - `params` object, required: Parameters for add_tag. Only the listed keys are accepted.
        - `tag` string, required: Tag to add to the matched lead.
      - `field_map` object: Outbound only: map provider custom fields to dotted paths of the Reachium event (lead.company, campaign.name) or a single-quoted literal.
    - object
      - `type` 'add_to_campaign', required
      - `params` object, required: Parameters for add_to_campaign. Only the listed keys are accepted.
        - `campaign_id` string, required: Reachium campaign id (uuid) to enroll the matched lead in.
      - `field_map` object: Outbound only: map provider custom fields to dotted paths of the Reachium event (lead.company, campaign.name) or a single-quoted literal.
    - object
      - `type` 'mark_booked', required
      - `params` object, required: Parameters for mark_booked. Only the listed keys are accepted.
      - `field_map` object: Outbound only: map provider custom fields to dotted paths of the Reachium event (lead.company, campaign.name) or a single-quoted literal.
    - object
      - `type` 'move_to_list', required
      - `params` object, required: Parameters for move_to_list. Only the listed keys are accepted.
        - `provider_campaign_id` string, required: From Instantly campaign
        - `provider_list_id` string, required: Instantly list id
      - `field_map` object: Outbound only: map provider custom fields to dotted paths of the Reachium event (lead.company, campaign.name) or a single-quoted literal.
    - object
      - `type` 'pause_lead', required
      - `params` object, required: Parameters for pause_lead. Only the listed keys are accepted.
        - `provider_campaign_id` string, required: Smartlead campaign
      - `field_map` object: Outbound only: map provider custom fields to dotted paths of the Reachium event (lead.company, campaign.name) or a single-quoted literal.
    - object
      - `type` 'record_booking', required
      - `params` object, required: Parameters for record_booking. Only the listed keys are accepted.
      - `field_map` object: Outbound only: map provider custom fields to dotted paths of the Reachium event (lead.company, campaign.name) or a single-quoted literal.
    - object
      - `type` 'remove_tag', required
      - `params` object, required: Parameters for remove_tag. Only the listed keys are accepted.
        - `tag` string, required: Tag to remove from the matched lead.
      - `field_map` object: Outbound only: map provider custom fields to dotted paths of the Reachium event (lead.company, campaign.name) or a single-quoted literal.
    - object
      - `type` 'resume_lead', required
      - `params` object, required: Parameters for resume_lead. Only the listed keys are accepted.
        - `provider_campaign_id` string, required: Smartlead campaign
      - `field_map` object: Outbound only: map provider custom fields to dotted paths of the Reachium event (lead.company, campaign.name) or a single-quoted literal.
    - object
      - `type` 'send_linkedin_message', required
      - `params` object, required: Parameters for send_linkedin_message. Only the listed keys are accepted.
        - `template` string, required: The message text. {{lead.first_name}}, {{lead.last_name}}, {{lead.email}}, {{event.category}} and {{event.reply_text}} resolve; nothing else does.
        - `linkedin_account_id` string: Send from this connected LinkedIn account (uuid from getLinkedInAccounts). Omit for the workspace default. Optional.
      - `field_map` object: Outbound only: map provider custom fields to dotted paths of the Reachium event (lead.company, campaign.name) or a single-quoted literal.
    - object
      - `type` 'set_lead_status', required
      - `params` object, required: Parameters for set_lead_status. Only the listed keys are accepted.
        - `status` string, required: Lead status value to set.
      - `field_map` object: Outbound only: map provider custom fields to dotted paths of the Reachium event (lead.company, campaign.name) or a single-quoted literal.
    - object
      - `type` 'unsubscribe_lead', required
      - `params` object, required: Parameters for unsubscribe_lead. Only the listed keys are accepted.
        - `provider_campaign_id` string, required: Smartlead campaign
      - `field_map` object: Outbound only: map provider custom fields to dotted paths of the Reachium event (lead.company, campaign.name) or a single-quoted literal.
    - object
      - `type` 'update_interest_status', required
      - `params` object, required: Parameters for update_interest_status. Only the listed keys are accepted.
        - `interest_value` '1' | '2' | '3' | '4' | '0' | '-1' | '-2' | '-3', required: Interest status
      - `field_map` object: Outbound only: map provider custom fields to dotted paths of the Reachium event (lead.company, campaign.name) or a single-quoted literal.
    - object
      - `type` 'update_lead_category', required
      - `params` object, required: Parameters for update_lead_category. Only the listed keys are accepted.
        - `provider_campaign_id` string, required: Smartlead campaign
        - `category_id` string, required: Category
      - `field_map` object: Outbound only: map provider custom fields to dotted paths of the Reachium event (lead.company, campaign.name) or a single-quoted literal.
  - `daily_cap` integer: Per-rule daily run cap. Defaults to 25 for send_linkedin_message (max 50), 100 otherwise.

## Response `200`

The result of calling this tool.

- object
  - `data` unknown, required
  - `error` unknown, required

## Other responses

- `400`: The request body was not a JSON object (code invalid_request), or Idempotency-Key is malformed (code invalid_idempotency_key).
- `401`: Missing or invalid API key. Send `Authorization: Bearer rmcp_...` (code unauthorized).
- `403`: This tool is out of the key’s granted scope (code insufficient_scope).
- `409`: This Idempotency-Key has an unresolved in-flight or ambiguous result (code request_in_flight). Reconcile before using a new key.
- `422`: This Idempotency-Key was already used with a different request body (code idempotency_key_reuse).
- `429`: Rate limited: shared `mcp:ip:{ip}` (600/60s) or `mcp:key:{keyId}` (120/60s) bucket, the SAME buckets the MCP endpoint uses (code rate_limited).
- `500`: Unhandled server error (code internal_error).

---

[API](https://skmtc.dev/reachium/apis/reachium-api.md) · [All operations](https://skmtc.dev/reachium/apis/reachium-api/llms.txt) · [OpenAPI document](https://skmtc.dev/reachium/apis/reachium-api/revisions/11682826692b?raw)
