---
title: "Get SFTP connection details, password status, and SSH public keys for a site"
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.hostedez.com/llms.txt
> Use this file to discover all available pages before exploring further.

Path: Hosted EZ REST API

`GET /v1/sites/{siteId}/sftp`

## Authentication

- `sessionCookie`, apiKey, in cookie

## Path parameters

- `getSiteSFTP.path.siteId` (string, required) — Site slug (sit_...) or UUID.

## Code samples

### cURL

```curl
curl --request GET \
  --url https://api.hostedez.com/v1/sites/string/sftp \
  --header '__Secure-better-auth.session_token: <value>'
```

### TypeScript

```typescript
const url = 'https://api.hostedez.com/v1/sites/string/sftp';
const options = {method: 'GET', headers: {'__Secure-better-auth.session_token': '<value>'}};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.hostedez.com/v1/sites/string/sftp"

headers = {"__Secure-better-auth.session_token": "<value>"}

response = requests.get(url, headers=headers)

print(response.text)
```

## Responses

### 200

Site SFTP settings and SSH keys

#### Example

```json
{
  "host": "string",
  "keys": [
    {
      "createdAt": "2019-08-24T14:15:22Z",
      "fingerprint": "string",
      "id": "string",
      "label": "string"
    }
  ],
  "passwordRotatedAt": "2019-08-24T14:15:22Z",
  "passwordSet": true,
  "port": 0,
  "username": "string"
}
```

- `getSiteSFTP.response.200.host` (string, required)
- `getSiteSFTP.response.200.keys` (array<object>, required)
  - `getSiteSFTP.response.200.keys.createdAt` (string, required)
    - format `date-time`
  - `getSiteSFTP.response.200.keys.fingerprint` (string, required)
  - `getSiteSFTP.response.200.keys.id` (string, required)
  - `getSiteSFTP.response.200.keys.label` (string, required)
- `getSiteSFTP.response.200.passwordRotatedAt` (string | null, required)
  - format `date-time`
- `getSiteSFTP.response.200.passwordSet` (boolean, required)
- `getSiteSFTP.response.200.port` (integer, required)
- `getSiteSFTP.response.200.username` (string, required)

### 401

Unauthenticated

#### Example

```json
{
  "error": {
    "code": "string",
    "issues": [
      {
        "message": "string",
        "path": "string"
      }
    ],
    "message": "string"
  }
}
```

- `getSiteSFTP.response.401.error` (object, required)
  - `getSiteSFTP.response.401.error.code` (string, required)
  - `getSiteSFTP.response.401.error.message` (string, required)
  - `getSiteSFTP.response.401.error.issues` (array<object>, optional)
    - `getSiteSFTP.response.401.error.issues.message` (string, required)
    - `getSiteSFTP.response.401.error.issues.path` (string, required)

### 404

Site not found

#### Example

```json
{
  "error": {
    "code": "string",
    "issues": [
      {
        "message": "string",
        "path": "string"
      }
    ],
    "message": "string"
  }
}
```

- `getSiteSFTP.response.404.error` (object, required)
  - `getSiteSFTP.response.404.error.code` (string, required)
  - `getSiteSFTP.response.404.error.message` (string, required)
  - `getSiteSFTP.response.404.error.issues` (array<object>, optional)
    - `getSiteSFTP.response.404.error.issues.message` (string, required)
    - `getSiteSFTP.response.404.error.issues.path` (string, required)


Source: https://docs.hostedez.com/api/getSiteSFTP/index.md
