Skip to main content
PATCH
Update URL Status

Authorizations

Authorization
string
header
required

API key authentication. Pass your key as: Bearer spoo_<your_key>

Path Parameters

url_id
string
required

Unique identifier of the URL

Body

application/json

Request body for updating only the status of a shortened URL.

status
enum<string>
required

New status for the URL. ACTIVE enables redirects, INACTIVE disables them.

Available options:
ACTIVE,
INACTIVE
Example:

"ACTIVE"

Response

Successful Response

Response body after a successful URL update (PATCH /api/v1/urls/{url_id}).

id
string
required

MongoDB ObjectId of the URL.

Example:

"507f1f77bcf86cd799439011"

password_set
boolean
required

Whether the URL is password-protected.

updated_at
integer
required

Last update time as Unix timestamp.

Example:

1704067200

alias
string | null

Short code.

Example:

"mylink"

long_url
string | null

Destination URL.

Example:

"https://example.com/long/url"

status
string | null

URL status.

Example:

"ACTIVE"

max_clicks
integer | null

Click limit, or null if unlimited.

Example:

100

expire_after
integer | null

Expiration as Unix timestamp, or null.

Example:

1735689599

block_bots
boolean | null

Whether bot blocking is enabled.

private_stats
boolean | null

Whether statistics are private.