Integrate our powerful URL shortening service into your applications.
The Wisk API allows you to programmatically create and manage short URLs. Our RESTful API is easy to integrate with any application or service.
We currently offer two main endpoints:
All API requests require authentication using your API key, which you can obtain for free from your Wisk dashboard after logging in.
To start using the Wisk API:
Base URL: https://wisk.in/api
To generate an API key via API, you need a Sanctum token:
GET https://wisk.in/api/sanctum/csrf-cookiePOST https://wisk.in/api/login with email and passwordAuthorization: Bearer YOUR_SANCTUM_TOKEN header for /api-key/generatePOST /login
curl -X POST https://wisk.in/api/login \
-H "Content-Type: application/json" \
-H "X-XSRF-TOKEN: YOUR_CSRF_TOKEN" \
-d '{"email": "user@example.com", "password": "yourpassword"}'
{
"message": "Login successful",
"token": "YOUR_SANCTUM_TOKEN"
}
To generate an API key for free:
Authorization: Bearer YOUR_API_KEY header for all API requestsPOST /api-key/generate
Requires authentication via Sanctum token.
curl -X POST https://wisk.in/api/api-key/generate \ -H "Authorization: Bearer YOUR_SANCTUM_TOKEN" \ -H "Content-Type: application/json"
{
"api_key": "YOUR_GENERATED_API_KEY"
}
Convert a long URL into a short Wisk link.
POST /encode
url
string
The long URL to shorten
Yes
custom_slug
string
Custom short code (for logged-in users)
No
curl -X POST https://wisk.in/api/encode \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com/very/long/url", "custom_slug": "my-link"}'
{
"status": "success",
"short_url": "https://wisk.in/my-link",
"original_url": "https://example.com/very/long/url"
}
Retrieve the original URL from a short Wisk link.
GET /decode
short_url
string
The short Wisk URL to decode
Yes
curl -X GET "https://wisk.in/api/decode?short_url=https://wisk.in/my-link" \ -H "Authorization: Bearer YOUR_API_KEY"
{
"status": "success",
"original_url": "https://example.com/very/long/url",
"short_url": "https://wisk.in/my-link"
}