Contents
View as Markdown

Routines

6 tools. Generated from the MCP server: names, inputs and prices match the code.

Create Deal Routine

Create a routine; at most 3 per user. trigger "schedule" needs schedule_time_local; trigger "deal_arrived" needs a source: search_agent (search_agent_id: the id of a search profile from search_profiles_list), immometrica (external_search_id plus schedule_time_local as the poll time) or inbound_email (inbound_mailbox_id, one of the account inbound addresses from inbound_mailboxes_list; an address has at most one routine, a second one is refused with 409 inbound_mailbox_has_routine). actions is the ordered list of what to do: create_property, send_email (a prompt that writes the mail; it always goes to the account owner) and run_agent (prompt). A run_agent step is an agent that runs unattended with only the Leverage tools the owner’s plan includes, on the account’s data and Leverage’s listing search. On a run about one property (from a create_property step, or the property an inbound mail created) it is told to change only that property; otherwise it works across the account. It has no browser and no web search. Its one outside request is deals_url_extract, and only for a page on ImmoScout24, Immowelt, Immonet, Kleinanzeigen or Wohnungsbörse (any other host is refused with 403 url_not_a_listing_portal); it gets back only the deal extracted from it. The only mail it can send goes to the account owner. Its model use and the documents it processes spend the owner’s in-app AI credits, never API credits. An inactive routine may be incomplete; activating one requires the full shape. Over a connector, API key or OAuth grant: Max 5x plan and up.

Needs the plan feature routines.

Inputs

NameTypeRequiredDescription
namestringyes
is_activebooleanno
triggerstringnoValues:scheduledeal_arrived
sourcestring | nullnoValues:search_agentinbound_emailimmometrica
search_agent_idinteger | nullno
external_search_idstring | nullno
external_search_labelstring | nullno
inbound_mailbox_idstring | nullnoFor source inbound_email: the id of one of the account inbound addresses (inbound_mailboxes_list). A mail to it triggers the routine. An address has at most one routine.
schedule_time_localstring | nullno
schedule_timezonestring | nullno
actionsarray<object>no

RESTPOST /api/v1/routines

routines_delete

WriteDestructiveFree

Delete Deal Routine

Delete a routine by id. Over a connector, API key or OAuth grant: Max 5x plan and up.

Needs the plan feature routines.

Inputs

NameTypeRequiredDescription
idintegeryes

RESTDELETE /api/v1/routines/{id}

Get Deal Routine

Get one routine by id: its trigger, its source configuration and its ordered actions. Over a connector, API key or OAuth grant: Max 5x plan and up.

Needs the plan feature routines.

Inputs

NameTypeRequiredDescription
idintegeryes

RESTGET /api/v1/routines/{id}

List Deal Routines

List the user’s routines. A routine is WHEN (trigger, plus a source when the trigger is deal_arrived) THEN (ordered actions). Each item includes its trigger, source configuration and its action list in order. Over a connector, API key or OAuth grant: Max 5x plan and up.

Needs the plan feature routines.

Inputs

No inputs.

RESTGET /api/v1/routines

routines_patch

WriteDestructiveFree

Update Deal Routine

Update a routine by id. `actions` replaces the whole list in the given order, so send every step you want to keep. What a run_agent step can reach is stated on routines_create. Over a connector, API key or OAuth grant: Max 5x plan and up.

Needs the plan feature routines.

Inputs

NameTypeRequiredDescription
namestringno
is_activebooleanno
triggerstringnoValues:scheduledeal_arrived
sourcestring | nullnoValues:search_agentinbound_emailimmometrica
search_agent_idinteger | nullno
external_search_idstring | nullno
external_search_labelstring | nullno
inbound_mailbox_idstring | nullnoFor source inbound_email: the id of one of the account inbound addresses (inbound_mailboxes_list). A mail to it triggers the routine. An address has at most one routine.
schedule_time_localstring | nullno
schedule_timezonestring | nullno
actionsarray<object>no
idintegeryes

RESTPATCH /api/v1/routines/{id}

Run Deal Routine

Start a one-off run of a routine that has a clock: trigger schedule, or source immometrica (a manual poll). Returns job_id to poll. A search_agent or inbound_email routine cannot be started this way: it runs when its source delivers. A run spends the person’s in-app AI credits, whoever starts it. Over a connector, API key or OAuth grant: Max 5x plan and up.

Always spends the in-app AI credits, never API credits.

Needs the plan feature routines.

Inputs

NameTypeRequiredDescription
idintegeryes

RESTPOST /api/v1/routines/{id}/run