{"uid":"cap_EhqkRXMlnonukKWMJd2AX","slug":"twitr-sh-x-twitter-write-api-67d0e61a","name":"twitr.sh X/Twitter Write API","description":"Pay-per-call X/Twitter API for AI agents. Read tweets, search, monitor accounts in real time, and post — paid in USDC via x402. No signup, no API keys.","url":"https://twitr.sh/api/tools/x_write?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"text":{"type":"string","description":"post|reply|send_dm: the message body."},"action":{"enum":["post","reply","like","unlike","retweet","unretweet","follow","unfollow","delete_tweet","send_dm","remove_follower","upload_media"],"type":"string","description":"Which write to perform."},"account":{"type":"string","description":"A connected X handle owned by this wallet (no @)."},"media_ids":{"type":"array","items":{"type":"string"},"description":"send_dm: optional uploaded media ids to attach."},"media_url":{"type":"string","description":"upload_media: public URL of the file to upload; returns a media_id."},"community_id":{"type":"string","description":"post: optional community to post into."},"is_note_tweet":{"type":"boolean","description":"post: long-form note tweet."},"target_user_id":{"type":"string","description":"follow|unfollow|send_dm|remove_follower: the numeric X user id of the target (not the @handle). Get it from x_read get-user."},"target_tweet_id":{"type":"string","description":"like|unlike|retweet|unretweet|delete_tweet: the target tweet ID."},"reply_to_tweet_id":{"type":"string","description":"reply: the tweet being replied to."}}},"responseSchema":{"type":"json","example":{"items":[{"id":"1893710452812718080","url":"https://x.com/myhandle/status/1893710452812718080"}],"runId":"tw_example","payment":{"amount":"0.036000","currency":"USD","protocol":"x402"},"duration":1}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.036","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.036/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.036","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.036","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_lZnf83WiKkpzf28YdIO0C","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.036","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Performs write actions on X/Twitter — post, reply, like, retweet, follow, DM, and more — paid per-call in USDC with no API key required","exampleAgentPrompt":"Post a tweet from my X account @myhandle saying 'Excited to announce our new product launch — stay tuned for more details!'","exampleUseCases":[{"title":"Automated engagement bot","prompt":"Like the tweet with ID 1893710452812718080 and then retweet it using my @myhandle account."},{"title":"AI agent customer reply","prompt":"Reply to tweet ID 1893710452812718080 from my @supportbot account saying 'Thanks for reaching out! Our team will get back to you within 24 hours.'"},{"title":"Influencer DM outreach","prompt":"Send a direct message from my @myhandle account to user ID 12345678 saying 'Hey, we'd love to collaborate on an upcoming campaign — interested?'"}],"resultDescription":"Returns a JSON object containing an items array with the resulting tweet's ID and URL, a runId for tracing, a payment record showing amount charged in USD via x402, and the call duration in milliseconds.","failureModes":["Invalid or unconnected X handle — the wallet does not own the specified account","Missing required field for the chosen action (e.g. no reply_to_tweet_id for a reply action)","Target tweet or user not found — invalid tweet ID or user ID","Rate limit exceeded on the underlying X API — temporary failure","Payment failure — insufficient USDC balance or x402 protocol error","Attempting to like an already-liked tweet or follow an already-followed user"],"whenToPreferThis":"Choose this endpoint when you need to perform write operations on X/Twitter without managing API keys or OAuth credentials, and you want pay-per-call billing in USDC. Prefer this over direct X API integration when building AI agents that need to post, engage, or DM programmatically with minimal setup friction.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-09T18:42:51.956Z","isFirstParty":false,"canonicalSlug":"twitr-sh-x-twitter-write-api-67d0e61a"}