> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://contentful.com/developers/docs/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://contentful.com/_mcp/server. # Unpublish an AI action DELETE https://api.contentful.com/spaces/{space_id}/environments/{environment_id}/ai/actions/{ai_action_id}/published Use this endpoint to unpublish an AI Action for a specified space. Reference: https://contentful.com/developers/docs/references/content-management-api/ai-actions/unpublish-an-ai-action ## Authentication - `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer `, where token is your auth token. ## Request ### Path parameters - `space_id` (string, required) — ID of the space in the form of a string - `environment_id` (string, required) — ID of the environment in the form of a string - `ai_action_id` (string, required) — ID of the AI Action in form of a string ## Response ### 200 OK - Request successful - `map from string to any` ## Examples **Response** ```json { "configuration": { "modelTemperature": 0.1, "modelType": "anthropic.claude-3-5-sonnet" }, "description": "Convert text to another language.", "instruction": { "template": "You are an expert in translating text to {{var.t82kaxhw0s13}}. Your task is to convert the provided content to the specified language while maintaining the original message and intent.", "variables": [ { "description": "Target language or region for the translation.", "name": "Locale", "type": "Locale" } ] }, "name": "Translate", "sys": { "createdAt": "2025-03-27T09:27:43.654Z", "createdBy": { "sys": { "id": "1xGZIRXr2WPnsLkKfREo0z", "linkType": "User", "type": "Link" } }, "id": "3D5GGn5FlhszToS2Sbkfk8", "publishedAt": "2025-03-27T09:39:33.032Z", "publishedBy": { "sys": { "id": "1xGZIRXr2WPnsLkKfREo0z", "linkType": "User", "type": "Link" } }, "publishedVersion": 1, "space": { "sys": { "id": "yadj1kx9rmg0", "linkType": "Space", "type": "Link" } }, "type": "AiAction", "updatedAt": "2025-03-27T09:39:32.524Z", "updatedBy": { "sys": { "id": "1xGZIRXr2WPnsLkKfREo0z", "linkType": "User", "type": "Link" } }, "version": 1 }, "testCases": [ { "type": "Text", "value": "This is an example text" } ] } ``` **SDK Code** ```android Android SDK currently doesn't implement this endpoint. ``` ```java Java SDK currently doesn't implement this endpoint. ``` ```kotlin Kotlin SDK currently doesn't implement this endpoint. ``` ```swift Swift We currently don't provide a CMA SDK for this platform. ``` ```js-legacy JavaScript (legacy) import { createClient } from 'contentful-management' const client = createClient({ accessToken: '' }, { type: 'legacy' }) client.getSpace('') .then((space) => space.unpublishAiAction('')) .then(() => console.log('Ai Action unpublished.')) .catch(console.error) ``` ```javascript JavaScript import { createClient } from 'contentful-management' // Client init const client = contentful.createClient({ accessToken: '' }) await client.aiAction.unpublish({ spaceId: '', aiActionId: '', }); ``` ```php PHP SDK currently doesn't implement this endpoint. ``` ```ruby Ruby SDK currently doesn't implement this endpoint. ``` ```python Python SDK currently doesn't implement this endpoint. ``` ```.net .NET SDK currently doesn't implement this endpoint. ```