# Create a new podcast.

`POST /station/{station_id}/podcasts`

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

Request body: application/json

Type: object

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

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

  Type: object
  
  - `id` (optional)
    Type: string
  
  - `storage_location_id` (optional)
    Type: integer
  
  - `source` (optional)
    Type: string
  
  - `playlist_id` (optional)
    Type: integer; nullable
  
  - `playlist_auto_publish` (optional)
    Type: boolean
  
  - `title` (optional)
    Type: string
  
  - `link` (optional)
    Type: string; nullable
  
  - `description` (optional)
    Type: string
  
  - `description_short` (optional)
    Type: string
  
  - `explicit` (optional)
    Type: boolean
  
  - `is_enabled` (optional)
    Type: boolean
  
  - `branding_config` (optional)
    Reference: [PodcastBrandingConfiguration](https://sourcey-azuracast.pages.dev/docs/api/models/podcastbrandingconfiguration/index.md); Type: object
  
  - `language` (optional)
    Type: string
  
  - `language_name` (optional)
    Type: string
  
  - `author` (optional)
    Type: string
  
  - `email` (optional)
    Type: string
  
  - `has_custom_art` (optional)
    Type: boolean
  
  - `art` (optional)
    Type: string
  
  - `art_updated_at` (optional)
    Type: integer
  
  - `guid` (optional)
    Type: string
    
    The UUIDv5 global unique identifier for this podcast, based on its RSS feed URL.
  
  - `is_published` (optional)
    Type: boolean
  
  - `episodes` (optional)
    Type: integer
  
  - `categories` (optional)
    Type: array
    
    Items:
      Reference: [Api_PodcastCategory](https://sourcey-azuracast.pages.dev/docs/api/models/api-podcastcategory/index.md); Type: object

Responses:

- 200: Success

Content type: application/json

Type: object

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

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

  Type: object
  
  - `id` (optional)
    Type: string
  
  - `storage_location_id` (optional)
    Type: integer
  
  - `source` (optional)
    Type: string
  
  - `playlist_id` (optional)
    Type: integer; nullable
  
  - `playlist_auto_publish` (optional)
    Type: boolean
  
  - `title` (optional)
    Type: string
  
  - `link` (optional)
    Type: string; nullable
  
  - `description` (optional)
    Type: string
  
  - `description_short` (optional)
    Type: string
  
  - `explicit` (optional)
    Type: boolean
  
  - `is_enabled` (optional)
    Type: boolean
  
  - `branding_config` (optional)
    Reference: [PodcastBrandingConfiguration](https://sourcey-azuracast.pages.dev/docs/api/models/podcastbrandingconfiguration/index.md); Type: object
  
  - `language` (optional)
    Type: string
  
  - `language_name` (optional)
    Type: string
  
  - `author` (optional)
    Type: string
  
  - `email` (optional)
    Type: string
  
  - `has_custom_art` (optional)
    Type: boolean
  
  - `art` (optional)
    Type: string
  
  - `art_updated_at` (optional)
    Type: integer
  
  - `guid` (optional)
    Type: string
    
    The UUIDv5 global unique identifier for this podcast, based on its RSS feed URL.
  
  - `is_published` (optional)
    Type: boolean
  
  - `episodes` (optional)
    Type: integer
  
  - `categories` (optional)
    Type: array
    
    Items:
      Reference: [Api_PodcastCategory](https://sourcey-azuracast.pages.dev/docs/api/models/api-podcastcategory/index.md); Type: object

- 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 POST 'https://demo.azuracast.com/api/station/0/podcasts' \
  -H 'X-API-Key: YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "id": "string",
  "storage_location_id": 0,
  "source": "string",
  "playlist_id": 0,
  "playlist_auto_publish": true,
  "title": "string",
  "link": "string",
  "description": "string",
  "description_short": "string",
  "explicit": true,
  "is_enabled": true,
  "branding_config": {
    "public_custom_html": "string",
    "enable_op3_prefix": true
  },
  "language": "string",
  "language_name": "string",
  "author": "string",
  "email": "string",
  "has_custom_art": true,
  "art": "string",
  "art_updated_at": 0,
  "guid": "string",
  "is_published": true,
  "episodes": 0,
  "categories": [
    {
      "category": "string",
      "text": "string",
      "title": "string",
      "subtitle": "string"
    }
  ]
}'
```

### JavaScript

```javascript
const body = `{
  "id": "string",
  "storage_location_id": 0,
  "source": "string",
  "playlist_id": 0,
  "playlist_auto_publish": true,
  "title": "string",
  "link": "string",
  "description": "string",
  "description_short": "string",
  "explicit": true,
  "is_enabled": true,
  "branding_config": {
    "public_custom_html": "string",
    "enable_op3_prefix": true
  },
  "language": "string",
  "language_name": "string",
  "author": "string",
  "email": "string",
  "has_custom_art": true,
  "art": "string",
  "art_updated_at": 0,
  "guid": "string",
  "is_published": true,
  "episodes": 0,
  "categories": [
    {
      "category": "string",
      "text": "string",
      "title": "string",
      "subtitle": "string"
    }
  ]
}`;

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

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

### Python

```python
import requests

body = '''{
  "id": "string",
  "storage_location_id": 0,
  "source": "string",
  "playlist_id": 0,
  "playlist_auto_publish": true,
  "title": "string",
  "link": "string",
  "description": "string",
  "description_short": "string",
  "explicit": true,
  "is_enabled": true,
  "branding_config": {
    "public_custom_html": "string",
    "enable_op3_prefix": true
  },
  "language": "string",
  "language_name": "string",
  "author": "string",
  "email": "string",
  "has_custom_art": true,
  "art": "string",
  "art_updated_at": 0,
  "guid": "string",
  "is_published": true,
  "episodes": 0,
  "categories": [
    {
      "category": "string",
      "text": "string",
      "title": "string",
      "subtitle": "string"
    }
  ]
}'''

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