TweetsmashDocs
LoginDashboard
Getting Started
Getting Started
For AI agents
OverviewConnect your agentAgent Skills
MCP
MCP Integration
Bookmarks
GETFetch Saved PostsGETGet a Bookmark (full content)
Labels
GETManage LabelsPOSTAdd Labels to TweetsPOSTRemove Labels from TweetsPOSTAdd Labels by Filter (bulk)
Smart Views
GETList Smart ViewsGETGet / Update / Delete a Smart ViewGETGet Smart View Bookmarks
Exports
POSTExport Bookmarks (PDF / CSV / JSON)
Integrations
n8n IntegrationWebhook Integration
API Docs/Get Started/Introduction
API Reference

Getting Started with TweetsMash API

The TweetsMash API is a REST API at api.tweetsmash.com/v1 for your 𝕏 (Twitter) bookmarks and labels. Authenticate with a Bearer token and make your first request in a few minutes.

Base URL β€” all requests go to https://api.tweetsmash.com. Include your API key in the Authorization header on every request.

Before you start

Three things decide whether the API and MCP server will work for you:

  • A plan that includes the API. The REST API, webhooks and the MCP server are part of the Yearly Pass. Free and Reader accounts can still call the API, but responses are limited to a small number of bookmarks with no pagination or advanced filters, and include an upgrade hint.
  • An API token. Create one under Developer API in the app. Treat it like a password β€” it grants full access to your library. If you paste it somewhere public, revoke and regenerate it.
  • Bookmarks (and, for some tools, a connected 𝕏 account). Import first β€” the API reads your Tweetsmash library, not 𝕏 directly. Tools that touch 𝕏 Lists or force a fresh pull additionally need your 𝕏 account connected at Connect 𝕏. Ask the MCP server get_connection_status to check this at any time.

Authentication

All API requests require authentication using your API key. Follow these steps to get your API key:

1

Visit the API Integration Page

Go to the TweetsMash API integration page to generate your API key.

Open API Integration Page
2

Generate Your API Key

Once on the integration page, you'll see a button to generate your API key. Click it to create a new key.

Note: Your API key is sensitive information. Keep it secure and never share it publicly.
3

Use Your API Key

Include your API key in the Authorization header of your requests:

β€ΊAuthorization: Bearer YOUR_API_KEY_HERE

Quick Start Example

Here's a simple example of how to fetch your bookmarks using cURL:

cURL Command:

cURL
curl -X GET "https://api.tweetsmash.com/v1/bookmarks" \
  -H "Authorization: Bearer YOUR_API_KEY_HERE" \
  -H "Content-Type: application/json"

Response Example:

JSON
{
  "status": true,
  "data": [
    {
      "post_id": "1938682607145034084",
      "tweet_details": {
        "text": "Your tweet content here...",
        "link": "https://twitter.com/username/status/1938682607145034084",
        "posted_at": "2025-06-27T19:35:27+00:00"
      },
      "author_details": {
        "name": "Author Name",
        "username": "username"
      }
    }
  ],
  "meta": {
    "next_cursor": "MTc1OTYxNw==",
    "limit": 20,
    "total_count": 396
  }
}

Rate Limits

To ensure fair usage, API requests are subject to rate limits:

100 requests per hour per API key

Error Handling

The API returns standard HTTP status codes and error messages:

Status
Meaning
401
Unauthorized - Invalid or missing API key
402
Subscription Required - Upgrade your plan
429
Too Many Requests - Rate limit exceeded
500
Internal Server Error - Something went wrong

Troubleshooting

Status
Meaning
401Unauthorized
The token is missing, mistyped, or was revoked. Send it as "Authorization: Bearer <token>", or as ?token= in the MCP URL. Regenerate it under Developer API if unsure.
402Upgrade needed
The endpoint or filter needs a paid plan. The body carries a code (e.g. FILTER_NOT_ALLOWED, PAGINATION_NOT_ALLOWED) and an upgrade_url. Upgrade, or drop the paid filter.
404MCP transport
"This server does not support HTTP transport" means the MCP URL lost its path. Use https://mcp.tweetsmash.com/api/mcp?token=… β€” the bare host returns the app 404 page.
200Empty result
Usually the query is too narrow rather than data missing. Widen the date range, drop quotes, search by author, or confirm the bookmarks are imported β€” get_bookmark_count is a quick sanity check.
429Rate limited
Back off and retry. Prefer a single by-filter call (e.g. tag_bookmarks_by_filter) over looping page by page.
Working with an agent? Point it at search_docs first β€” it answers product questions (plans, limits, sync, exports) from the same help corpus support uses, so the agent can resolve "how do I…" without guessing.

Next Steps

Now that you have your API key, explore the available endpoints:

Bookmarks

Fetch and manage your saved tweets with filtering and pagination options.
View Documentation β†’

Labels

Manage labels for organizing your bookmarks and content.
View Documentation β†’