X (anteriormente Twitter) é uma plataforma popular de mídia social que possibilita comunicação em tempo real, compartilhamento de conteúdo e engajamento com audiências em todo o mundo.
A integração do X no Zoen usa autenticação OAuth para conectar-se com segurança à X API, permitindo que seus agentes interajam com a plataforma de forma programática. Essa implementação OAuth garante acesso seguro aos recursos do X, mantendo a privacidade e a segurança do usuário.
Com a integração do X, seus agentes podem:
- Publicar conteúdo: Criar novos tweets, responder a conversas existentes ou compartilhar mídia diretamente a partir dos seus fluxos de trabalho
- Monitorar conversas: Acompanhar menções, palavras-chave ou contas específicas para se manter informado sobre discussões relevantes
- Engajar com audiências: Responder automaticamente a menções, mensagens diretas ou gatilhos específicos
- Analisar tendências: Coletar insights de tópicos em alta, hashtags ou padrões de engajamento de usuários
- Pesquisar informações: Buscar conteúdo específico, perfis de usuários ou conversas para informar decisões do agente
No Zoen, a integração do X habilita cenários sofisticados de automação de mídia social. Seus agentes podem monitorar menções à marca e responder de forma apropriada, agendar e publicar conteúdo com base em gatilhos específicos, conduzir social listening para pesquisa de mercado ou criar experiências interativas que abrangem IA conversacional e engajamento em mídia social. Ao conectar o Zoen ao X via OAuth, você pode construir agentes inteligentes que mantêm uma presença consistente e responsiva nas redes sociais, aderindo às políticas da plataforma e às melhores práticas de uso da API.
Integrate X into the workflow. Search tweets, manage bookmarks, follow/block/mute users, like and retweet, view trends, and more.
Create a new tweet, reply, or quote tweet on X
| Parameter | Type | Required | Description |
|---|
text | string | Yes | The text content of the tweet (max 280 characters) |
replyToTweetId | string | No | Tweet ID to reply to |
quoteTweetId | string | No | Tweet ID to quote |
mediaIds | string | No | Comma-separated media IDs to attach (up to 4) |
replySettings | string | No | Who can reply: "mentionedUsers", "following", "subscribers", or "verified" |
| Parameter | Type | Description |
|---|
id | string | The ID of the created tweet |
text | string | The text of the created tweet |
Delete a tweet authored by the authenticated user
| Parameter | Type | Required | Description |
|---|
tweetId | string | Yes | The ID of the tweet to delete |
| Parameter | Type | Description |
|---|
deleted | boolean | Whether the tweet was successfully deleted |
Search for recent tweets using keywords, hashtags, or advanced query operators
| Parameter | Type | Required | Description |
|---|
query | string | Yes | Search query (supports operators like "from:", "to:", "#hashtag", "has:images", "is:retweet", "lang:") |
maxResults | number | No | Maximum number of results (10-100, default 10) |
startTime | string | No | Oldest UTC timestamp in ISO 8601 format (e.g., 2024-01-01T00:00:00Z) |
endTime | string | No | Newest UTC timestamp in ISO 8601 format |
sinceId | string | No | Returns tweets with ID greater than this |
untilId | string | No | Returns tweets with ID less than this |
sortOrder | string | No | Sort order: "recency" or "relevancy" |
nextToken | string | No | Pagination token for next page of results |
| Parameter | Type | Description |
|---|
tweets | array | Array of tweets matching the search query |
↳ id | string | Tweet ID |
↳ text | string | Tweet text content |
↳ createdAt | string | Tweet creation timestamp |
↳ authorId | string | Author user ID |
↳ conversationId | string | Conversation thread ID |
↳ inReplyToUserId | string | User ID being replied to |
↳ publicMetrics | object | Engagement metrics |
↳ retweetCount | number | Number of retweets |
↳ replyCount | number | Number of replies |
↳ likeCount | number | Number of likes |
↳ quoteCount | number | Number of quotes |
includes | object | Additional data including user profiles |
↳ users | array | Array of user objects referenced in tweets |
↳ id | string | User ID |
↳ username | string | Username without @ symbol |
↳ name | string | Display name |
↳ description | string | User bio |
↳ profileImageUrl | string | Profile image URL |
↳ verified | boolean | Whether the user is verified |
↳ metrics | object | User statistics |
↳ followersCount | number | Number of followers |
↳ followingCount | number | Number of users following |
↳ tweetCount | number | Total number of tweets |
meta | object | Search metadata including result count and pagination tokens |
↳ resultCount | number | Number of results returned |
↳ newestId | string | ID of the newest tweet |
↳ oldestId | string | ID of the oldest tweet |
↳ nextToken | string | Pagination token for next page |
Look up multiple tweets by their IDs (up to 100)
| Parameter | Type | Required | Description |
|---|
ids | string | Yes | Comma-separated tweet IDs (up to 100) |
| Parameter | Type | Description |
|---|
tweets | array | Array of tweets matching the provided IDs |
↳ id | string | Tweet ID |
↳ text | string | Tweet text content |
↳ createdAt | string | Tweet creation timestamp |
↳ authorId | string | Author user ID |
↳ conversationId | string | Conversation thread ID |
↳ inReplyToUserId | string | User ID being replied to |
↳ publicMetrics | object | Engagement metrics |
↳ retweetCount | number | Number of retweets |
↳ replyCount | number | Number of replies |
↳ likeCount | number | Number of likes |
↳ quoteCount | number | Number of quotes |
includes | object | Additional data including user profiles |
↳ users | array | Array of user objects referenced in tweets |
↳ id | string | User ID |
↳ username | string | Username without @ symbol |
↳ name | string | Display name |
↳ description | string | User bio |
↳ profileImageUrl | string | Profile image URL |
↳ verified | boolean | Whether the user is verified |
↳ metrics | object | User statistics |
↳ followersCount | number | Number of followers |
↳ followingCount | number | Number of users following |
↳ tweetCount | number | Total number of tweets |
Get tweets that quote a specific tweet
| Parameter | Type | Required | Description |
|---|
tweetId | string | Yes | The tweet ID to get quote tweets for |
maxResults | number | No | Maximum number of results (10-100, default 10) |
paginationToken | string | No | Pagination token for next page |
| Parameter | Type | Description |
|---|
tweets | array | Array of quote tweets |
↳ id | string | Tweet ID |
↳ text | string | Tweet text content |
↳ createdAt | string | Tweet creation timestamp |
↳ authorId | string | Author user ID |
↳ conversationId | string | Conversation thread ID |
↳ inReplyToUserId | string | User ID being replied to |
↳ publicMetrics | object | Engagement metrics |
↳ retweetCount | number | Number of retweets |
↳ replyCount | number | Number of replies |
↳ likeCount | number | Number of likes |
↳ quoteCount | number | Number of quotes |
meta | object | Pagination metadata |
↳ resultCount | number | Number of results returned |
↳ nextToken | string | Token for next page |
Hide or unhide a reply to a tweet authored by the authenticated user
| Parameter | Type | Required | Description |
|---|
tweetId | string | Yes | The reply tweet ID to hide or unhide |
hidden | boolean | Yes | Set to true to hide the reply, false to unhide |
| Parameter | Type | Description |
|---|
hidden | boolean | Whether the reply is now hidden |
Get tweets authored by a specific user
| Parameter | Type | Required | Description |
|---|
userId | string | Yes | The user ID whose tweets to retrieve |
maxResults | number | No | Maximum number of results (5-100, default 10) |
paginationToken | string | No | Pagination token for next page of results |
startTime | string | No | Oldest UTC timestamp in ISO 8601 format |
endTime | string | No | Newest UTC timestamp in ISO 8601 format |
sinceId | string | No | Returns tweets with ID greater than this |
untilId | string | No | Returns tweets with ID less than this |
exclude | string | No | Comma-separated types to exclude: "retweets", "replies" |
| Parameter | Type | Description |
|---|
tweets | array | Array of tweets by the user |
↳ id | string | Tweet ID |
↳ text | string | Tweet text content |
↳ createdAt | string | Tweet creation timestamp |
↳ authorId | string | Author user ID |
↳ conversationId | string | Conversation thread ID |
↳ inReplyToUserId | string | User ID being replied to |
↳ publicMetrics | object | Engagement metrics |
↳ retweetCount | number | Number of retweets |
↳ replyCount | number | Number of replies |
↳ likeCount | number | Number of likes |
↳ quoteCount | number | Number of quotes |
includes | object | Additional data including user profiles |
↳ users | array | Array of user objects referenced in tweets |
↳ id | string | User ID |
↳ username | string | Username without @ symbol |
↳ name | string | Display name |
↳ description | string | User bio |
↳ profileImageUrl | string | Profile image URL |
↳ verified | boolean | Whether the user is verified |
↳ metrics | object | User statistics |
↳ followersCount | number | Number of followers |
↳ followingCount | number | Number of users following |
↳ tweetCount | number | Total number of tweets |
meta | object | Pagination metadata |
↳ resultCount | number | Number of results returned |
↳ newestId | string | ID of the newest tweet |
↳ oldestId | string | ID of the oldest tweet |
↳ nextToken | string | Token for next page |
↳ previousToken | string | Token for previous page |
Get tweets that mention a specific user
| Parameter | Type | Required | Description |
|---|
userId | string | Yes | The user ID whose mentions to retrieve |
maxResults | number | No | Maximum number of results (5-100, default 10) |
paginationToken | string | No | Pagination token for next page of results |
startTime | string | No | Oldest UTC timestamp in ISO 8601 format |
endTime | string | No | Newest UTC timestamp in ISO 8601 format |
sinceId | string | No | Returns tweets with ID greater than this |
untilId | string | No | Returns tweets with ID less than this |
| Parameter | Type | Description |
|---|
tweets | array | Array of tweets mentioning the user |
↳ id | string | Tweet ID |
↳ text | string | Tweet text content |
↳ createdAt | string | Tweet creation timestamp |
↳ authorId | string | Author user ID |
↳ conversationId | string | Conversation thread ID |
↳ inReplyToUserId | string | User ID being replied to |
↳ publicMetrics | object | Engagement metrics |
↳ retweetCount | number | Number of retweets |
↳ replyCount | number | Number of replies |
↳ likeCount | number | Number of likes |
↳ quoteCount | number | Number of quotes |
includes | object | Additional data including user profiles |
↳ users | array | Array of user objects referenced in tweets |
↳ id | string | User ID |
↳ username | string | Username without @ symbol |
↳ name | string | Display name |
↳ description | string | User bio |
↳ profileImageUrl | string | Profile image URL |
↳ verified | boolean | Whether the user is verified |
↳ metrics | object | User statistics |
↳ followersCount | number | Number of followers |
↳ followingCount | number | Number of users following |
↳ tweetCount | number | Total number of tweets |
meta | object | Pagination metadata |
↳ resultCount | number | Number of results returned |
↳ newestId | string | ID of the newest tweet |
↳ oldestId | string | ID of the oldest tweet |
↳ nextToken | string | Token for next page |
↳ previousToken | string | Token for previous page |
Get the reverse chronological home timeline for the authenticated user
| Parameter | Type | Required | Description |
|---|
userId | string | Yes | The authenticated user ID |
maxResults | number | No | Maximum number of results (1-100, default 10) |
paginationToken | string | No | Pagination token for next page of results |
startTime | string | No | Oldest UTC timestamp in ISO 8601 format |
endTime | string | No | Newest UTC timestamp in ISO 8601 format |
sinceId | string | No | Returns tweets with ID greater than this |
untilId | string | No | Returns tweets with ID less than this |
exclude | string | No | Comma-separated types to exclude: "retweets", "replies" |
| Parameter | Type | Description |
|---|
tweets | array | Array of timeline tweets |
↳ id | string | Tweet ID |
↳ text | string | Tweet text content |
↳ createdAt | string | Tweet creation timestamp |
↳ authorId | string | Author user ID |
↳ conversationId | string | Conversation thread ID |
↳ inReplyToUserId | string | User ID being replied to |
↳ publicMetrics | object | Engagement metrics |
↳ retweetCount | number | Number of retweets |
↳ replyCount | number | Number of replies |
↳ likeCount | number | Number of likes |
↳ quoteCount | number | Number of quotes |
includes | object | Additional data including user profiles |
↳ users | array | Array of user objects referenced in tweets |
↳ id | string | User ID |
↳ username | string | Username without @ symbol |
↳ name | string | Display name |
↳ description | string | User bio |
↳ profileImageUrl | string | Profile image URL |
↳ verified | boolean | Whether the user is verified |
↳ metrics | object | User statistics |
↳ followersCount | number | Number of followers |
↳ followingCount | number | Number of users following |
↳ tweetCount | number | Total number of tweets |
meta | object | Pagination metadata |
↳ resultCount | number | Number of results returned |
↳ newestId | string | ID of the newest tweet |
↳ oldestId | string | ID of the oldest tweet |
↳ nextToken | string | Token for next page |
↳ previousToken | string | Token for previous page |
Like or unlike a tweet on X
| Parameter | Type | Required | Description |
|---|
userId | string | Yes | The authenticated user ID |
tweetId | string | Yes | The tweet ID to like or unlike |
action | string | Yes | Action to perform: "like" or "unlike" |
| Parameter | Type | Description |
|---|
liked | boolean | Whether the tweet is now liked |
Retweet or unretweet a tweet on X
| Parameter | Type | Required | Description |
|---|
userId | string | Yes | The authenticated user ID |
tweetId | string | Yes | The tweet ID to retweet or unretweet |
action | string | Yes | Action to perform: "retweet" or "unretweet" |
| Parameter | Type | Description |
|---|
retweeted | boolean | Whether the tweet is now retweeted |
Get tweets liked by a specific user
| Parameter | Type | Required | Description |
|---|
userId | string | Yes | The user ID whose liked tweets to retrieve |
maxResults | number | No | Maximum number of results (5-100) |
paginationToken | string | No | Pagination token for next page |
| Parameter | Type | Description |
|---|
tweets | array | Array of liked tweets |
↳ id | string | Tweet ID |
↳ text | string | Tweet content |
↳ createdAt | string | Creation timestamp |
↳ authorId | string | Author user ID |
meta | object | Pagination metadata |
↳ resultCount | number | Number of results returned |
↳ nextToken | string | Token for next page |
Get the list of users who liked a specific tweet
| Parameter | Type | Required | Description |
|---|
tweetId | string | Yes | The tweet ID to get liking users for |
maxResults | number | No | Maximum number of results (1-100, default 100) |
paginationToken | string | No | Pagination token for next page |
| Parameter | Type | Description |
|---|
users | array | Array of users who liked the tweet |
↳ id | string | User ID |
↳ username | string | Username without @ symbol |
↳ name | string | Display name |
↳ description | string | User bio |
↳ profileImageUrl | string | Profile image URL |
↳ verified | boolean | Whether the user is verified |
↳ metrics | object | User statistics |
↳ followersCount | number | Number of followers |
↳ followingCount | number | Number of users following |
↳ tweetCount | number | Total number of tweets |
meta | object | Pagination metadata |
↳ resultCount | number | Number of results returned |
↳ nextToken | string | Token for next page |
Get the list of users who retweeted a specific tweet
| Parameter | Type | Required | Description |
|---|
tweetId | string | Yes | The tweet ID to get retweeters for |
maxResults | number | No | Maximum number of results (1-100, default 100) |
paginationToken | string | No | Pagination token for next page |
| Parameter | Type | Description |
|---|
users | array | Array of users who retweeted the tweet |
↳ id | string | User ID |
↳ username | string | Username without @ symbol |
↳ name | string | Display name |
↳ description | string | User bio |
↳ profileImageUrl | string | Profile image URL |
↳ verified | boolean | Whether the user is verified |
↳ metrics | object | User statistics |
↳ followersCount | number | Number of followers |
↳ followingCount | number | Number of users following |
↳ tweetCount | number | Total number of tweets |
meta | object | Metadata |
↳ resultCount | number | Number of results returned |
↳ nextToken | string | Token for next page |
Get bookmarked tweets for the authenticated user
| Parameter | Type | Required | Description |
|---|
userId | string | Yes | The authenticated user ID |
maxResults | number | No | Maximum number of results (1-100) |
paginationToken | string | No | Pagination token for next page of results |
| Parameter | Type | Description |
|---|
tweets | array | Array of bookmarked tweets |
↳ id | string | Tweet ID |
↳ text | string | Tweet text content |
↳ createdAt | string | Tweet creation timestamp |
↳ authorId | string | Author user ID |
↳ conversationId | string | Conversation thread ID |
↳ inReplyToUserId | string | User ID being replied to |
↳ publicMetrics | object | Engagement metrics |
↳ retweetCount | number | Number of retweets |
↳ replyCount | number | Number of replies |
↳ likeCount | number | Number of likes |
↳ quoteCount | number | Number of quotes |
includes | object | Additional data including user profiles |
↳ users | array | Array of user objects referenced in tweets |
↳ id | string | User ID |
↳ username | string | Username without @ symbol |
↳ name | string | Display name |
↳ description | string | User bio |
↳ profileImageUrl | string | Profile image URL |
↳ verified | boolean | Whether the user is verified |
↳ metrics | object | User statistics |
↳ followersCount | number | Number of followers |
↳ followingCount | number | Number of users following |
↳ tweetCount | number | Total number of tweets |
meta | object | Pagination metadata |
↳ resultCount | number | Number of results returned |
↳ newestId | string | ID of the newest tweet |
↳ oldestId | string | ID of the oldest tweet |
↳ nextToken | string | Token for next page |
↳ previousToken | string | Token for previous page |
Bookmark a tweet for the authenticated user
| Parameter | Type | Required | Description |
|---|
userId | string | Yes | The authenticated user ID |
tweetId | string | Yes | The tweet ID to bookmark |
| Parameter | Type | Description |
|---|
bookmarked | boolean | Whether the tweet was successfully bookmarked |
Remove a tweet from the authenticated user's bookmarks
| Parameter | Type | Required | Description |
|---|
userId | string | Yes | The authenticated user ID |
tweetId | string | Yes | The tweet ID to remove from bookmarks |
| Parameter | Type | Description |
|---|
bookmarked | boolean | Whether the tweet is still bookmarked (should be false after deletion) |
Get the authenticated user's profile information
| Parameter | Type | Required | Description |
|---|
| Parameter | Type | Description |
|---|
user | object | Authenticated user profile |
↳ id | string | User ID |
↳ username | string | Username without @ symbol |
↳ name | string | Display name |
↳ description | string | User bio |
↳ profileImageUrl | string | Profile image URL |
↳ verified | boolean | Whether the user is verified |
↳ metrics | object | User statistics |
↳ followersCount | number | Number of followers |
↳ followingCount | number | Number of users following |
↳ tweetCount | number | Total number of tweets |
Search for X users by name, username, or bio
| Parameter | Type | Required | Description |
|---|
query | string | Yes | Search keyword (1-50 chars, matches name, username, or bio) |
maxResults | number | No | Maximum number of results (1-1000, default 100) |
nextToken | string | No | Pagination token for next page |
| Parameter | Type | Description |
|---|
users | array | Array of users matching the search query |
↳ id | string | User ID |
↳ username | string | Username without @ symbol |
↳ name | string | Display name |
↳ description | string | User bio |
↳ profileImageUrl | string | Profile image URL |
↳ verified | boolean | Whether the user is verified |
↳ metrics | object | User statistics |
↳ followersCount | number | Number of followers |
↳ followingCount | number | Number of users following |
↳ tweetCount | number | Total number of tweets |
meta | object | Search metadata |
↳ resultCount | number | Number of results returned |
↳ nextToken | string | Pagination token for next page |
Get the list of followers for a user
| Parameter | Type | Required | Description |
|---|
userId | string | Yes | The user ID whose followers to retrieve |
maxResults | number | No | Maximum number of results (1-1000, default 100) |
paginationToken | string | No | Pagination token for next page |
| Parameter | Type | Description |
|---|
users | array | Array of follower user profiles |
↳ id | string | User ID |
↳ username | string | Username without @ symbol |
↳ name | string | Display name |
↳ description | string | User bio |
↳ profileImageUrl | string | Profile image URL |
↳ verified | boolean | Whether the user is verified |
↳ metrics | object | User statistics |
↳ followersCount | number | Number of followers |
↳ followingCount | number | Number of users following |
↳ tweetCount | number | Total number of tweets |
meta | object | Pagination metadata |
↳ resultCount | number | Number of results returned |
↳ nextToken | string | Token for next page |
Get the list of users that a user is following
| Parameter | Type | Required | Description |
|---|
userId | string | Yes | The user ID whose following list to retrieve |
maxResults | number | No | Maximum number of results (1-1000, default 100) |
paginationToken | string | No | Pagination token for next page |
| Parameter | Type | Description |
|---|
users | array | Array of users being followed |
↳ id | string | User ID |
↳ username | string | Username without @ symbol |
↳ name | string | Display name |
↳ description | string | User bio |
↳ profileImageUrl | string | Profile image URL |
↳ verified | boolean | Whether the user is verified |
↳ metrics | object | User statistics |
↳ followersCount | number | Number of followers |
↳ followingCount | number | Number of users following |
↳ tweetCount | number | Total number of tweets |
meta | object | Pagination metadata |
↳ resultCount | number | Number of results returned |
↳ nextToken | string | Token for next page |
Follow or unfollow a user on X
| Parameter | Type | Required | Description |
|---|
userId | string | Yes | The authenticated user ID |
targetUserId | string | Yes | The user ID to follow or unfollow |
action | string | Yes | Action to perform: "follow" or "unfollow" |
| Parameter | Type | Description |
|---|
following | boolean | Whether you are now following the user |
pendingFollow | boolean | Whether the follow request is pending (for protected accounts) |
Block or unblock a user on X
| Parameter | Type | Required | Description |
|---|
userId | string | Yes | The authenticated user ID |
targetUserId | string | Yes | The user ID to block or unblock |
action | string | Yes | Action to perform: "block" or "unblock" |
| Parameter | Type | Description |
|---|
blocking | boolean | Whether you are now blocking the user |
Get the list of users blocked by the authenticated user
| Parameter | Type | Required | Description |
|---|
userId | string | Yes | The authenticated user ID |
maxResults | number | No | Maximum number of results (1-1000) |
paginationToken | string | No | Pagination token for next page |
| Parameter | Type | Description |
|---|
users | array | Array of blocked user profiles |
↳ id | string | User ID |
↳ username | string | Username without @ symbol |
↳ name | string | Display name |
↳ description | string | User bio |
↳ profileImageUrl | string | Profile image URL |
↳ verified | boolean | Whether the user is verified |
↳ metrics | object | User statistics |
↳ followersCount | number | Number of followers |
↳ followingCount | number | Number of users following |
↳ tweetCount | number | Total number of tweets |
meta | object | Pagination metadata |
↳ resultCount | number | Number of results returned |
↳ nextToken | string | Token for next page |
Mute or unmute a user on X
| Parameter | Type | Required | Description |
|---|
userId | string | Yes | The authenticated user ID |
targetUserId | string | Yes | The user ID to mute or unmute |
action | string | Yes | Action to perform: "mute" or "unmute" |
| Parameter | Type | Description |
|---|
muting | boolean | Whether you are now muting the user |
Get trending topics for a specific location by WOEID (e.g., 1 for worldwide, 23424977 for US)
| Parameter | Type | Required | Description |
|---|
woeid | string | Yes | Yahoo Where On Earth ID (e.g., "1" for worldwide, "23424977" for US, "23424975" for UK) |
maxTrends | number | No | Maximum number of trends to return (1-50, default 20) |
| Parameter | Type | Description |
|---|
trends | array | Array of trending topics |
↳ trendName | string | Name of the trending topic |
↳ tweetCount | number | Number of tweets for this trend |
Get personalized trending topics for the authenticated user
| Parameter | Type | Required | Description |
|---|
| Parameter | Type | Description |
|---|
trends | array | Array of personalized trending topics |
↳ trendName | string | Name of the trending topic |
↳ postCount | number | Number of posts for this trend |
↳ category | string | Category of the trend |
↳ trendingSince | string | ISO 8601 timestamp of when the topic started trending |
Get the API usage data for your X project
| Parameter | Type | Required | Description |
|---|
days | number | No | Number of days of usage data to return (1-90, default 7) |
| Parameter | Type | Description |
|---|
capResetDay | number | Day of month when usage cap resets |
projectId | string | The project ID |
projectCap | number | The project tweet consumption cap |
projectUsage | number | Total tweets consumed in current period |
dailyProjectUsage | array | Daily project usage breakdown |
↳ date | string | Usage date in ISO 8601 format |
↳ usage | number | Number of tweets consumed |
dailyClientAppUsage | array | Daily per-app usage breakdown |
↳ clientAppId | string | Client application ID |
↳ usage | array | Daily usage entries for this app |
↳ date | string | Usage date in ISO 8601 format |
↳ usage | number | Number of tweets consumed |