Developer API
Paste API for Bots, Scripts and Automation
Create, update and manage pastes from your own scripts, bots and workflows. PasterLink's Creator Mode API uses Bearer-token authentication and includes paste management, analytics and creator endpoints.
API access requires Creator Mode.
Create Your First Paste with the API
You need an API key from a Creator Mode account. Send it as a Bearer token and POST a JSON body to /api/v1/pastes.
- Create an API key in Creator Dashboard → API Keys and copy it. It is shown once.
- Send the request below. Only body is required. The optional fields are title (up to 255 characters), password and as_button, and body can be up to 500,000 characters.
- Read the url field of the 201 response and share it.
Request
curl -X POST https://pasterlink.com/api/v1/pastes \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"body": "Hello from the PasterLink API",
"title": "My automated paste"
}'Response (201 Created)
{
"id": 1,
"slug": "k3Xw9QaB",
"url": "https://pasterlink.com/paste/k3Xw9QaB",
"title": "My automated paste",
"body": "<p>Hello from the PasterLink API</p>",
"as_button": false,
"status": null,
"seen_nbr": 0,
"password_protected": false,
"created_at": "2026-01-15T09:30:00+00:00",
"updated_at": "2026-01-15T09:30:00+00:00"
}Values such as id, slug and the timestamps are examples. Plain text is wrapped in paragraph markup when it is saved, so body comes back as HTML. The create response reports status as null. Fetching the paste afterwards returns its status, which is active for a new paste.
What You Can Automate with the API
API v1 covers paste management plus read access to analytics, profile and earnings data. It does not include webhooks or an SDK.
Create pastes
POST /api/v1/pastesSend a body (plain text or HTML) with an optional title, an optional password and an optional as_button flag. The response returns the paste and its public URL.
Manage pastes
GET /api/v1/pastesGET /api/v1/pastes/{slug}PATCH /api/v1/pastes/{slug}DELETE /api/v1/pastes/{slug}List your pastes 25 at a time, fetch one by slug, update its title, body, password or as_button flag, or delete it. These endpoints only reach pastes owned by the key’s account.
Analytics
GET /api/v1/analyticsTotal views and unique visitors for the period you choose (7days, 30days or 6months), a daily series, and breakdowns by country, device and referrer.
Creator profile
GET /api/v1/profileYour account and Creator Mode details, including total paste views, the unlock threshold and the profile bio.
Bulk publishing
Python bulk uploaderA ready-to-run Python script that reads upload.txt (one paste per line) or upload.csv (title and body columns), creates each paste through the API and writes the new URLs to a file. If the API answers 429, it waits for the Retry-After time and retries up to 5 times before it stops and saves the URLs created so far.
Earnings
GET /api/v1/earningsReturns an enabled flag and a summary of finalized amounts, available balance and payouts. Earnings tools are optional and their availability can vary. Having access to the endpoint does not mean an account earns money.
Built for Real Automation Workflows
Telegram, Discord and community bots
When a reply is too long for a chat message, the bot creates a paste and posts the share URL instead. The bot keeps its API key on the server. See the Telegram paste tool for the full workflow.
CI/CD logs and build output
Send long diagnostic output to a paste and post only the link in the chat or the ticket. Redact tokens, hostnames and other sensitive lines first.
Scripts and command-line workflows
Publish generated text from a cron job, a shell script or a small program with one authenticated HTTP request.
Bulk content migration
Move a list of text entries into PasterLink with the Python uploader, which reads TXT or CSV input and records the URL of every paste it creates.
Creator publishing workflows
Automate paste creation while keeping the account features around it: paste management, the creator profile and the analytics endpoint.
Support and customer-service tooling
Turn a long diagnostic dump into a shareable paste and reference its link in the reply. Add a password when the content should not be open to anyone with the link.
Safety note: Do not publish passwords, API keys or other secrets in public pastes. PasterLink has no private visibility setting, so anyone with a paste's link can open it unless you add a password.
How the PasterLink API Works
These are the concrete behaviors you can rely on when you build against API v1.
- Protocol and base URL
- REST-style JSON over HTTPS at
https://pasterlink.com/api/v1. - Authentication
- Every request sends an
Authorization: Bearer YOUR_API_KEYheader. - Versioning
- The version is part of the path (/api/v1). Every response carries an X-API-Version header. When a version is deprecated, its responses also carry Sunset and Deprecation: true headers. The versioning notes in the reference explain the policy.
- Error format
- Errors use one JSON envelope,
{"error": {"code": "...", "message": "..."}}, with codes such as UNAUTHORIZED, FORBIDDEN, NOT_FOUND and VALIDATION_FAILED. Validation errors (422) add a details object with one entry per field. - Rate limit
- All /api/v1 routes share a limit of 60 requests per minute for each API key. Going over it returns 429 with a Retry-After header.
- Safe retries
- POST /api/v1/pastes accepts an optional Idempotency-Key header. Repeating the same key with the same payload within 60 seconds returns the original response with an Idempotency-Replay: true header, and the same key with a different payload returns 409.
- Ownership
- A key acts as its owner. Lists only return that account’s pastes. Reading a paste that belongs to another account returns 404, and changing or deleting one returns 403.
- Passwords
- Responses include a password_protected boolean. The password itself is stored as a hash and is never returned.
API Access Through Creator Mode
A PasterLink account on its own does not include API access. The API is part of Creator Mode.
- Creator Mode unlocks when the pastes on your account reach 1,000 total views.
- Once it is unlocked, you create and revoke API keys in Creator Dashboard → API Keys.
- The API has no separate price. Its routes check for Creator Mode, not for a subscription.
API vs Web Paste Creation
The same paste can be created in three ways on PasterLink. This table compares them.
| Capability | Browser guest | Account on the web | Creator Mode API |
|---|---|---|---|
| Create a paste | Yes. A short bot check runs first. | Yes | Yes, with POST /api/v1/pastes |
| Account required | No | Yes | Yes. A Creator Mode account and a Bearer token. |
| Custom paste URL | No. Guest pastes get a generated address. | Yes | No. The API generates the address and ignores a slug field. |
| Password protection | Yes | Yes | Yes, with the password field. |
| Edit later | No | Yes | Yes, with PATCH. |
| Delete later | No | Yes | Yes, with DELETE. |
| Analytics | No | Yes, with Creator Mode. | Yes, with GET /api/v1/analytics. |
| Automation | No. Web form only. | Manual, in the browser. | Yes. Any HTTP client can call it. |
API Security Basics
- Send the key only in the Authorization header, and keep it on the server. Never put an API key in browser JavaScript, a mobile app or a public repository.
- PasterLink stores only a SHA-256 hash of each key. The plaintext key is shown once, when you create it, so store it in your secrets manager straight away.
- You can revoke any key in Creator Dashboard → API Keys. A revoked key returns 401 on its next request.
- A missing, unknown, revoked or expired key returns 401 UNAUTHORIZED. Accounts without Creator Mode cannot create API keys.
- The rate limit is 60 requests per minute per key, with 429 and Retry-After when exceeded.
- A key has the full access of its Creator Mode account to the endpoints above. There are no OAuth flows, scopes or IP allow-lists.
Comparing Paste APIs
If you're comparing paste APIs, PasterLink offers a versioned REST API for paste management plus creator analytics and profile data. Every service sets its own limits and rules, so check each one's documentation.
Frequently asked questions
Does PasterLink have a paste API?
Yes. The REST API at https://pasterlink.com/api/v1 creates, lists, retrieves, updates and deletes your pastes, and returns analytics, profile and earnings data. It authenticates with a Bearer token and is part of Creator Mode, so guests and accounts without Creator Mode cannot use it. The API reference lists every endpoint.
Is the PasterLink API free?
There is no separate API fee or plan. The API routes check for Creator Mode and do not check for a paid subscription. Creator Mode unlocks once the pastes on your account reach 1,000 total views. A PasterLink account on its own does not include API access.
Can I create a paste without an API key?
On the website, yes. Guests can create a paste from the create page after a short bot check. The API itself requires a Bearer token from a Creator Mode account, so scripts and bots need an API key.
Can I password-protect a paste through the API?
Yes. Send a password string of up to 255 characters when you create the paste. The response shows password_protected: true and never returns the password. You can change it later with PATCH, or send null to remove it.
Can the API edit and delete pastes?
Yes. PATCH /api/v1/pastes/{slug} updates the title, body, password or as_button flag, and DELETE /api/v1/pastes/{slug} removes the paste. Both only work on pastes your account owns, and the slug cannot be changed.
Does the API provide analytics?
Yes. GET /api/v1/analytics returns total views and unique visitors, a daily series, and breakdowns by country, device and referrer. Pass period=7days, 30days or 6months. The default is 7days, and the country and referrer lists show the top 20.
What is the API base URL?
https://pasterlink.com/api/v1. All endpoints, such as https://pasterlink.com/api/v1/pastes, sit under this path.
What happens if my token is compromised?
Revoke it in Creator Dashboard → API Keys. The key stops working immediately and returns 401, then you can create a new key and update your scripts. PasterLink stores only a hash, so an old key cannot be shown again. See the security notes in the reference.
Is there an SDK?
There is no official SDK currently; the API is standard HTTP/JSON. Any HTTP client works, such as curl, Python requests or fetch.
Is there a bulk uploader?
Yes. The API documentation page offers a Python script as a ZIP download. Put your API key in api_key.txt, then list one paste per line in upload.txt or use upload.csv with title and body columns. It creates one paste per entry and writes the URLs to pasterlink.txt or pasterlink.csv. It needs Python and the requests package.
Read the Reference, Then Build
The API reference lists every endpoint, parameter and response. Creator Mode gives you the API key.