SnipyDevelopers
API Reference

API Reference

Complete reference for all Snipy API endpoints. All requests require authentication via Bearer token or API key.

Base URL: https://api.snipy.com

Response format

All responses follow a consistent JSON format with an error field indicating success (0) or failure (1).

Success
{
  "error": 0,
  "data": {
    "id": 123,
    "alias": "my-link",
    "url": "https://example.com"
  }
}
Error
{
  "error": 1,
  "message": "Error description"
}
List
{
  "error": 0,
  "data": {
    "result": 42,
    "perpage": 15,
    "currentpage": 1,
    "nextpage": 2,
    "maxpage": 3,
    "urls": [...]
  }
}

QR Codes

Generate, customize, and manage QR codes linked to your short URLs.

GET/api/qrs

List all QR codes for the authenticated user with pagination.

Auth:Bearer token
ParameterTypeRequiredDescription
pagenumberNoPage number (default: 1)
limitnumberNoResults per page (default: 15)
searchstringNoSearch by name or linked URL
cURL
curl -X GET "https://api.snipy.com/api/qrs?page=1" \
  -H "Authorization: Bearer YOUR_TOKEN"
POST/api/qr/add

Create a new QR code. You can link it to an existing URL or provide a new one.

Auth:Bearer token
ParameterTypeRequiredDescription
namestringYesDisplay name for the QR code
urlstringYesTarget URL
foregroundstringNoForeground color hex (default: #000000)
backgroundstringNoBackground color hex (default: #FFFFFF)
errorCorrectionstringNoError correction level: L, M, Q, H (default: M)
sizenumberNoSize in pixels (default: 300)
marginnumberNoQuiet zone margin (default: 4)
logostringNoLogo image URL to embed
cURL
curl -X POST https://api.snipy.com/api/qr/add \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Product Page QR",
    "url": "https://example.com/product",
    "foreground": "#1a1a1a",
    "size": 400
  }'
Response
{
  "error": 0,
  "data": {
    "id": 78,
    "name": "Product Page QR",
    "url": "https://snipy.to/abc123",
    "scans": 0,
    "date": "2026-03-04T12:00:00Z"
  }
}
GET/api/qr/:id

Get full details for a specific QR code.

Auth:Bearer token
cURL
curl -X GET https://api.snipy.com/api/qr/78 \
  -H "Authorization: Bearer YOUR_TOKEN"
PUT/api/qr/:id/update

Update QR code settings including colors, size, and linked URL.

Auth:Bearer token
ParameterTypeRequiredDescription
namestringNoUpdate display name
foregroundstringNoUpdate foreground color
backgroundstringNoUpdate background color
sizenumberNoUpdate size
cURL
curl -X PUT https://api.snipy.com/api/qr/78/update \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name": "Updated QR Name"}'
DELETE/api/qr/:id/delete

Permanently delete a QR code.

Auth:Bearer token
cURL
curl -X DELETE https://api.snipy.com/api/qr/78/delete \
  -H "Authorization: Bearer YOUR_TOKEN"
GET/api/qr/:id/download

Download a QR code image as PNG, SVG, or PDF. Returns binary data.

Auth:Bearer token
ParameterTypeRequiredDescription
formatstringYesOutput format: png, svg, pdf
sizenumberNoImage size in pixels (default: 300)
cURL
curl -X GET "https://api.snipy.com/api/qr/78/download?format=png&size=600" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -o qr-code.png
POST/api/qr/:id/artistic

Generate an AI-powered artistic QR code with custom styling.

Auth:Bearer token
ParameterTypeRequiredDescription
stylestringYesArt style: abstract, watercolor, pixel, etc.
promptstringNoCustom style prompt
cURL
curl -X POST https://api.snipy.com/api/qr/78/artistic \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"style": "watercolor"}'
POST/api/qr/bulk

Bulk generate QR codes. Create multiple QR codes in a single request.

Auth:Bearer token
ParameterTypeRequiredDescription
qrsarrayYesArray of QR code objects with name and url
cURL
curl -X POST https://api.snipy.com/api/qr/bulk \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"qrs": [
    {"name": "QR 1", "url": "https://example.com/1"},
    {"name": "QR 2", "url": "https://example.com/2"}
  ]}'

Bio Profiles

Create and manage bio link pages with customizable blocks, themes, and subscriber collection.

GET/api/bios

List all bio profiles for the authenticated user.

Auth:Bearer token
ParameterTypeRequiredDescription
pagenumberNoPage number (default: 1)
limitnumberNoResults per page (default: 15)
cURL
curl -X GET "https://api.snipy.com/api/bios?page=1" \
  -H "Authorization: Bearer YOUR_TOKEN"
POST/api/bio/add

Create a new bio profile page.

Auth:Bearer token
ParameterTypeRequiredDescription
namestringYesProfile display name
slugstringYesURL slug (unique)
biostringNoProfile bio text
avatarstringNoAvatar image URL
themestringNoTheme preset name
cURL
curl -X POST https://api.snipy.com/api/bio/add \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "John Doe",
    "slug": "johndoe",
    "bio": "Full-stack developer"
  }'
Response
{
  "error": 0,
  "data": {
    "id": 12,
    "name": "John Doe",
    "slug": "johndoe",
    "bio": "Full-stack developer",
    "url": "https://snipy.bio/johndoe",
    "views": 0,
    "date": "2026-03-04T12:00:00Z"
  }
}
GET/api/bio/:id

Get full details for a bio profile.

Auth:Bearer token
cURL
curl -X GET https://api.snipy.com/api/bio/12 \
  -H "Authorization: Bearer YOUR_TOKEN"
PUT/api/bio/:id/update

Update bio profile settings.

Auth:Bearer token
ParameterTypeRequiredDescription
namestringNoUpdate display name
biostringNoUpdate bio text
themestringNoUpdate theme
avatarstringNoUpdate avatar URL
seoobjectNoSEO settings (title, description)
cURL
curl -X PUT https://api.snipy.com/api/bio/12/update \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"bio": "Senior full-stack developer"}'
DELETE/api/bio/:id/delete

Permanently delete a bio profile.

Auth:Bearer token
cURL
curl -X DELETE https://api.snipy.com/api/bio/12/delete \
  -H "Authorization: Bearer YOUR_TOKEN"
POST/api/bio/:id/block

Add a new block to a bio profile. Blocks are widgets like links, text, images, embeds, etc.

Auth:Bearer token
ParameterTypeRequiredDescription
typestringYesBlock type (link, text, image, header, divider, social, embed, newsletter, etc.)
contentobjectYesBlock content (varies by type)
positionnumberNoPosition in the block list (appended if omitted)
cURL
curl -X POST https://api.snipy.com/api/bio/12/block \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "link",
    "content": {
      "title": "My Website",
      "url": "https://example.com",
      "icon": "globe"
    }
  }'
PUT/api/bio/:id/block/:key

Update an existing block by its key.

Auth:Bearer token
ParameterTypeRequiredDescription
contentobjectYesUpdated block content
cURL
curl -X PUT https://api.snipy.com/api/bio/12/block/abc123 \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"content": {"title": "Updated Title"}}'
DELETE/api/bio/:id/block/:key

Delete a block from a bio profile.

Auth:Bearer token
cURL
curl -X DELETE https://api.snipy.com/api/bio/12/block/abc123 \
  -H "Authorization: Bearer YOUR_TOKEN"
PUT/api/bio/:id/reorder

Reorder blocks on a bio profile.

Auth:Bearer token
ParameterTypeRequiredDescription
orderstring[]YesArray of block keys in desired order
cURL
curl -X PUT https://api.snipy.com/api/bio/12/reorder \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"order": ["key3", "key1", "key2"]}'
POST/api/bio/:id/ai-generate

Use the AI bio builder to generate content and blocks from a prompt.

Auth:Bearer token
ParameterTypeRequiredDescription
promptstringYesDescription of the bio profile to generate
cURL
curl -X POST https://api.snipy.com/api/bio/12/ai-generate \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"prompt": "A freelance photographer portfolio with social links"}'
PUT/api/bio/:id/domain

Set a custom domain for a bio profile.

Auth:Bearer token
ParameterTypeRequiredDescription
domainstringYesCustom domain (e.g. bio.yourdomain.com)
cURL
curl -X PUT https://api.snipy.com/api/bio/12/domain \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"domain": "bio.example.com"}'
GET/api/bio/:id/domain/verify

Verify DNS configuration for a custom bio domain.

Auth:Bearer token
cURL
curl -X GET https://api.snipy.com/api/bio/12/domain/verify \
  -H "Authorization: Bearer YOUR_TOKEN"
Response
{
  "error": 0,
  "data": {
    "verified": true,
    "domain": "bio.example.com",
    "dns_records": [
      { "type": "CNAME", "name": "bio", "value": "bio.snipy.com", "status": "valid" }
    ]
  }
}
GET/api/bio/:id/subscribers

List email subscribers collected through the bio newsletter block.

Auth:Bearer token
ParameterTypeRequiredDescription
pagenumberNoPage number (default: 1)
limitnumberNoResults per page (default: 50)
cURL
curl -X GET "https://api.snipy.com/api/bio/12/subscribers?page=1" \
  -H "Authorization: Bearer YOUR_TOKEN"
GET/api/bio/:id/subscribers/export

Export all subscribers as a CSV file.

Auth:Bearer token
cURL
curl -X GET https://api.snipy.com/api/bio/12/subscribers/export \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -o subscribers.csv
GET/api/bio/widgets

List all available widget/block types and their configuration schemas.

Auth:Bearer token
cURL
curl -X GET https://api.snipy.com/api/bio/widgets \
  -H "Authorization: Bearer YOUR_TOKEN"
GET/api/bio/public/:slug

Get publicly visible bio profile data. No authentication required.

Auth:None
cURL
curl -X GET https://api.snipy.com/api/bio/public/johndoe

Analytics

Access detailed click statistics and analytics for your links.

GET/api/url/:id/stats

Get summary statistics for a link including total clicks, unique visitors, and top referrers.

Auth:Bearer token
ParameterTypeRequiredDescription
fromstringNoStart date ISO 8601
tostringNoEnd date ISO 8601
cURL
curl -X GET "https://api.snipy.com/api/url/456/stats?from=2026-01-01&to=2026-03-01" \
  -H "Authorization: Bearer YOUR_TOKEN"
Response
{
  "error": 0,
  "data": {
    "totalClicks": 1250,
    "uniqueVisitors": 980,
    "topCountry": "US",
    "topReferrer": "twitter.com",
    "topBrowser": "Chrome"
  }
}
GET/api/url/:id/stats/clicks

Get time-series click data for charting. Supports hourly, daily, weekly, and monthly granularity.

Auth:Bearer token
ParameterTypeRequiredDescription
fromstringNoStart date ISO 8601
tostringNoEnd date ISO 8601
granularitystringNohour, day, week, month (default: day)
cURL
curl -X GET "https://api.snipy.com/api/url/456/stats/clicks?granularity=day" \
  -H "Authorization: Bearer YOUR_TOKEN"
GET/api/url/:id/stats/countries

Get click breakdown by country.

Auth:Bearer token
cURL
curl -X GET https://api.snipy.com/api/url/456/stats/countries \
  -H "Authorization: Bearer YOUR_TOKEN"
Response
{
  "error": 0,
  "data": {
    "countries": [
      { "code": "US", "name": "United States", "clicks": 450 },
      { "code": "GB", "name": "United Kingdom", "clicks": 200 },
      { "code": "DE", "name": "Germany", "clicks": 150 }
    ]
  }
}
GET/api/url/:id/stats/referrers

Get click breakdown by referrer source.

Auth:Bearer token
cURL
curl -X GET https://api.snipy.com/api/url/456/stats/referrers \
  -H "Authorization: Bearer YOUR_TOKEN"
GET/api/url/:id/stats/browsers

Get click breakdown by browser.

Auth:Bearer token
cURL
curl -X GET https://api.snipy.com/api/url/456/stats/browsers \
  -H "Authorization: Bearer YOUR_TOKEN"
GET/api/url/:id/stats/platforms

Get click breakdown by operating system / platform.

Auth:Bearer token
cURL
curl -X GET https://api.snipy.com/api/url/456/stats/platforms \
  -H "Authorization: Bearer YOUR_TOKEN"
GET/api/url/:id/stats/variants

Get A/B testing variant breakdown with clicks per variant.

Auth:Bearer token
cURL
curl -X GET https://api.snipy.com/api/url/456/stats/variants \
  -H "Authorization: Bearer YOUR_TOKEN"
Response
{
  "error": 0,
  "data": {
    "variants": [
      { "name": "A", "url": "https://example.com/a", "clicks": 300, "percentage": 60 },
      { "name": "B", "url": "https://example.com/b", "clicks": 200, "percentage": 40 }
    ]
  }
}
GET/api/url/:id/stats/activity

Get a chronological log of individual clicks with IP, user agent, country, and referrer.

Auth:Bearer token
ParameterTypeRequiredDescription
pagenumberNoPage number (default: 1)
limitnumberNoResults per page (default: 50)
cURL
curl -X GET "https://api.snipy.com/api/url/456/stats/activity?page=1&limit=25" \
  -H "Authorization: Bearer YOUR_TOKEN"

Domains

Manage custom domains for your shortened links.

GET/api/domains

List all domains available to the authenticated user, including system domains.

Auth:Bearer token
cURL
curl -X GET https://api.snipy.com/api/domains \
  -H "Authorization: Bearer YOUR_TOKEN"
Response
{
  "error": 0,
  "data": {
    "domains": [
      { "id": 1, "domain": "snipy.to", "system": true, "verified": true },
      { "id": 50, "domain": "links.mysite.com", "system": false, "verified": true }
    ]
  }
}
POST/api/domain/add

Add a custom domain. You will need to configure DNS records to verify ownership.

Auth:Bearer token
ParameterTypeRequiredDescription
domainstringYesThe custom domain to add
cURL
curl -X POST https://api.snipy.com/api/domain/add \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"domain": "links.mysite.com"}'
Response
{
  "error": 0,
  "data": {
    "id": 50,
    "domain": "links.mysite.com",
    "verified": false,
    "dns_records": [
      { "type": "CNAME", "name": "links", "value": "domains.snipy.com" }
    ]
  }
}
GET/api/domain/:id

Get domain details including DNS verification status.

Auth:Bearer token
cURL
curl -X GET https://api.snipy.com/api/domain/50 \
  -H "Authorization: Bearer YOUR_TOKEN"
DELETE/api/domain/:id/delete

Remove a custom domain. Links using this domain will stop resolving.

Auth:Bearer token
cURL
curl -X DELETE https://api.snipy.com/api/domain/50/delete \
  -H "Authorization: Bearer YOUR_TOKEN"

Campaigns

Group links into campaigns for organized tracking and analytics.

GET/api/campaigns

List all campaigns.

Auth:Bearer token
ParameterTypeRequiredDescription
pagenumberNoPage number (default: 1)
limitnumberNoResults per page (default: 15)
cURL
curl -X GET "https://api.snipy.com/api/campaigns?page=1" \
  -H "Authorization: Bearer YOUR_TOKEN"
POST/api/campaign/add

Create a new campaign.

Auth:Bearer token
ParameterTypeRequiredDescription
namestringYesCampaign name
descriptionstringNoCampaign description
cURL
curl -X POST https://api.snipy.com/api/campaign/add \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name": "Q1 Launch", "description": "Product launch campaign"}'
GET/api/campaign/:id

Get campaign details.

Auth:Bearer token
cURL
curl -X GET https://api.snipy.com/api/campaign/5 \
  -H "Authorization: Bearer YOUR_TOKEN"
PUT/api/campaign/:id/update

Update campaign name or description.

Auth:Bearer token
ParameterTypeRequiredDescription
namestringNoUpdated campaign name
descriptionstringNoUpdated description
cURL
curl -X PUT https://api.snipy.com/api/campaign/5/update \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name": "Q1 Launch (Updated)"}'
DELETE/api/campaign/:id/delete

Delete a campaign. Links will be unassigned but not deleted.

Auth:Bearer token
cURL
curl -X DELETE https://api.snipy.com/api/campaign/5/delete \
  -H "Authorization: Bearer YOUR_TOKEN"
GET/api/campaign/:id/stats

Get aggregated analytics for all links in a campaign.

Auth:Bearer token
ParameterTypeRequiredDescription
fromstringNoStart date ISO 8601
tostringNoEnd date ISO 8601
cURL
curl -X GET "https://api.snipy.com/api/campaign/5/stats?from=2026-01-01" \
  -H "Authorization: Bearer YOUR_TOKEN"

Webhooks

Subscribe to real-time event notifications.

GET/api/webhooks

List all active webhook subscriptions.

Auth:Bearer token
cURL
curl -X GET https://api.snipy.com/api/webhooks \
  -H "Authorization: Bearer YOUR_TOKEN"
Response
{
  "error": 0,
  "data": {
    "webhooks": [
      {
        "id": 1,
        "url": "https://example.com/webhook",
        "events": ["link.clicked", "link.created"],
        "active": true,
        "createdAt": "2026-01-15T10:00:00Z"
      }
    ]
  }
}
POST/api/webhooks/subscribe

Create a new webhook subscription for one or more events.

Auth:Bearer token
ParameterTypeRequiredDescription
urlstringYesEndpoint URL to receive webhook payloads
eventsstring[]YesArray of event types to subscribe to
secretstringNoSigning secret for payload verification
cURL
curl -X POST https://api.snipy.com/api/webhooks/subscribe \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com/webhook",
    "events": ["link.clicked", "link.created"],
    "secret": "whsec_abc123..."
  }'
DELETE/api/webhooks/subscribe/:id

Delete a webhook subscription.

Auth:Bearer token
cURL
curl -X DELETE https://api.snipy.com/api/webhooks/subscribe/1 \
  -H "Authorization: Bearer YOUR_TOKEN"
GET/api/webhooks/events

List all available webhook event types.

Auth:Bearer token
cURL
curl -X GET https://api.snipy.com/api/webhooks/events \
  -H "Authorization: Bearer YOUR_TOKEN"

Account

Manage your account settings, API keys, and usage statistics.

GET/api/account

Get the authenticated user's account details.

Auth:Bearer token
cURL
curl -X GET https://api.snipy.com/api/account \
  -H "Authorization: Bearer YOUR_TOKEN"
Response
{
  "error": 0,
  "data": {
    "id": 42,
    "name": "John Doe",
    "email": "john@example.com",
    "avatarUrl": "https://...",
    "planId": 2,
    "plan": "Pro",
    "status": "active",
    "createdAt": "2025-06-15T10:00:00Z"
  }
}
PUT/api/account/update

Update account profile settings.

Auth:Bearer token
ParameterTypeRequiredDescription
namestringNoUpdate display name
emailstringNoUpdate email address (requires verification)
cURL
curl -X PUT https://api.snipy.com/api/account/update \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name": "Jane Doe"}'
PUT/api/account/password

Change your account password.

Auth:Bearer token
ParameterTypeRequiredDescription
currentstringYesCurrent password
passwordstringYesNew password (min 8 characters)
confirmPasswordstringYesConfirm new password
cURL
curl -X PUT https://api.snipy.com/api/account/password \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "current": "old-password",
    "password": "new-secure-password",
    "confirmPassword": "new-secure-password"
  }'
GET/api/account/stats

Get account usage statistics (links created, clicks used, etc.).

Auth:Bearer token
cURL
curl -X GET https://api.snipy.com/api/account/stats \
  -H "Authorization: Bearer YOUR_TOKEN"
Response
{
  "error": 0,
  "data": {
    "urls": { "used": 150, "limit": 5000 },
    "clicks": { "used": 25000, "limit": 500000 },
    "qrs": { "used": 30, "limit": 100 },
    "bios": { "used": 5, "limit": 25 },
    "domains": { "used": 3, "limit": 10 }
  }
}
GET/api/account/apikeys

List all API keys for the authenticated user.

Auth:Bearer token
cURL
curl -X GET https://api.snipy.com/api/account/apikeys \
  -H "Authorization: Bearer YOUR_TOKEN"
Response
{
  "error": 0,
  "data": {
    "keys": [
      {
        "id": 1,
        "name": "Production Key",
        "prefix": "snpy_a1b2",
        "scopes": ["qr:read", "qr:write"],
        "lastUsed": "2026-03-03T18:00:00Z",
        "createdAt": "2026-01-01T10:00:00Z"
      }
    ]
  }
}
POST/api/account/apikeys/add

Create a new API key. The full key is only returned once.

Auth:Bearer token
ParameterTypeRequiredDescription
namestringYesDisplay name for the key
scopesstring[]NoArray of scopes (empty = full access)
cURL
curl -X POST https://api.snipy.com/api/account/apikeys/add \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name": "My Integration", "scopes": ["qr:read"]}'
Response
{
  "error": 0,
  "data": {
    "id": 2,
    "name": "My Integration",
    "key": "snpy_a1b2c3d4e5f6789...",
    "scopes": ["qr:read"],
    "createdAt": "2026-03-04T12:00:00Z"
  }
}
The full API key value is only returned once at creation time. Store it securely.