---
title: "Fetch initial WordPress administrator credentials live from Hosted EZ Secrets (Cache-Control: no-store)"
---

> 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

`POST /v1/sites/{siteId}/wordpress/credentials`

## Authentication

- `sessionCookie`, apiKey, in cookie

## Path parameters

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

## Code samples

### cURL

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

### TypeScript

```typescript
const url = 'https://api.hostedez.com/v1/sites/string/wordpress/credentials';
const options = {method: 'POST', 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/wordpress/credentials"

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

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

print(response.text)
```

## Responses

### 200

WordPress administrator credentials

#### Example

```json
{
  "adminEmail": "string",
  "adminPassword": "string",
  "adminUrl": "string",
  "adminUser": "string"
}
```

- `getSiteWordPressCredentials.response.200.adminEmail` (string, required)
- `getSiteWordPressCredentials.response.200.adminPassword` (string, required)
- `getSiteWordPressCredentials.response.200.adminUrl` (string, required)
- `getSiteWordPressCredentials.response.200.adminUser` (string, required)

### 400

Invalid request

#### Example

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

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

### 401

Unauthenticated

#### Example

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

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

### 403

Forbidden origin

#### Example

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

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

### 404

Site not found or WordPress is not enabled for this site

#### Example

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

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

### 409

WordPress credentials are not ready yet

#### Example

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

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

### 503

Secrets service unavailable

#### Example

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

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


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