Skip to content

Docs / All tools / Loop I: Distribution

inbound.page.publish

Publish landing pages, articles, or changelogs on a Heelo-hosted site. Link to them from social posts and outreach emails.

25 credits. Per page published.

Example prompt

Send this to your AI app when Heelo is connected:

Publish a landing page titled 'Early access' at slug 'early-access'

Input fields

FieldTypeDescription
slugRequiredstringURL slug, e.g. 'why-nobody-uses-your-app'
titleRequiredstringPage title
site_idstringHosted site id. Pass the site_id returned by an earlier publish to put the page in the same site; a new site is created if omitted
kindstringlanding | article | changelog
body_mdstringPage body in Markdown
og_image_asset_idstringAsset id from media.render
og_image_urlstringExplicit og:image URL (overrides asset id)
captureobject{enabled, fields, cta}
seoobject{description, canonical, jsonld}

Output fields

The fields in data when status is success.

FieldTypeDescription
urlstring
published_atstring
site_idstring
canonical_urlstringThe canonical URL the page declares (a CMS post: its permalink)
og_image_urlstringThe og:image the hosted page declares
kindstringlanding | article | changelog
captureobjectThe page's email form: {enabled, action (POST URL), cta}; on a CMS page whose form is not on the post (or not confirmed), enabled is false and `error` says why
answerstring

Code

The call with the input fields that the tool needs. Replace each word in capitals, such as SLUG. Set HEELO_API_KEY to your API key.

import os
import requests

response = requests.post(
    "https://toolsprimitives.uk/v1/tools/inbound.page.publish/invoke",
    headers={"Authorization": f"Bearer {os.environ['HEELO_API_KEY']}"},
    json={"input": {
        "slug": "SLUG",
        "title": "TITLE",
    }},
    timeout=120,
)
response.raise_for_status()
print(response.json())