Shorten URLs for free with link tracking, QR code generation, customizable slugs, API access and batch processing. Sign up today with Snipzr.

API Documentation

Authorization

To access the API endpoints, you need to authenticate your requests using a Bearer token. Include the token in the Authorization header of your HTTP requests.

You can generate a token from your account settings.

Example of an Authorization header:

Authorization: Bearer YOUR_TOKEN_HERE

POST /urls

Create a new short link

Request Body:

  • url (string): The original URL to be shortened (required)
  • title (string): The title for the short link (optional)
  • slug (string): Custom slug for the short link (optional)
  • zoneId (string): Zone ID where the link will be created (required)

Response:

{
  "url": {
    "id": "string",
    "slug": "string",
    "url": "string",
    "title": "string",
    "hits": 0,
    "isEnabled": true,
    "createdAt": "string",
    "updatedAt": "string"
  }
}

cURL Command:

curl -X POST https://api.snipzr.com/v1/urls \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
  "url": "https://example.com",
  "title": "Example Title",
  "slug": "example-slug"
}'

PATCH /urls/:slug

Update an existing short link

Request Body:

  • title (string): The new title for the short link (optional)
  • newSlug (string): New custom slug for the short link (optional)
  • isEnabled (boolean): Enable or disable the short link (optional)

Response:

{
  "url": {
    "id": "string",
    "slug": "string",
    "url": "string",
    "title": "string",
    "hits": 0,
    "isEnabled": true,
    "createdAt": "string",
    "updatedAt": "string"
  }
}

cURL Command:

curl -X PATCH https://api.snipzr.com/v1/urls/example-slug \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
  "title": "Updated Title",
  "newSlug": "new-example-slug",
  "isEnabled": true
}'

GET /urls

Get all short links

Query Params:

  • limit (number): Number of links per page (default: 10)
  • page (number): Page number for pagination (default: 1)

Response:

{
  "urls": [
    {
      "id": "string",
      "slug": "string",
      "url": "string",
      "title": "string",
      "hits": 0,
      "isEnabled": true,
      "createdAt": "string",
      "updatedAt": "string"
    }
  ],
  "total": 1
}

cURL Command:

curl -X GET https://api.snipzr.com/v1/urls \
-H "Authorization: Bearer YOUR_TOKEN"

GET /urls/:slug

Get a single short link

Response:

{
  "url": {
    "id": "string",
    "slug": "string",
    "url": "string",
    "title": "string",
    "hits": 0,
    "isEnabled": true,
    "createdAt": "string",
    "updatedAt": "string"
  }
}

cURL Command:

curl -X GET https://api.snipzr.com/v1/urls/example-slug \
-H "Authorization: Bearer YOUR_TOKEN"

DELETE /urls/:slug

Delete a single short link

Response:

{
  "message": "string"
}

cURL Command:

curl -X DELETE https://api.snipzr.com/v1/urls/example-slug \
-H "Authorization: Bearer YOUR_TOKEN"

GET /zones

Get available zones for link creation

Response:

{
  "global": [
    {
      "id": "string",
      "isDefault": true
    }
  ],
  "user": [
    {
      "id": "string",
      "isDefault": false
    }
  ]
}

cURL Command:

curl -X GET https://api.snipzr.com/v1/zones \
-H "Authorization: Bearer YOUR_TOKEN"
copyright © 2025 snipzr.com