Skip to main content
The Links API allows you to create, update, delete, and retrieve shortened links. You can create links with custom codes, custom domains, and advanced features like password protection, expiration dates, and tracking pixels.

Base URL

https://api.taap.it/v1/links
Create a new shortened link with optional advanced features.
curl -X POST 'https://api.taap.it/v1/links' \
  -H 'Authorization: Bearer taapit_your_api_key_here' \
  -H 'Content-Type: application/json' \
  -d '{
    "original_url": "https://example.com/very-long-url-that-needs-shortening",
    
    "custom_code": "my-custom-link",
    "password": "secure123",
    "expiration_date": "2024-12-31T23:59:59Z"
  }'
{
  "id": "link_987654321",
  "original_url": "https://example.com/very-long-url-that-needs-shortening",
  "short_url": "https://taap.it/my-custom-link",
  "code": "my-custom-link",
  
  "domain_id": null,
  "password": "secure123",
  "password_description": null,
  "expiration_date": "2024-12-31T23:59:59Z",
  "expiration_click_count": null,
  "utm_template_id": null,
  "pixel_id": null,
  "metadata": null,
  "created_at": "2024-01-15T10:30:00Z",
  "updated_at": "2024-01-15T10:30:00Z",
  "click_count": 0,
  "is_active": true,
  "is_archived": false
}
original_url
string
required
The URL to be shortened
custom_code
string
Custom short code for the link (auto-generated if not provided)
domain_id
string
ID of custom domain to use (optional)
password
string
Password to protect the link (requires plan feature)
password_description
string
Description shown when password is required
expiration_date
string
ISO 8601 datetime when link expires (requires plan feature)
expiration_click_count
integer
Number of clicks after which link expires (requires plan feature)
utm_template_id
string
ID of UTM template to apply (requires plan feature)
pixel_id
string
ID of tracking pixel to add (requires plan feature)
metadata
object
Custom metadata for link previews (requires plan feature)
Retrieve a paginated list of links with optional filtering.
curl -X GET 'https://api.taap.it/v1/links?archived=false&sort_order=desc' \
  -H 'Authorization: Bearer taapit_your_api_key_here'
{
  "items": [
    {
      "id": "link_987654321",
      "original_url": "https://example.com/very-long-url-that-needs-shortening",
      "short_url": "https://taap.it/my-custom-link",
      "code": "my-custom-link",
      
      "created_at": "2024-01-15T10:30:00Z",
      "updated_at": "2024-01-15T10:30:00Z",
      "click_count": 42,
      "is_active": true,
      "is_archived": false
    }
  ],
  "page": 1,
  "page_size": 10,
  "has_next": true,
  "has_prev": false,
  "next_cursor": "eyJpZCI6ImxpbmtfOTg3NjU0MzIxIn0=",
  "prev_cursor": null
}
workspace_id
string
Filter links by workspace ID
archived
boolean
Filter by archived status (true/false)
sort_order
string
default:"desc"
Sort order: “asc” or “desc”
page
integer
default:"1"
Page number for pagination
page_size
integer
default:"10"
Number of items per page (max 100)
cursor
string
Cursor for cursor-based pagination
Retrieve details for a specific link.
curl -X GET 'https://api.taap.it/v1/links/link_987654321' \
  -H 'Authorization: Bearer taapit_your_api_key_here'
{
  "id": "link_987654321",
  "original_url": "https://example.com/very-long-url-that-needs-shortening",
  "short_url": "https://taap.it/my-custom-link",
  "code": "my-custom-link",
  
  "domain_id": null,
  "password": "secure123",
  "password_description": "Enter password to access link",
  "expiration_date": "2024-12-31T23:59:59Z",
  "expiration_click_count": null,
  "utm_template_id": null,
  "pixel_id": null,
  "metadata": {
    "title": "Example Page",
    "description": "This is an example page",
    "image": "https://example.com/image.jpg"
  },
  "created_at": "2024-01-15T10:30:00Z",
  "updated_at": "2024-01-15T10:30:00Z",
  "click_count": 42,
  "is_active": true,
  "is_archived": false
}
Unique identifier for the link
Update an existing link’s properties.
curl -X PUT 'https://api.taap.it/v1/links/link_987654321' \
  -H 'Authorization: Bearer taapit_your_api_key_here' \
  -H 'Content-Type: application/json' \
  -d '{
    "original_url": "https://example.com/updated-url",
    "password": "newpassword123",
    "expiration_date": "2024-06-30T23:59:59Z"
  }'
{
  "id": "link_987654321",
  "original_url": "https://example.com/updated-url",
  "short_url": "https://taap.it/my-custom-link",
  "code": "my-custom-link",
  
  "domain_id": null,
  "password": "newpassword123",
  "password_description": null,
  "expiration_date": "2024-06-30T23:59:59Z",
  "expiration_click_count": null,
  "utm_template_id": null,
  "pixel_id": null,
  "metadata": null,
  "created_at": "2024-01-15T10:30:00Z",
  "updated_at": "2024-01-15T11:00:00Z",
  "click_count": 42,
  "is_active": true,
  "is_archived": false
}
Unique identifier for the link
original_url
string
Updated original URL (requires plan feature)
password
string
New password for link protection
password_description
string
Updated password description
expiration_date
string
New expiration date (ISO 8601 format)
expiration_click_count
integer
New click-based expiration limit
utm_template_id
string
UTM template to apply
pixel_id
string
Tracking pixel to add
metadata
object
Updated metadata for link previews
Remove a link from your account.
curl -X DELETE 'https://api.taap.it/v1/links/link_987654321' \
  -H 'Authorization: Bearer taapit_your_api_key_here'
{
  "message": "Link deleted successfully"
}
Unique identifier for the link to delete
Retrieve link details by its short code (public access, automatically tracks clicks).
curl -X GET 'https://api.taap.it/v1/links/code/my-custom-link' \
  -H 'Authorization: Bearer taapit_your_api_key_here'
{
  "id": "link_987654321",
  "original_url": "https://example.com/very-long-url-that-needs-shortening",
  "short_url": "https://taap.it/my-custom-link",
  "code": "my-custom-link",
  
  "click_count": 43,
  "is_active": true,
  "is_archived": false
}
code
string
required
The short code of the link
This endpoint automatically increments the click count when accessed and is publicly accessible (no authentication required for end users).

Advanced Features

Password Protection

Links can be protected with passwords for additional security:
{
  "password": "secure123",
  "password_description": "Enter the password to access this link"
}

Expiration Settings

Links can expire based on date or click count:
{
  "expiration_date": "2024-12-31T23:59:59Z"
}

Custom Metadata

Add custom metadata for link previews:
{
  "metadata": {
    "title": "My Link Title",
    "description": "Link description for social sharing",
    "image": "https://example.com/preview-image.jpg"
  }
}

UTM Parameters

Apply UTM templates for campaign tracking:
{
  "utm_template_id": "utm_campaign_123"
}

Tracking Pixels

Add tracking pixels for analytics:
{
  "pixel_id": "pixel_analytics_456"
}

Error Responses

{
  "detail": "Invalid URL format"
}
{
  "detail": "Access denied to this workspace"
}
{
  "detail": "Link not found"
}
{
  "detail": "Custom code already exists"
}
{
  "detail": "Password protection feature is not available in your current plan. Upgrade to add password protection."
}

Rate Limits

  • Plan-based Rate Limits: Rate limits vary based on your subscription plan
  • Link-specific operations: 500 requests per hour per link
  • Public link access: No authentication required, but rate limited

Best Practices

  • Use strong passwords for protected links
  • Set appropriate expiration dates for sensitive content
  • Regularly audit link permissions and access
  • Monitor for suspicious click patterns
  • Cache frequently accessed links
  • Use pagination for large link lists
  • Implement retry logic for failed requests
  • Monitor API response times

Next: Projects

Learn how to organize your links into projects for better management and tracking.