{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-docs/api-reference/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["api-container","api-content","endpoint","api-examples","tabs","tab","code-group"]},"redocly_category":"API Reference","searchWeight":120,"type":"markdown"},"seo":{"title":"Delete a chat artifact ref","description":"Complete API reference and documentation for Freddy AI-powered backend system by Aitronos","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"delete-a-chat-artifact-ref","__idx":0},"children":["Delete a chat artifact ref"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Soft-delete a chat artifact ref. Removes the ref from the user's chat-artifact list — the underlying artifact entity is untouched and remains accessible through the artifact workspace surface. The operation is idempotent: repeated calls return ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["204"]}," even if the ref was already soft-deleted, and return ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["404"]}," if the ref never existed for this user."]},{"$$mdtype":"Tag","name":"ApiContainer","attributes":{},"children":[{"$$mdtype":"Tag","name":"ApiContent","attributes":{},"children":[{"$$mdtype":"Tag","name":"Endpoint","attributes":{"method":"DELETE","path":"https://api.aitronos.com/v1/chat-artifacts/refs/{ref_id}"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"path-parameters","__idx":1},"children":["Path parameters"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ref_id"]}]}," string ",{"$$mdtype":"Tag","name":"em","attributes":{"style":{"color":"#ef4444 !important","fontWeight":"600 !important","fontStyle":"normal !important"}},"children":["required"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Identifier of the chat artifact ref to soft-delete. Always prefixed ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["carfref_"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"returns","__idx":2},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["204 No Content"]}," on success (or no-op for an already-deleted ref). ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["404 Not Found"]}," when the ref does not exist or belongs to another user — the two cases are indistinguishable to prevent ref-id enumeration."]}]},{"$$mdtype":"Tag","name":"ApiExamples","attributes":{},"children":[{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"div","attributes":{"label":"Request","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeGroup","attributes":{"mode":"dropdown"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","data-title":"cURL","header":{"title":"cURL","controls":{"copy":{}}},"source":"curl -X DELETE \"https://api.aitronos.com/v1/chat-artifacts/refs/carfref_aaaa1111bbbb2222cccc3333dddd4444\" \\\n  -H \"X-API-Key: $FREDDY_API_KEY\"\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"python","data-title":"Python SDK","header":{"title":"Python SDK","controls":{"copy":{}}},"source":"from aitronos import Aitronos\n\nclient = Aitronos(api_key=\"your-api-key\")\nclient.chat_artifacts.refs.delete(\n    ref_id=\"carfref_aaaa1111bbbb2222cccc3333dddd4444\",\n)\n","lang":"python"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"python","data-title":"Python","header":{"title":"Python","controls":{"copy":{}}},"source":"import os, requests\n\nrequests.delete(\n    \"https://api.aitronos.com/v1/chat-artifacts/refs/carfref_aaaa1111bbbb2222cccc3333dddd4444\",\n    headers={\"X-API-Key\": os.environ[\"FREDDY_API_KEY\"]},\n)\n","lang":"python"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"javascript","data-title":"JavaScript","header":{"title":"JavaScript","controls":{"copy":{}}},"source":"await fetch(\n  \"https://api.aitronos.com/v1/chat-artifacts/refs/carfref_aaaa1111bbbb2222cccc3333dddd4444\",\n  {\n    method: \"DELETE\",\n    headers: { \"X-API-Key\": process.env.FREDDY_API_KEY },\n  },\n);\n","lang":"javascript"},"children":[]}]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"Response","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["204 No Content"]}," on success — the response body is empty."]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"Error","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"RESOURCE_NOT_FOUND\",\n    \"message\": \"The requested resource could not be found.\",\n    \"system_message\": \"Chat artifact ref not found\",\n    \"type\": \"client_error\",\n    \"status\": 404,\n    \"details\": {\"ref_id\": \"carfref_aaaa1111bbbb2222cccc3333dddd4444\"},\n    \"trace_id\": \"...\",\n    \"timestamp\": \"...\"\n  }\n}\n","lang":"json"},"children":[]}]}]}]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"related-resources","__idx":3},"children":["Related Resources"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/api-reference/chat-artifacts/list-refs"},"children":["List chat artifact refs"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/api-reference/chat-artifacts/get-ref"},"children":["Retrieve a chat artifact ref"]}]}]}]},"headings":[{"value":"Delete a chat artifact ref","id":"delete-a-chat-artifact-ref","depth":1},{"value":"Path parameters","id":"path-parameters","depth":2},{"value":"Returns","id":"returns","depth":2},{"value":"Related Resources","id":"related-resources","depth":2}],"frontmatter":{"title":"Delete a chat artifact ref","seo":{"title":"Delete a chat artifact ref"}},"lastModified":"2026-10-26T18:32:31.520Z","pagePropGetterError":{"message":"","name":""}},"slug":"/docs/api-reference/chat-artifacts/delete-ref","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}