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
Create a new short link
{
"url": {
"id": "string",
"slug": "string",
"url": "string",
"title": "string",
"hits": 0,
"isEnabled": true,
"createdAt": "string",
"updatedAt": "string"
}
}
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"
}'
Update an existing short link
{
"url": {
"id": "string",
"slug": "string",
"url": "string",
"title": "string",
"hits": 0,
"isEnabled": true,
"createdAt": "string",
"updatedAt": "string"
}
}
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 all short links
{
"urls": [
{
"id": "string",
"slug": "string",
"url": "string",
"title": "string",
"hits": 0,
"isEnabled": true,
"createdAt": "string",
"updatedAt": "string"
}
],
"total": 1
}
curl -X GET https://api.snipzr.com/v1/urls \
-H "Authorization: Bearer YOUR_TOKEN"
Get a single short link
{
"url": {
"id": "string",
"slug": "string",
"url": "string",
"title": "string",
"hits": 0,
"isEnabled": true,
"createdAt": "string",
"updatedAt": "string"
}
}
curl -X GET https://api.snipzr.com/v1/urls/example-slug \
-H "Authorization: Bearer YOUR_TOKEN"
Delete a single short link
{
"message": "string"
}
curl -X DELETE https://api.snipzr.com/v1/urls/example-slug \
-H "Authorization: Bearer YOUR_TOKEN"
Get available zones for link creation
{
"global": [
{
"id": "string",
"isDefault": true
}
],
"user": [
{
"id": "string",
"isDefault": false
}
]
}
curl -X GET https://api.snipzr.com/v1/zones \
-H "Authorization: Bearer YOUR_TOKEN"