title: Create Pricing Tier keywords: - create pricing tier - post - create - pricing - tier # Create Pricing Tier Create a new pricing tier. #### Request Body **`id`** string required Tier ID (e.g., tier_custom) **`name`** string required Tier name **`description`** string optional Tier description **`discount_percentage`** number required Discount percentage (0-100) **`is_active`** boolean optional ยท Defaults to `true` Whether tier is active ## Returns **`id`** string Id **`name`** string Name **`description`** string or null Description **`discount_percentage`** number Discount Percentage **`is_active`** boolean Is Active **`created_at`** string Created At **`updated_at`** string Updated At Example ```bash cURL curl -X POST "https://api.aitronos.com/v1/pricing-tiers" \ -H "X-API-Key: $FREDDY_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "id": "your_id", "name": "your_name", "discount_percentage": "your_discount_percentage" }' ``` ```python Python import os import requests api_key = os.environ["FREDDY_API_KEY"] response = requests.post( "https://api.aitronos.com/v1/pricing-tiers", headers={"X-API-Key": api_key}, json={'id': 'your_id', 'name': 'your_name', 'discount_percentage': 'your_discount_percentage'} ) print(response.json()) ``` ```javascript JavaScript const apiKey = process.env.FREDDY_API_KEY; const response = await fetch('https://api.aitronos.com/v1/pricing-tiers', { method: 'POST', headers: { 'X-API-Key': apiKey, 'Content-Type': 'application/json' }, body: JSON.stringify({"id": "your_id", "name": "your_name", "discount_percentage": "your_discount_percentage"}) }); const data = await response.json(); console.log(data); ``` **Response:** ```json 201 OK { "id": "abc123def456", "name": "My Resource", "description": "A description of the resource", "discount_percentage": 0.95, "is_active": true, "created_at": "2025-11-15T10:30:00Z", "updated_at": "2025-11-15T10:30:00Z" } ``` Errors ```json 401 Unauthorized { "success": false, "error": { "code": "AUTHENTICATION_REQUIRED", "message": "Authentication required. Please provide a valid API key.", "system_message": "Missing or invalid authorization header", "type": "authentication_error", "status": 401, "trace_id": "req_abc123xyz", "timestamp": "2025-11-11T10:30:00Z", "details": {} } } ``` ```json 403 Forbidden { "success": false, "error": { "code": "INSUFFICIENT_PERMISSIONS", "message": "You do not have permission to access this resource.", "system_message": "Insufficient permissions for this operation", "type": "authorization_error", "status": 403, "trace_id": "req_def456uvw", "timestamp": "2025-11-11T10:30:00Z", "details": {} } } ``` ## Related Resources - [List Pricing Tiers](/docs/api-reference/pricing/list-pricing-tiers) - [Get Pricing Tier](/docs/api-reference/admin/pricing-tiers/get)