# Update details of a single podcast episode.

`PUT /station/{station_id}/podcast/{podcast_id}/episode/{id}`

Authentication (security requirement alternatives):

```json
[
  {
    "ApiKey": []
  }
]
```

- ApiKey: apiKey, header X-API-Key

Parameters:

- `station_id` (path, unknown, required)
  Type: unknown
  
  anyOf:
    Type: integer, int64
  
    Type: string, string

- `podcast_id` (path, string, required) - Podcast ID
  Type: string

- `id` (path, string, required) - Podcast Episode ID
  Type: string

Request body: application/json

Type: object

Schema: [Api_PodcastEpisode](https://sourcey-azuracast.pages.dev/docs/api/models/api-podcastepisode/index.md)

allOf:
  Reference: [HasLinks](https://sourcey-azuracast.pages.dev/docs/api/models/haslinks/index.md); Type: object

  Type: object
  
  - `id` (optional)
    Type: string
  
  - `title` (optional)
    Type: string
  
  - `link` (optional)
    Type: string; nullable
  
  - `description` (optional)
    Type: string
  
  - `description_short` (optional)
    Type: string
  
  - `explicit` (optional)
    Type: boolean
  
  - `season_number` (optional)
    Type: integer; nullable
  
  - `episode_number` (optional)
    Type: integer; nullable
  
  - `created_at` (optional)
    Type: integer
  
  - `publish_at` (optional)
    Type: integer
  
  - `is_published` (optional)
    Type: boolean
  
  - `has_media` (optional)
    Type: boolean
  
  - `playlist_media_id` (optional)
    Type: string; nullable
  
  - `playlist_media` (optional)
    Type: unknown; nullable
    
    oneOf:
      Reference: [Api_Song](https://sourcey-azuracast.pages.dev/docs/api/models/api-song/index.md); Type: object
  
  - `media` (optional)
    Type: unknown; nullable
    
    oneOf:
      Reference: [Api_PodcastMedia](https://sourcey-azuracast.pages.dev/docs/api/models/api-podcastmedia/index.md); Type: object
  
  - `has_custom_art` (optional)
    Type: boolean
  
  - `art` (optional)
    Type: string; nullable
  
  - `art_updated_at` (optional)
    Type: integer

Responses:

- 200: Success

Content type: application/json

Type: object

Schema: [Api_Status](https://sourcey-azuracast.pages.dev/docs/api/models/api-status/index.md)

- `success` (required)
  Type: boolean
  
  Example:
  
  ```json
  true
  ```

- `message` (required)
  Type: string
  
  Example:
  
  ```json
  "Changes saved successfully."
  ```

- `formatted_message` (required)
  Type: string
  
  Example:
  
  ```json
  "<b>Changes saved successfully.</b>"
  ```

- 403: Access denied.

Content type: application/json

Type: object

Schema: [Api_Error](https://sourcey-azuracast.pages.dev/docs/api/models/api-error/index.md)

- `code` (required)
  Type: integer
  
  The numeric code of the error.
  
  Example:
  
  ```json
  500
  ```

- `type` (required)
  Type: string
  
  The programmatic class of error.
  
  Example:
  
  ```json
  "NotLoggedInException"
  ```

- `message` (required)
  Type: string
  
  The text description of the error.
  
  Example:
  
  ```json
  "Error description."
  ```

- `formatted_message` (required)
  Type: string; nullable
  
  The HTML-formatted text description of the error.
  
  Example:
  
  ```json
  "<b>Error description.</b><br>Detailed error text."
  ```

- `extra_data` (required)
  Type: array
  
  Stack traces and other supplemental data.
  
  Items:
    Type: any

- `success` (required)
  Type: boolean
  
  Used for API calls that expect an \Entity\Api\Status type response.
  
  Example:
  
  ```json
  false
  ```

- 404: Record not found.

Content type: application/json

Type: object

Schema: [Api_Error](https://sourcey-azuracast.pages.dev/docs/api/models/api-error/index.md)

- `code` (required)
  Type: integer
  
  The numeric code of the error.
  
  Example:
  
  ```json
  500
  ```

- `type` (required)
  Type: string
  
  The programmatic class of error.
  
  Example:
  
  ```json
  "NotLoggedInException"
  ```

- `message` (required)
  Type: string
  
  The text description of the error.
  
  Example:
  
  ```json
  "Error description."
  ```

- `formatted_message` (required)
  Type: string; nullable
  
  The HTML-formatted text description of the error.
  
  Example:
  
  ```json
  "<b>Error description.</b><br>Detailed error text."
  ```

- `extra_data` (required)
  Type: array
  
  Stack traces and other supplemental data.
  
  Items:
    Type: any

- `success` (required)
  Type: boolean
  
  Used for API calls that expect an \Entity\Api\Status type response.
  
  Example:
  
  ```json
  false
  ```

- 500: A generic exception has occurred.

Content type: application/json

Type: object

Schema: [Api_Error](https://sourcey-azuracast.pages.dev/docs/api/models/api-error/index.md)

- `code` (required)
  Type: integer
  
  The numeric code of the error.
  
  Example:
  
  ```json
  500
  ```

- `type` (required)
  Type: string
  
  The programmatic class of error.
  
  Example:
  
  ```json
  "NotLoggedInException"
  ```

- `message` (required)
  Type: string
  
  The text description of the error.
  
  Example:
  
  ```json
  "Error description."
  ```

- `formatted_message` (required)
  Type: string; nullable
  
  The HTML-formatted text description of the error.
  
  Example:
  
  ```json
  "<b>Error description.</b><br>Detailed error text."
  ```

- `extra_data` (required)
  Type: array
  
  Stack traces and other supplemental data.
  
  Items:
    Type: any

- `success` (required)
  Type: boolean
  
  Used for API calls that expect an \Entity\Api\Status type response.
  
  Example:
  
  ```json
  false
  ```

## Examples

### cURL

```bash
curl -X PUT 'https://demo.azuracast.com/api/station/0/podcast/string/episode/string' \
  -H 'X-API-Key: YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "id": "string",
  "title": "string",
  "link": "string",
  "description": "string",
  "description_short": "string",
  "explicit": true,
  "season_number": 0,
  "episode_number": 0,
  "created_at": 0,
  "publish_at": 0,
  "is_published": true,
  "has_media": true,
  "playlist_media_id": "string",
  "playlist_media": {
    "text": "Chet Porter - Aluko River",
    "artist": "Chet Porter",
    "title": "Aluko River",
    "album": "Moving Castle",
    "genre": "Rock",
    "isrc": "US28E1600021",
    "lyrics": "",
    "id": "9f33bbc912c19603e51be8e0987d076b",
    "art": "https://picsum.photos/1200/1200",
    "custom_fields": [
      "custom_field_value"
    ]
  },
  "media": {
    "id": "string",
    "original_name": "string",
    "length": 0,
    "length_text": "string",
    "path": "string",
    "size": 19693056
  },
  "has_custom_art": true,
  "art": "string",
  "art_updated_at": 0
}'
```

### JavaScript

```javascript
const body = `{
  "id": "string",
  "title": "string",
  "link": "string",
  "description": "string",
  "description_short": "string",
  "explicit": true,
  "season_number": 0,
  "episode_number": 0,
  "created_at": 0,
  "publish_at": 0,
  "is_published": true,
  "has_media": true,
  "playlist_media_id": "string",
  "playlist_media": {
    "text": "Chet Porter - Aluko River",
    "artist": "Chet Porter",
    "title": "Aluko River",
    "album": "Moving Castle",
    "genre": "Rock",
    "isrc": "US28E1600021",
    "lyrics": "",
    "id": "9f33bbc912c19603e51be8e0987d076b",
    "art": "https://picsum.photos/1200/1200",
    "custom_fields": [
      "custom_field_value"
    ]
  },
  "media": {
    "id": "string",
    "original_name": "string",
    "length": 0,
    "length_text": "string",
    "path": "string",
    "size": 19693056
  },
  "has_custom_art": true,
  "art": "string",
  "art_updated_at": 0
}`;

const response = await fetch('https://demo.azuracast.com/api/station/0/podcast/string/episode/string', {
  method: 'PUT',
  headers: {
    'X-API-Key': 'YOUR_TOKEN',
    'Content-Type': 'application/json',
  },
  body,
});

const data = await response.text();
```

### Python

```python
import requests

body = '''{
  "id": "string",
  "title": "string",
  "link": "string",
  "description": "string",
  "description_short": "string",
  "explicit": true,
  "season_number": 0,
  "episode_number": 0,
  "created_at": 0,
  "publish_at": 0,
  "is_published": true,
  "has_media": true,
  "playlist_media_id": "string",
  "playlist_media": {
    "text": "Chet Porter - Aluko River",
    "artist": "Chet Porter",
    "title": "Aluko River",
    "album": "Moving Castle",
    "genre": "Rock",
    "isrc": "US28E1600021",
    "lyrics": "",
    "id": "9f33bbc912c19603e51be8e0987d076b",
    "art": "https://picsum.photos/1200/1200",
    "custom_fields": [
      "custom_field_value"
    ]
  },
  "media": {
    "id": "string",
    "original_name": "string",
    "length": 0,
    "length_text": "string",
    "path": "string",
    "size": 19693056
  },
  "has_custom_art": true,
  "art": "string",
  "art_updated_at": 0
}'''

response = requests.put(
    'https://demo.azuracast.com/api/station/0/podcast/string/episode/string',
    data=body.encode('utf-8'),
    headers={
        'X-API-Key': 'YOUR_TOKEN',
        'Content-Type': 'application/json',
    },
)
print(response.text)
```
