Skip to main content

Get Your API Key

1

Sign Up

Create an account at snip.sa if you haven’t already
2

Navigate to Profile

Go to your dashboard and click on Profile in the sidebar
3

Generate API Key

Click “Regenerate API Key” to create your API key
4

Copy and Store

Copy your API key and store it securely - you’ll need it for all API requests
Keep your API key secure! Never share it publicly or commit it to version control.

Make Your First Request

Let’s create your first shortened URL:
curl -X POST https://snip.sa/api/urls \
  -H "Content-Type: application/json" \
  -H "X-API-Key: your_api_key_here" \
  -d '{
    "originalUrl": "https://example.com/very-long-url",
    "title": "My First Link"
  }'

Response

You’ll receive a response like this:
{
  "success": true,
  "message": "URL created successfully",
  "data": {
    "url": {
      "_id": "507f1f77bcf86cd799439011",
      "originalUrl": "https://example.com/very-long-url",
      "shortCode": "abc123",
      "title": "My First Link",
      "clickCount": 0,
      "isActive": true,
      "createdAt": "2024-01-15T10:30:00.000Z"
    },
    "domain": {
      "id": "base",
      "fullDomain": "laghhu.link",
      "shortUrl": "https://laghhu.link",
      "isSystemDomain": true
    }
  }
}
Your shortened URL is: https://laghhu.link/abc123

Next Steps