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
| Field | Type | Description |
|---|---|---|
queryRequired | string | Request 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) |
verbatim | boolean | When 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.
| Field | Type |
|---|---|
tweet_id | string |
tweet_url | string |
tweet_text | string |
answer | string |
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())// Node.js 18 or newer, in an ES module.
const response = await fetch("https://toolsprimitives.uk/v1/tools/twitter.post/invoke", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.HEELO_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
input: {
"query": "Post a tweet: 'Excited to announce Heelo v2!'"
},
}),
signal: AbortSignal.timeout(120_000),
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
console.log(await response.json());