loop1. run. start
Start a distribution run that prepares a card, a page, and posts for each platform. Publishing follows approval.
Charged by the tools it calls. inbound.page.publish 25. The posts are charged at loop1.run.approve.
Example prompt
Send this to your AI app when Heelo is connected:
Prepare a launch post about our new CSV import for LinkedIn and X, with a share image and a landing page. Show me the posts before they go out.
Input fields
| Field | Type | Description |
|---|---|---|
messageRequired | string | The one message to adapt to each channel |
channelsRequired | array of string | bluesky, linkedin, twitter (or x), instagram, reddit. Reddit posts only when it is named. |
pageRequired | object | |
card | object | Required for instagram; its image is the page's og:image |
reddit | object | Required when reddit is a channel |
campaign | string | The stats key. Default: the run id. One open run for each campaign |
site_id | string | One of your Loop I site ids |
acknowledge_unknown | boolean | Set to true only after a person checked the accounts. start refuses a campaign whose last run has a channel with an unknown outcome (it may have posted); with this set, it starts a new run for the campaign anyway |
Code
The call with the input fields that the tool needs. Replace each word in capitals, such as MESSAGE. Set HEELO_API_KEY to your API key.
import os
import requests
response = requests.post(
"https://toolsprimitives.uk/v1/tools/loop1.run.start/invoke",
headers={"Authorization": f"Bearer {os.environ['HEELO_API_KEY']}"},
json={"input": {
"message": "MESSAGE",
"channels": ["CHANNEL"],
"page": {"slug": "SLUG", "title": "TITLE"},
}},
timeout=120,
)
response.raise_for_status()
print(response.json())// Node.js 18 or newer, in an ES module.
const response = await fetch("https://toolsprimitives.uk/v1/tools/loop1.run.start/invoke", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.HEELO_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
input: {
"message": "MESSAGE",
"channels": [
"CHANNEL"
],
"page": {
"slug": "SLUG",
"title": "TITLE"
}
},
}),
signal: AbortSignal.timeout(120_000),
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
console.log(await response.json());