# Kiteworks API — shortLinks Operations

**1 endpoint** | [Browse interactive reference](https://developer.kiteworks.com/api-reference/shortLinks.html) | [Download spec slice](https://developer.kiteworks.com/assets/specs/shortLinks.json)

> **Authentication required.** All requests must include a Bearer access token in the
> `Authorization` header. See [Authentication](https://developer.kiteworks.com/authentication.md) for how to
> obtain a token using OAuth 2.0 Authorization Code (PKCE) or JWT Bearer flow.

---

## GET /rest/shortLinks/{ref}

**Summary:** Short Link

Returns the properties of the specified short link, including the associated entity ID, entity type, and expiration date. Access to email-package short links is allowed without authentication when the package access control is set to no-auth.

**Parameters:**

| Name | In | Required | Description |
|------|----|----------|-------------|
| `ref` | path | yes | The ref value of the short link |
| `mode` | query | no | Determines the detail level of the response body. |

**Responses:**

| Code | Description |
|------|-------------|
| 200 | Short link details retrieved successfully. |
| 490 | Request blocked by WAF |

**Response Examples:**

**200 (ShortlinkInfo):**

```json
{
  "entityTypeId": 1,
  "entityId": "a1b2c3d4-e5f6-4789-abcd-ef1234567890",
  "entityTypeName": "object",
  "expire": null
}
```

**Code Samples:**

**cURL:**

```shell
curl -X GET \
  "https://{instance}.kiteworks.com/rest/shortLinks/:ref" \
  -H "Authorization: Bearer YOUR_TOKEN"
```

**Python:**

```python
import requests

ref = "VALUE"  # The ref value of the short link

url = f"https://{{instance}}.kiteworks.com/rest/shortLinks/{ref}"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
}
response = requests.get(url, headers=headers)
print(response.json())
```

---
