# catalog_licenses_program_create_create API View for creating program licenses. This endpoint allows administrators to create new program licenses with various configurations. Methods: POST: Create a new program license Request Body: A JSON object containing: - platform_key (str, required): The platform to create a license for - program_id (str, required): The program ID to create a license for - name (str, optional): Display name for the license - count (int, optional): Number of seats purchased (default: 0) - started (datetime, optional): Date when license should begin - expired (datetime, optional): Date when license should expire - active (bool, optional): Whether the license is active (default: true) - metadata (dict, optional): Additional license metadata - enrollment_config (dict, optional): Additional enrollment configuration - source (str, optional): Source identifier - external_id (str, optional): External identifier (must be unique) Returns: POST: A JSON response containing the created license: { "id": 123, "created": "2023-06-15T14:30:00Z", "started": "2023-06-15T14:30:00Z", "expired": null, "name": "Program License 2023", "count": 100, "active": true, "metadata": {}, "source": "source", "external_id": "ext-123", "platform_key": "platform1", "program_id": "program-v1:org+program+run" } Error Responses: 400 Bad Request: If required parameters are missing or invalid 401 Unauthorized: If the user is not authenticated 403 Forbidden: If the user does not have permission to create licenses 500 Internal Server Error: If an unexpected error occurs during license creation Access Control: - Requires IsDMAdmin permission - Available only to DM administrators Endpoint: POST /api/catalog/licenses/program/create/ Version: 3.59.0-ai-plus Security: PlatformApiKeyAuthentication ## Request fields (application/json): - `platform_key` (string) The unique identifier for the platform (required if platform_id not provided) - `platform_org` (string) The organization identifier for the platform (required if platform_id not provided) - `platform_id` (integer) The ID of the platform (required if platform_key/org not provided) - `program_key` (string, required) The unique identifier for the program to license - `name` (string, required) Display name for the license - `count` (integer, required) Number of seats purchased - `started` (string, required) Date when license should begin - `expired` (string,null) Date when license should expire - `external_id` (string,null) External identifier for the license - `active` (boolean) Whether the license should be active - `metadata` (object) Additional license metadata - `enrollment_config` (object) Enrollment configuration - `source` (string) Source identifier - `transaction_id` (string) Transaction identifier for tracking ## Response 200 fields (application/json): - `id` (integer, required) The unique identifier for the license - `created` (string, required) When the license was created - `started` (string, required) When the license becomes active - `expired` (string,null, required) When the license expires (null if no expiration) - `name` (string, required) The display name of the license - `count` (integer, required) The number of seats purchased - `active` (boolean, required) Whether the license is active - `metadata` (object, required) Additional license metadata - `source` (string, required) The source identifier for the license - `external_id` (string,null, required) External identifier for the license (null if none) - `platform_key` (string, required) The platform key associated with the license - `program_id` (string) The program ID associated with the license - `program_key` (string) The program key associated with the license - `program_name` (string) The name of the program associated with the license - `usage_count` (integer, required) Number of assignments using this license - `assignments` (object) Assignment counts by status (only included in verbose mode)