Accounts & connections · Connect
Connects a Telegram directly.
POST
https://api.pozy.ai/v1/connect/telegramComing soonNot available yetinitiateTelegramConnect
Telegram is coming soon. Telegram accounts cannot be connected yet: GET /v1/connect/telegram returns 403 feature_not_available, so this endpoint has no account to act on for now.
Guide: Telegram
Request
Send your API key as Authorization: Bearer pz_live_.... Read-only keys cannot call it. Keys with the accounts resource group disabled get 403 resource_group_disabled. Authentication
This endpoint is not available yet. Calls return 403 feature_not_available.
Request body
application/json, required
chatIdstringrequiredprofileIdstringrequired
Example
curl -X POST "https://api.pozy.ai/v1/connect/telegram" \
-H "Authorization: Bearer $POZY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"chatId": "653dde71ee60143f359d3fdf",
"profileId": "6a0b6573846efc28aaa9a3ff"
}'const res = await fetch("https://api.pozy.ai/v1/connect/telegram", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.POZY_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
chatId: "653dde71ee60143f359d3fdf",
profileId: "6a0b6573846efc28aaa9a3ff"
}),
});
const data = await res.json();
if (!res.ok) throw new Error(data?.error ?? `Request failed with status ${res.status}`);
console.log(data);import os
import requests
resp = requests.post(
"https://api.pozy.ai/v1/connect/telegram",
headers={"Authorization": f"Bearer {os.environ['POZY_API_KEY']}"},
json={
"chatId": "653dde71ee60143f359d3fdf",
"profileId": "6a0b6573846efc28aaa9a3ff",
},
timeout=30,
)
resp.raise_for_status()
print(resp.json())Response
200 on success
messagestringaccountobject_idstringplatformstringOne of
telegram.usernamestringdisplayNamestringisActivebooleanchatTypestringOne of
channel,group,supergroup,private.
200 response
{
"message": "Hello from Pozy",
"account": {
"_id": "635d87e261ae344ef27fd1df",
"platform": "telegram",
"username": "acme",
"displayName": "Acme",
"isActive": true,
"chatType": "channel"
}
}Errors
Errors use one shape: { error, type, code, param?, details? }. The ones you are most likely to see here:
| 400 | invalid_request_error | A parameter or body field is missing or invalid. param names it. |
| 401 | authentication_error | The API key is missing, revoked or expired. |
| 403 | permission_error | The key is read-only, scoped to other profiles, or has this resource group disabled. |
| 429 | rate_limit_error | Too many requests this minute. Wait for Retry-After seconds. |
Every code is listed in Errors.
More in Connect
GETGet OAuth connect URLPOSTComplete OAuth callbackGETConnect ads for a platformGETGet Shopify OAuth connect URLPOSTConnect a Shopify store with a custom-app Admin tokenGETGet Google Analytics OAuth connect URLGETList Google Analytics properties for a pending connectPOSTConnect the chosen Google Analytics propertyGETGet HubSpot OAuth connect URLGETGet WordPress.com OAuth connect URLGETGet Wix site install URLGETGet Webflow OAuth URLPOSTConnect Webflow with a site API tokenPOSTConnect self-hosted WordPress with an application passwordPATCHSet TikTok brand identityGETList Facebook pagesPOSTSelect Facebook pageGETList Pages with a linked Instagram accountPOSTSelect the Page whose Instagram account to connectGETList Google Business Profile locationsPOSTSelect Google Business Profile locationGETGet a phone handoffGETGet the saved welcome screenPUTSave the welcome screenGETList your OAuth appsPOSTAdd an OAuth appGETGet an OAuth appPATCHUpdate an OAuth appDELRemove an OAuth appPOSTCheck an OAuth app's keysGETGet pending OAuth dataGETList LinkedIn orgsPOSTSelect LinkedIn orgGETList Pinterest boardsPOSTSelect Pinterest boardGETList Snapchat profilesPOSTSelect Snapchat profilePOSTConnect Bluesky accountPOSTConnect an OpenAI Ads accountPOSTConnect a Whop accountPOSTConnect WhatsApp via credentialsGETList numbers for selectionPOSTComplete number selectionPOSTConnect WhatsApp from Embedded SignupGETGet Embedded Signup SDK configPOSTConnect a Discord channelGETList Slack channels for the channel pickerPOSTConnect a Slack channelGETGenerate Telegram codePATCHCheck Telegram statusGETRead a Facebook Page's webhook subscriptionPOSTRe-subscribe a Facebook Page to Pozy's webhooksGETList Facebook pagesPUTUpdate Facebook pageGETList LinkedIn orgsPUTSwitch LinkedIn account typeGETList Pinterest boardsPOSTCreate Pinterest boardPUTSet default Pinterest boardGETGet a YouTube video transcriptGETList YouTube playlistsPOSTCreate YouTube playlistPUTSet default YouTube playlistGETList Google Business Profile locationsPUTUpdate Google Business Profile locationPOSTAssign Google Business Profile location to another profileGETList Reddit subredditsPUTSet default subredditGETGet subreddit rulesPOSTVote on a Reddit post or commentGETList subreddit flairsPOSTSet Reddit post flairGETAdmin-consent link for a Microsoft tenant