Developer API: Automate Link Management at Scale
trimy's REST API lets developers shorten URLs, retrieve analytics, and automate workflows programmatically. Complete API documentation with up to 1,000,000 API calls/month on Business plan.
Get your free API keyOne Request, a Live Short Link
curl -X POST https://trimy.io/api/urls \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{"longUrl": "https://example.com/landing"}'
→ 201 Created
{"shortUrl": "https://trimy.io/x7Yk2p", "clicks": 0}
What Is the Developer API?
The Developer API is a REST API that lets you integrate trimy's URL shortening, link management, and analytics into your own applications. Create short links, retrieve click analytics, manage campaigns, invite team members — all programmatically from your code.
Instead of using trimy's web dashboard, use the API to automate link creation at scale. Integrate trimy directly into your SaaS product, content management system, or internal tools. The API supports core trimy features: custom codes, password protection, expiration, UTM tags, QR codes, and full analytics retrieval. Campaign data and team lookups are also available programmatically.
Getting Started with the API
-
1
Generate an API key
In trimy's settings, create an API key. Each key is securely hashed and can be revoked anytime. Store the key safely — trimy never displays it again.
-
2
Read the documentation
Every endpoint is documented with request/response examples. Use Postman, cURL, or any HTTP client to test requests interactively.
-
3
Make API calls
Include your API key in the X-API-Key header. Make requests to endpoints like POST /api/v1/external/urls to create links, GET /api/v1/external/analytics/{shortCode}/summary to retrieve analytics, DELETE /api/v1/external/urls/{shortCode} to delete.
-
4
Build your integration
Use your preferred HTTP client library (JavaScript, Python, PHP, C#, Java, etc.) for integration. Handle rate limiting, errors, and retries gracefully following REST best practices.
Real-World Use Cases
Email Automation Platform
An email marketing platform integrates trimy's API so users can shorten links within email templates. When a user clicks "Insert Link", the platform calls trimy API to generate a short link, track its performance, and show analytics alongside email metrics.
Content Management System
A CMS plugin uses trimy API to auto-shorten all external links in published content. When an article is published, the plugin scans content, creates short links via API, and embeds them. Links are tracked centrally in trimy dashboard.
Bulk Import / Migration
A company migrating from Bitly uses trimy's bulk creation endpoint in a batch job, submitting up to 100 links per request to recreate their entire link library. Failed rows are automatically excluded from billing, so a partial failure never overcharges the migration.
Custom Analytics Dashboard
A SaaS company building a custom analytics dashboard calls trimy's analytics endpoints to fetch link data — click counts, geography, devices, referrers, time series. They visualize this in their custom dashboard alongside their own product metrics.
API Endpoints & Capabilities
URL Management
Create, read, update, delete short links. Full CRUD operations with support for custom codes, passwords, expiration, tags, and all trimy features.
Analytics
Retrieve detailed analytics: click counts, geographic data, device breakdown, referrers, UTM parameters, and time-series data. Filter and aggregate as needed.
Rate Limiting & Authentication
Secure API key authentication. Standard HTTP rate limiting with clear headers. Scale your integrations with confidence.
Security Features
Set password protection, expiration dates, and other security features programmatically. Full API support for all security options.
API Key Management
Create, rotate, and revoke API keys. Each key is securely hashed — only you hold the plaintext value. Revoke any key instantly if compromised.
Webhooks
Subscribe to click and link-lifecycle events. Every delivery is HMAC-SHA256 signed for verification, retried with exponential backoff on transient failures, and target URLs are validated to block private/internal hosts. Higher plans support more endpoints.
Developer API by Plan
| Plan | API Access | Monthly Calls | Webhooks |
|---|---|---|---|
| Free | Full read/write | 750 | — |
| Starter | Full read/write | 75,000 | 2 endpoints |
| Professional | Full read/write | 350,000 | 3 endpoints |
| Business | Full read/write | 1,000,000 | 10 endpoints |
Frequently Asked Questions
Is the API fully REST-compliant?
Yes. trimy API follows REST conventions: POST for creation, GET for retrieval, PUT for updates, DELETE for removal. Requests are JSON, responses are JSON. Standard HTTP status codes (200, 201, 400, 401, 404, 429, 500) are used appropriately.
Is there API documentation available?
Yes. Complete API documentation covers every endpoint with request/response examples. You can test with Postman, cURL, or any HTTP client.
What authentication methods are supported?
API requests are authenticated with an API key in the X-API-Key header. Webhook deliveries are separately signed with HMAC-SHA256 (X-Trimy-Signature) so you can verify each payload came from trimy, and target URLs are validated to block private/internal hosts.
How does rate limiting work?
Rate limits depend on your plan (Free: 750/month, Starter: 75k/month, Professional: 350k/month, Business: 1M/month), plus an hourly per-key limit to prevent bursts. Rate limit headers (X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset) are included in responses. Requests exceeding either limit return 429 (Too Many Requests).
Can I use SDKs or libraries?
trimy doesn't provide official SDKs. However, you can easily integrate with any HTTP client library in your preferred language (JavaScript, Python, PHP, C#, Java, etc.) using the X-API-Key header and standard REST conventions.
Is the API suitable for high-volume operations?
Yes. trimy's infrastructure scales to handle high-volume API traffic, and the Business plan offers 1,000,000 API calls/month. The bulk creation endpoint accepts up to 100 URLs per request (per your plan's bulk operations limit) and safely refunds quota for any items that fail, so partial failures never overcharge you. Send an Idempotency-Key header on any request you might retry to avoid duplicate links.
Automate at scale.
Build powerful integrations with trimy's REST API. Full documentation and unlimited scalability.
Related Features
Advanced Analytics
Retrieve detailed analytics via API for all your programmatically-created links.
Learn moreCampaign Management
Organize API-created links into campaigns and view aggregate analytics.
Learn moreUTM Builder
Programmatically create links with UTM parameters for campaign tracking.
Learn more