Developer API v1

API Documentation

Automate your link creation with the Trimfo REST API.

Authentication

You must pass your Supabase access token in the Authorization header to create links via the API. You can extract your token by inspecting your network requests in the dashboard.

Authorization: Bearer YOUR_ACCESS_TOKEN

Create a Short Link

POST/api/links

Request Body (JSON)

{
  "destination_url": "https://example.com/my-download", // Required
  "custom_alias": "my-cool-link",                      // Optional
  "ad_intensity": "Medium",                            // Optional (Low, Medium, High)
  "social_lock_type": "None",                          // Optional (None, YouTube, Twitter)
  "social_lock_value": "",                             // Required if lock type is YouTube/Twitter
  "pixel_id": ""                                       // Optional (Facebook Pixel ID)
}

Success Response (200 OK)

{
  "link": {
    "id": "uuid",
    "alias": "my-cool-link",
    "destination_url": "https://example.com...",
    "short_url": "https://trimfo.com/my-cool-link"
  }
}