curl -X PUT https://app.tracia.io/api/v1/prompts/welcome-email \ -H "Authorization: Bearer tr_your_api_key" \ -H "Content-Type: application/json" \ -d '{ "name": "Updated Welcome Email", "content": [ { "id": "msg_1", "role": "user", "content": "Write a friendly welcome email for {{name}} at {{company}}." } ] }'
{ "id": "clx1abc123", "slug": "welcome-email", "name": "Updated Welcome Email", "description": "A welcome email template", "model": "gpt-4", "modelConfigurationId": "clx0xyz789", "currentVersion": 4, "content": [ { "id": "msg_1", "role": "user", "content": "Write a friendly welcome email for {{name}} at {{company}}." } ], "variables": ["name", "company"], "createdAt": "2024-01-15T10:30:00.000Z", "updatedAt": "2024-01-22T08:45:00.000Z" }
Update an existing prompt
Bearer tr_your_api_key