Documentation
Developer Documentation
Everything you need to integrate LinkTrap into your applications and workflows.
Quick Start
1
Get API Key
Sign up and generate your API key from the dashboard
2
Make Request
Use our REST API to create and manage your links
3
Track Analytics
Monitor performance with detailed analytics and reports
Documentation Sections
Getting Started
Quick start guide and basic concepts
- Introduction to LinkTrap
- Creating your first link
- Understanding the dashboard
- Basic analytics overview
API Reference
Complete API documentation
- Authentication
- Creating links
- Retrieving analytics
- Error handling
- Rate limits
Integrations
Connect with your favorite tools
- WordPress plugin
- Slack integration
- Zapier workflows
- Custom webhooks
Security
Security features and best practices
- Bot protection setup
- Password protection
- Data encryption
- Privacy compliance
Analytics
Understanding your data
- Analytics dashboard
- Custom reports
- Data export
- Real-time monitoring
Advanced Features
Power user features
- Custom domains
- Bulk operations
- Team management
- White-label solutions
Code Examples
Create a Short Link
javascript
// Create a new short link
const response = await fetch('https://api.linktrap.com/links', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
url: 'https://example.com/very-long-url',
customSlug: 'my-custom-link',
title: 'My Custom Link',
description: 'A description of my link'
})
});
const data = await response.json();
console.log(data.shortUrl); // https://linktrap.com/my-custom-link
Get Link Analytics
javascript
// Retrieve analytics for a link
const response = await fetch('https://api.linktrap.com/links/abc123/analytics', {
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
});
const analytics = await response.json();
console.log(analytics.clicks); // Total click count
console.log(analytics.countries); // Geographic data
Bot Protection Setup
javascript
// Create a link with bot protection
const response = await fetch('https://api.linktrap.com/links', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
url: 'https://example.com/main-content',
botUrl: 'https://example.com/bot-page',
useBotPage: true,
title: 'Protected Content'
})
});
API Endpoints
POST
/api/links
Create a new short link with optional custom slug and metadata.
GET
/api/links/{slug}/analytics
Retrieve detailed analytics for a specific short link.
GET
/api/links
List all your short links with pagination and filtering options.
Ready to Get Started?
Start building with LinkTrap API today