Skip to content

Docs / All tools / Base tools

twitter.post

Publish a post from the connected X account.

40 credits. Per post. 0 when cancelled.

Example prompt

Send this to your AI app when Heelo is connected:

Post a tweet: 'Excited to announce Heelo v2!'

Input fields

FieldTypeDescription
queryRequiredstringRequest to post a tweet, in any language: 'Post to X: <text>' (the text is posted unchanged; a request without a clear text is asked for it)
verbatimbooleanWhen true, `query` is the whole tweet text. Either way the tweet is posted exactly as given: no model drafts or rewrites it, it is never cut to fit, and the confirm step accepts only 'post' or 'cancel'. A text longer than X allows is refused.

Output fields

The fields in data when status is success.

FieldType
tweet_idstring
tweet_urlstring
tweet_textstring
answerstring

Code

The call with the input fields that the tool needs. Set HEELO_API_KEY to your API key.

import os
import requests

response = requests.post(
    "https://toolsprimitives.uk/v1/tools/twitter.post/invoke",
    headers={"Authorization": f"Bearer {os.environ['HEELO_API_KEY']}"},
    json={"input": {
        "query": "Post a tweet: 'Excited to announce Heelo v2!'",
    }},
    timeout=120,
)
response.raise_for_status()
print(response.json())