# Update details of a single mount point.

`PUT /station/{station_id}/mount/{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

- `id` (path, integer, int64, required) - Mount Point ID
  Type: integer, int64

Request body: application/json

Type: object

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

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

  Type: object
  
  - `name` (optional)
    Type: string
    
    Example:
    
    ```json
    "/radio.mp3"
    ```
  
  - `display_name` (optional)
    Type: string
    
    Example:
    
    ```json
    "128kbps MP3"
    ```
  
  - `is_visible_on_public_pages` (optional)
    Type: boolean
    
    Example:
    
    ```json
    true
    ```
  
  - `is_default` (optional)
    Type: boolean
    
    Example:
    
    ```json
    false
    ```
  
  - `is_public` (optional)
    Type: boolean
    
    Example:
    
    ```json
    false
    ```
  
  - `fallback_mount` (optional)
    Type: string; nullable
    
    Example:
    
    ```json
    "/error.mp3"
    ```
  
  - `relay_url` (optional)
    Type: string; nullable
    
    Example:
    
    ```json
    "https://radio.example.com:8000/radio.mp3"
    ```
  
  - `authhash` (optional)
    Type: string; nullable
    
    Example:
    
    ```json
    ""
    ```
  
  - `max_listener_duration` (optional)
    Type: integer
    
    Example:
    
    ```json
    43200
    ```
  
  - `enable_autodj` (optional)
    Type: boolean
    
    Example:
    
    ```json
    true
    ```
  
  - `autodj_format` (optional)
    Type: unknown; nullable
    
    Example:
    
    ```json
    "mp3"
    ```
    
    oneOf:
      Reference: [StreamFormats](https://sourcey-azuracast.pages.dev/docs/api/models/streamformats/index.md); Type: string
      
      enum: ["mp3","ogg","aac","opus","flac"]
  
  - `autodj_bitrate` (optional)
    Type: integer; nullable
    
    Example:
    
    ```json
    128
    ```
  
  - `custom_listen_url` (optional)
    Type: string; nullable
    
    Example:
    
    ```json
    "https://custom-listen-url.example.com/stream.mp3"
    ```
  
  - `frontend_config` (optional)
    Type: string; nullable
  
  - `listeners_unique` (optional)
    Type: integer
    
    The most recent number of unique listeners.
    
    Example:
    
    ```json
    10
    ```
  
  - `listeners_total` (optional)
    Type: integer
    
    The most recent number of total (non-unique) listeners.
    
    Example:
    
    ```json
    12
    ```

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/mount/0' \
  -H 'X-API-Key: YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "name": "/radio.mp3",
  "display_name": "128kbps MP3",
  "is_visible_on_public_pages": true,
  "is_default": false,
  "is_public": false,
  "fallback_mount": "/error.mp3",
  "relay_url": "https://radio.example.com:8000/radio.mp3",
  "authhash": "",
  "max_listener_duration": 43200,
  "enable_autodj": true,
  "autodj_format": "mp3",
  "autodj_bitrate": 128,
  "custom_listen_url": "https://custom-listen-url.example.com/stream.mp3",
  "frontend_config": "string",
  "listeners_unique": 10,
  "listeners_total": 12
}'
```

### JavaScript

```javascript
const body = `{
  "name": "/radio.mp3",
  "display_name": "128kbps MP3",
  "is_visible_on_public_pages": true,
  "is_default": false,
  "is_public": false,
  "fallback_mount": "/error.mp3",
  "relay_url": "https://radio.example.com:8000/radio.mp3",
  "authhash": "",
  "max_listener_duration": 43200,
  "enable_autodj": true,
  "autodj_format": "mp3",
  "autodj_bitrate": 128,
  "custom_listen_url": "https://custom-listen-url.example.com/stream.mp3",
  "frontend_config": "string",
  "listeners_unique": 10,
  "listeners_total": 12
}`;

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

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

### Python

```python
import requests

body = '''{
  "name": "/radio.mp3",
  "display_name": "128kbps MP3",
  "is_visible_on_public_pages": true,
  "is_default": false,
  "is_public": false,
  "fallback_mount": "/error.mp3",
  "relay_url": "https://radio.example.com:8000/radio.mp3",
  "authhash": "",
  "max_listener_duration": 43200,
  "enable_autodj": true,
  "autodj_format": "mp3",
  "autodj_bitrate": 128,
  "custom_listen_url": "https://custom-listen-url.example.com/stream.mp3",
  "frontend_config": "string",
  "listeners_unique": 10,
  "listeners_total": 12
}'''

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