Skip to main content
PUT
https://snip.sa
/
api
/
urls
/
{id}
curl -X PUT https://snip.sa/api/urls/507f1f77bcf86cd799439011 \
  -H "Content-Type: application/json" \
  -H "X-API-Key: your_api_key_here" \
  -d '{
    "title": "Updated Title",
    "isActive": true,
    "tags": ["updated", "tags"]
  }'
{
  "success": true,
  "message": "URL updated successfully",
  "data": {
    "url": {
      "_id": "507f1f77bcf86cd799439011",
      "title": "Updated Title",
      "tags": ["updated", "tags"],
      "isActive": true,
      "updatedAt": "2024-01-16T14:20:00.000Z"
    }
  }
}

Path Parameters

id
string
required
URL ID

Request Body

You cannot update originalUrl or shortCode. All fields are optional.
title
string
Updated title
description
string
Updated description
tags
array
Updated tags array
isActive
boolean
Enable or disable the URL
customCode
string
Update custom code
expiresAt
string
Update expiration date
password
string
Update password protection
utm
object
Update UTM parameters
restrictions
object
Update access restrictions
redirectType
number
Update redirect type (301 or 302)
curl -X PUT https://snip.sa/api/urls/507f1f77bcf86cd799439011 \
  -H "Content-Type: application/json" \
  -H "X-API-Key: your_api_key_here" \
  -d '{
    "title": "Updated Title",
    "isActive": true,
    "tags": ["updated", "tags"]
  }'
{
  "success": true,
  "message": "URL updated successfully",
  "data": {
    "url": {
      "_id": "507f1f77bcf86cd799439011",
      "title": "Updated Title",
      "tags": ["updated", "tags"],
      "isActive": true,
      "updatedAt": "2024-01-16T14:20:00.000Z"
    }
  }
}