# Get Shortened URL

`GET /tools/url/{linkId}`

Retrieve configuration and details for your shortened URL using its unique identifier.

## Authentication

Send your API key in the `PINNACLE-API-KEY` header.

## Parameters

- `linkId` — path, string. Unique identifier from your shortened URL. For example, for `https://pncl.to/ePzVxILF`, the `linkId` is `ePzVxILF`.

See the response of Create Shortened URL for more information.

## Responses

### 200

Returns your URL details.

Content type: `application/json`. Schema: `ShortenedUrlWithClickData`.

- `url` — `string`. Your custom shortened link following the format `https://pncl.to/{linkId}`, where `{linkId}` is the unique identifier for the URL that can be used with our other endpoint.
- `config` — `object`
- `config.to` — `string`. Destination URL that your shortened link redirects to.
- `config.expiresAt` — `string`. Expiration date for your shortened link in ISO 8601 format, or null if it's permanent.
- `clicks` — `object[]`. Array of click analytics data for this URL.

Click data will be empty if no one has visited your link yet.
- `clicks[].accept_language` — `string`, optional. Accept-Language header value.
- `clicks[].accuracy_radius_km` — `integer`, optional. Accuracy radius for geographic coordinates in kilometers.
- `clicks[].asn` — `integer`, optional. Autonomous System Number.
- `clicks[].blocked_reason` — `string`, optional. Reason why the request was blocked (if applicable).
- `clicks[].ch_ua_brand` — `string`, optional. User-Agent Client Hint brand.
- `clicks[].ch_ua_mobile` — `string`, optional. User-Agent Client Hint mobile indicator.
- `clicks[].ch_ua_platform` — `string`, optional. User-Agent Client Hint platform.
- `clicks[].city` — `string`, optional. City name.
- `clicks[].color_depth` — `integer`, optional. Color depth in bits.
- `clicks[].connection_type` — `string`, optional. Type of internet connection.
- `clicks[].country` — `string`, optional. Country code (ISO 3166-1 alpha-2).
- `clicks[].created_at` — `string`. Timestamp when the click occurred in ISO 8601 format.
- `clicks[].error_details` — `object`, optional. Error details if the request failed.
- `clicks[].fbclid` — `string`, optional. Facebook Click Identifier.
- `clicks[].final_url` — `string`, optional. Final resolved URL after redirects.
- `clicks[].fingerprint_id` — `string`, optional. Unique fingerprint identifier for the client.
- `clicks[].gclid` — `string`, optional. Google Click Identifier.
- `clicks[].ip_address` — `string`, optional. IP address of the visitor (may be anonymized).
- `clicks[].ip_chain` — `string[]`, optional. Chain of IP addresses for proxied requests.
- `clicks[].is_bot` — `boolean`, optional. Whether the request was identified as coming from a bot.
- `clicks[].latency_ms` — `integer`, optional. Request latency in milliseconds.
- `clicks[].latitude` — `number`, optional. Geographic latitude.
- `clicks[].longitude` — `number`, optional. Geographic longitude.
- `clicks[].metadata` — `object`, optional. Additional metadata as JSON object.
- `clicks[].method` — `string`, optional. HTTP method used.
- `clicks[].metro_code` — `integer`, optional. Metro area code.
- `clicks[].network_downlink` — `number`, optional. Network downlink speed estimate in Mbps.
- `clicks[].network_rtt` — `integer`, optional. Network round-trip time in milliseconds.
- `clicks[].performance_ttfb_ms` — `integer`, optional. Time to first byte in milliseconds,.
- `clicks[].postal_code` — `string`, optional. Postal/ZIP code.
- `clicks[].redirect_hops` — `integer`, optional. Number of redirect hops to reach final destination.
- `clicks[].referrer` — `string`, optional. The referring URL.
- `clicks[].referrer_domain` — `string`, optional. Domain of the referring URL.
- `clicks[].region` — `string`, optional. Region or state.
- `clicks[].resolved_at` — `string`, optional. Timestamp when the redirect was resolved in ISO 8601 format.
- `clicks[].screen_res` — `string`, optional. Screen resolution.
- `clicks[].status_code` — `integer`, optional. HTTP status code of the response.
- `clicks[].timezone_offset_min` — `integer`, optional. Timezone offset in minutes from UTC.
- `clicks[].tor_exit_node` — `boolean`, optional. Whether the request came from a Tor exit node.
- `clicks[].ua_browser` — `string`, optional. Browser name.
- `clicks[].ua_device` — `string`, optional. Device type.
- `clicks[].ua_os` — `string`, optional. Operating system.
- `clicks[].ua_version` — `string`, optional. Browser version.
- `clicks[].user_agent` — `string`, optional. User agent string from the browser.
- `clicks[].utm_campaign` — `string`, optional. UTM campaign parameter.
- `clicks[].utm_content` — `string`, optional. UTM content parameter.
- `clicks[].utm_medium` — `string`, optional. UTM medium parameter.
- `clicks[].utm_source` — `string`, optional. UTM source parameter.
- `clicks[].utm_term` — `string`, optional. UTM term.

Example:

```json
{
  "url": "https://pncl.to/ePzVxILF",
  "config": {
    "to": "https://pinnacle.sh",
    "expiresAt": "2023-10-23T16:18:25+00:00"
  },
  "clicks": [
    {
      "asn": null,
      "city": null,
      "gclid": null,
      "ua_os": null,
      "fbclid": null,
      "is_bot": false,
      "method": "GET",
      "region": null,
      "country": null,
      "ip_chain": null,
      "latitude": null,
      "metadata": {},
      "referrer": null,
      "utm_term": null,
      "final_url": null,
      "longitude": null,
      "ua_device": null,
      "created_at": "2025-07-09T23:57:28.889+00:00",
      "ip_address": null,
      "latency_ms": 400,
      "metro_code": null,
      "screen_res": null,
      "ua_browser": null,
      "ua_version": null,
      "user_agent": "vscode-restclient",
      "utm_medium": null,
      "utm_source": null,
      "ch_ua_brand": null,
      "color_depth": null,
      "network_rtt": null,
      "postal_code": null,
      "resolved_at": null,
      "status_code": 302,
      "utm_content": null,
      "ch_ua_mobile": null,
      "utm_campaign": null,
      "error_details": null,
      "redirect_hops": 0,
      "tor_exit_node": null,
      "blocked_reason": null,
      "ch_ua_platform": null,
      "fingerprint_id": null,
      "accept_language": null,
      "connection_type": null,
      "referrer_domain": null,
      "network_downlink": null,
      "accuracy_radius_km": null,
      "performance_ttfb_ms": null,
      "timezone_offset_min": null
    }
  ]
}
```

### 400

Validation failed. The payload has missing required fields and/or invalid types.

See https://zod.dev/error-formatting for more information.

Content type: `application/json`. Schema: `object`.

- `description` — `string`. Human-readable summary of validation failures.
- `errors` — `object`. Structured dictionary of issues containing two main sections:
- `errors`: Array of global validation errors not tied to specific fields
- `properties`: Object mapping field names to their specific validation errors, where each field contains an `errors` array

Example:

```json
{
  "description": "✖ Invalid input: expected string, received number\n  → at example_field",
  "errors": {
    "errors": [
      "Unrecognized key: 'extraKey'"
    ],
    "properties": {
      "example_field": {
        "errors": [
          "Invalid input: expected string, received NaN"
        ]
      }
    }
  }
}
```

### 401

The request lacks valid authentication credentials or the provided credentials are invalid.

Ensure you're including a valid API key in the request headers and that your account has the necessary permissions to access this endpoint.

Content type: `application/json`. Schema: `object`.

- `error` — `string`. Human-readable description of the error that occurred, corresponding to the HTTP status code.

Example:

```json
{
  "error": "Invalid API key."
}
```

### 403

Your subscription does not include access to this feature.

This occurs when attempting to use functionality that requires a higher subscription tier.
Please upgrade your subscription to access this feature.

Content type: `application/json`. Schema: `object`.

- `error` — `string`. Human-readable description of the error that occurred, corresponding to the HTTP status code.

Example:

```json
{
  "error": "Your subscription does not include access to this feature."
}
```

### 500

An unexpected error occurred on Pinnacle's servers while processing your request.

If this error persists, please contact support with the request details.

Content type: `application/json`. Schema: `object`.

- `error` — `string`. Human-readable description of the error that occurred, corresponding to the HTTP status code.

Example:

```json
{
  "error": "An unexpected error occurred while processing your request."
}
```

## SDK examples

### TypeScript

```typescript
import { PinnacleClient } from "rcs-js";

const client = new PinnacleClient({
  apiKey: process.env.PINNACLE_API_KEY!,
});

await client.tools.url.get("ePzVxILF");
```

### Python

```python
import os
from rcs import Pinnacle

client = Pinnacle(
    api_key=os.environ["PINNACLE_API_KEY"],
)

client.tools.url.get(
    link_id="ePzVxILF",
)
```

### Ruby

```ruby
require "rcs"

client = Pinnacle::Client.new(
  api_key: ENV.fetch("PINNACLE_API_KEY")
)

client.tools.url.get(link_id: "ePzVxILF")
```

## Machine-readable schema

[OpenAPI 3.1 JSON](https://docs.pinnacle.sh/openapi.json)
