Skip to main content
GET
/
details
Get URL Details
curl --request GET \
  --url https://api.example.com/details
{
  "message": "<string>",
  "data": {
    "data.url_code": "<string>",
    "data.url_hits": 123,
    "data.url_created_at": {},
    "data.url_state": true,
    "data.url": "<string>"
  }
}
This endpoint returns comprehensive information about a short URL, combining data from both the URLStats and URLMap collections.
This endpoint requires authentication. Include a valid Bearer token in the Authorization header.

Authentication

This endpoint uses HTTPBearer security. Include the access token obtained from the /login endpoint:
Authorization: Bearer <access_token>
The URL code is automatically extracted from the authenticated token, so no additional parameters are required.

Response

message
string
Success message
data
object
Object containing complete URL details and statistics
data.url_code
string
The short URL code
data.url_hits
integer
Number of times this short URL has been accessed
data.url_created_at
datetime
Timestamp when the short URL was created
data.url_state
boolean
Whether the URL is active (true) or paused (false)
data.url
string
The destination URL that the short URL redirects to

Status Codes

  • 200: Details retrieved successfully
  • 404: URL not found
  • 403: Invalid or expired token
curl -X GET https://api.example.com/details \
  -H "Authorization: Bearer <access_token>"
The response combines data from:
  • URLStats collection: url_code, url_hits, url_created_at, url_state
  • URLMap collection: url (destination URL)
The internal _id field is excluded from the response.

Build docs developers (and LLMs) love