CLI
Share text directly from your terminal. No installation required — works with PowerShell, curl, wget, or any HTTP client.
Quick Start
Upload any text with a single command:
gc c:\myfile.txt | Invoke-RestMethod -Uri "https://txt.parts/api/v2/parts" -Method POSTNo Installation Required
Works with built-in tools like curl, PowerShell, or wget.
Secure by Design
Capability-based delete tokens. Only you can delete your shares.
Pipe-Friendly
Stream output directly. Perfect for logs, scripts, and automation.
Response Format
Every upload returns a JSON response with everything you need:
{
"id": "a8f3k9d2m1p4",
"viewUrl": "https://txt.parts/share/a8f3k9d2m1p4?token=...",
"apiUrl": "https://txt.parts/api/v2/parts/a8f3k9d2m1p4",
"rawUrl": "https://txt.parts/api/v2/parts/a8f3k9d2m1p4/raw",
"deleteToken": "dt_7k2mP9xL4nQ8rT1w...",
"expiresAt": "2025-01-19T15:30:00Z",
"expiresIn": 3600
}viewUrl
Browser-friendly link to shareapiUrl
JSON endpoint for metadatarawUrl
Plain text content for pipingdeleteToken
Secret token to delete the shareExamples
Create a Share
# Upload a file
gc c:\logs\error.log | Invoke-RestMethod -Uri "https://txt.parts/api/v2/parts" -Method POST
# Upload with custom expiry (24 hours)
$headers = @{ "X-Expiry" = "86400" }
gc c:\data\report.csv | Invoke-RestMethod -Uri "https://txt.parts/api/v2/parts" -Method POST -Headers $headers
# Create a one-time link
$headers = @{ "X-Single-Use" = "true" }
"Secret message" | Invoke-RestMethod -Uri "https://txt.parts/api/v2/parts" -Method POST -Headers $headersRetrieve Content
# Get content as JSON (with metadata)
Invoke-RestMethod -Uri "https://txt.parts/api/v2/parts/abc123"
# Get raw content (pipe-friendly)
Invoke-RestMethod -Uri "https://txt.parts/api/v2/parts/abc123/raw"
# Save to file
Invoke-RestMethod -Uri "https://txt.parts/api/v2/parts/abc123/raw" | Out-File downloaded.txtDelete a Share
# Save response when creating
$response = "Important data" | Invoke-RestMethod -Uri "https://txt.parts/api/v2/parts" -Method POST
# Delete using the token
$headers = @{ "X-Delete-Token" = $response.deleteToken }
Invoke-RestMethod -Uri $response.apiUrl -Method DELETE -Headers $headersOptions Reference
| Header | Values | Description |
|---|---|---|
| X-Expiry | 60 - 604800 | Expiration time in seconds (default: 3600 = 1 hour) |
| X-Single-Use | true / false | Create a one-time link (default: false) |
| X-Language | json, xml, python, etc. | Syntax highlighting hint (default: plaintext) |
| X-Delete-Token | dt_... | Required for DELETE requests |
Rate Limits
Anonymous
10
requests per hour
Pro
200
requests per minute
Enterprise
1000
requests per 10 seconds