# Create preset prompt div strong 🔨 In Development — This section is still being developed and may change. Add a new preset prompt to an assistant for quick-start conversations. #### Path Parameters **`assistant_id`** string required The unique identifier of the assistant to add the preset prompt to. #### Request Body **`name`** string required Display name of the preset prompt (1-255 characters). **`value`** string required The full prompt text inserted into the conversation (minimum 1 character). **`icon_id`** string optional Identifier of a predefined icon from the icons catalog. [List icons →](/docs/api-reference/icons/list) — or — **`icon`** object optional Custom icon metadata used when `icon_id` is not provided. details summary Show properties **`id`** string · Stable icon identifier **`url`** string · Absolute URL of the icon asset (SVG/PNG) **`alt`** string · Accessible description for the icon **`order_index`** integer optional · Defaults to `0` Zero-based position for ordering. Create Preset Prompt ```bash curl https://api.freddy.aitronos.com/v1/assistants/ass_0c23daea5e34/preset-prompts \ -X POST \ -H "Authorization: Bearer $FREDDY_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "Welcome Message", "value": "Hello! How can I help you today?", "icon_id": "icon_welcome", "order_index": 0 }' ``` ```python import requests response = requests.post( "https://api.freddy.aitronos.com/v1/assistants/ass_0c23daea5e34/preset-prompts", headers={ "Authorization": f"Bearer {api_key}", "Content-Type": "application/json" }, json={ "name": "Welcome Message", "value": "Hello! How can I help you today?", "icon_id": "icon_welcome", "order_index": 0 } ) prompt = response.json() print(f"Created preset prompt: {prompt['preset_prompt_id']}") ``` ```javascript const response = await fetch('https://api.freddy.aitronos.com/v1/assistants/ass_0c23daea5e34/preset-prompts', { method: 'POST', headers: { 'Authorization': `Bearer ${api_key}`, 'Content-Type': 'application/json' }, body: JSON.stringify({ name: 'Welcome Message', value: 'Hello! How can I help you today?', icon_id: 'icon_welcome', order_index: 0 }) }); const prompt = await response.json(); console.log(`Created preset prompt: ${prompt.preset_prompt_id}`); ``` Minimal Request ```bash curl https://api.freddy.aitronos.com/v1/assistants/ass_0c23daea5e34/preset-prompts \ -X POST \ -H "Authorization: Bearer $FREDDY_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "Quick Start", "content": "Let'\''s get started!" }' ``` ```python import requests response = requests.post( "https://api.freddy.aitronos.com/v1/assistants/ass_0c23daea5e34/preset-prompts", headers={ "Authorization": f"Bearer {api_key}", "Content-Type": "application/json" }, json={ "name": "Quick Start", "content": "Let's get started!" } ) prompt = response.json() ``` ```javascript const response = await fetch('https://api.freddy.aitronos.com/v1/assistants/ass_0c23daea5e34/preset-prompts', { method: 'POST', headers: { 'Authorization': `Bearer ${api_key}`, 'Content-Type': 'application/json' }, body: JSON.stringify({ name: 'Quick Start', content: 'Let\'s get started!' }) }); const prompt = await response.json(); ``` ## Response ## Returns A [Preset Prompt object](/docs/api-reference/objects/preset-prompt-object). 201 Created ```json { "preset_prompt_id": 1, "preset_prompt_name": "Welcome Message", "preset_prompt_value": "Hello! How can I help you today?", "preset_prompt_icon": { "id": "icon_welcome", "url": "https://cdn.aitronos.com/icons/icon-welcome.svg", "alt": "Speech bubble icon" }, "order_index": 0, "is_active": true, "created_at": "2025-01-20T10:30:00Z", "updated_at": "2025-01-20T10:30:00Z" } ``` Errors ```json { "message": "Validation errors in 2 fields. See details for more information.", "detail": "Validation errors in 2 fields. See details for more information.", "error_code": "VALIDATION_ERROR", "status_code": 422, "path": "/v1/assistants/ass_0c23daea5e34/preset-prompts", "method": "POST", "validation_errors": [ { "field": "body -> name", "message": "String should have at most 255 characters", "type": "string_too_long" }, { "field": "body -> content", "message": "String should have at least 1 character", "type": "string_too_short" } ] } ```