API Overview

The FWURL API allows you to programmatically create, manage, and track short links. This RESTful API is designed to be simple, intuitive, and powerful.

Getting Started

To use the FWURL API, you'll need:

  1. A FWURL account (sign up at fwurl.com)
  2. An API key (generated in your account settings)
  3. Basic knowledge of REST APIs and HTTP requests

Base URL

All API requests should be made to:

https://api.fwurl.com/v1

Authentication

The FWURL API uses API keys for authentication. Include your API key in the request header:

Authorization: Bearer YOUR_API_KEY

Getting Your API Key

  1. Log in to your FWURL dashboard
  2. Navigate to Settings > API
  3. Click Generate API Key
  4. Copy and securely store your key

Important: Keep your API keys secure. Never share them publicly or commit them to version control.

Rate Limits

API rate limits vary by plan:

  • Free Plan: 100 requests per hour
  • Pro Plan: 1,000 requests per hour
  • Enterprise: Custom limits available

Rate limit headers are included in all responses:

X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 999
X-RateLimit-Reset: 1640000000

Response Format

All responses are returned in JSON format:

{
  "success": true,
  "data": {
    "id": "abc123",
    "shortUrl": "https://fwurl.com/abc123",
    "longUrl": "https://example.com/very/long/url"
  }
}

Error Responses

Errors include a descriptive message and error code:

{
  "success": false,
  "error": {
    "code": "INVALID_URL",
    "message": "The provided URL is not valid"
  }
}

Quick Example

Here's a simple example using cURL to create a short link:

curl -X POST https://api.fwurl.com/v1/links \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com/my-long-url",
    "customSlug": "my-link"
  }'

Response:

{
  "success": true,
  "data": {
    "id": "abc123",
    "shortUrl": "https://fwurl.com/my-link",
    "longUrl": "https://example.com/my-long-url",
    "createdAt": "2024-01-01T00:00:00Z"
  }
}

Next Steps