Skip to main content
PATCH
/
urls
/
{url_id}
Update URL
curl --request PATCH \
  --url https://spoo.me/api/v1/urls/{url_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "long_url": "<string>",
  "alias": "<string>",
  "password": "<string>",
  "max_clicks": 123,
  "expire_after": 123,
  "block_bots": true,
  "private_stats": true,
  "status": "ACTIVE"
}
'
{
  "id": "<string>",
  "alias": "<string>",
  "long_url": "<string>",
  "status": "ACTIVE",
  "password_set": true,
  "max_clicks": 123,
  "expire_after": 123,
  "block_bots": true,
  "private_stats": true,
  "updated_at": 123
}

Authorizations

Authorization
string
header
required

API key in format: spoo_. Use in Authorization header as 'Bearer spoo_'

Path Parameters

url_id
string
required

MongoDB ObjectId of the URL

Body

application/json
long_url
string<uri>

New destination URL

alias
string

New custom short code

password
string | null

Update or remove password (null to remove)

max_clicks
integer | null

Update or remove click limit (null to remove)

expire_after
integer | null

Update or remove expiration (null to remove)

block_bots
boolean | null

Update or remove bot blocking (null to remove)

private_stats
boolean | null

Update or remove stats privacy (null to remove)

status
enum<string>

Change URL status

Available options:
ACTIVE,
INACTIVE

Response

URL updated successfully

id
string
alias
string
long_url
string<uri>
status
enum<string>
Available options:
ACTIVE,
INACTIVE
password_set
boolean
max_clicks
integer | null
expire_after
integer | null
block_bots
boolean
private_stats
boolean
updated_at
integer

Unix timestamp