Delete Specific Content Version
DELETE /articles/{correlationId}/content/{lang}/{id} - Delete Specific Content Version
Delete a specific content version from an article. This operation removes a single content version while preserving the article and other content versions in the same or different languages.
Endpoint
DELETE /v1/knowledge-base/articles/{correlationId}/content/{lang}/{id}Request Headers
Header | Value | Required |
|---|---|---|
|
| Yes |
Path Parameters
Parameter | Type | Required | Description |
|---|---|---|---|
|
| Yes | The correlation ID of the article. Can be custom ID or internal ID prefixed with 'pf_' |
|
| Yes | The language code of the content (ISO 639-1 format, e.g., 'en', 'es', 'fr') |
|
| Yes | The correlation ID of the specific content version to delete. Can be custom ID or internal ID prefixed with 'pf_' |
Parameter Details
Article Correlation ID Format
- Custom IDs: Use your own correlation ID as provided during import (e.g.,
"my-article-001") - Internal IDs: Use internal database ID prefixed with
"pf_"(e.g.,"pf_123")
Language Code Format
- Must be a valid ISO 639-1 language code (2 characters)
- Case-sensitive (use lowercase)
- Examples:
en,es,fr,de,zh,ja
Content Version ID Format
- Custom IDs: Use your own correlation ID as provided during content import (e.g.,
"content-v2-en") - Internal IDs: Use internal database ID prefixed with
"pf_"(e.g.,"pf_456")
Response Format
Success Response (200 OK)
{
"message": "Content version content-v2-en deleted successfully"
}Examples
Example 1: Delete Specific Content Version
curl -X DELETE "https://api.productfruits.com/v1/knowledgebase/articles/getting-started-001/content/en/content-v2-en" \
-H "Authorization: Bearer YOUR_API_TOKEN"Response:
{
"message": "Content version content-v2-en deleted successfully"
}Example 2: Delete Version by Internal IDs
curl -X DELETE "https://api.productfruits.com/v1/knowledgebase/articles/pf_123/content/en/pf_456" \
-H "Authorization: Bearer YOUR_API_TOKEN"Response:
{
"message": "Content version pf_456 deleted successfully"
}Example 3: Error Handling Example
# Attempt to delete a non-existent content version
curl -X DELETE "https://api.productfruits.com/v1/knowledgebase/articles/getting-started-001/content/en/non-existent-version" \
-H "Authorization: Bearer YOUR_API_TOKEN"Response (400 Bad Request):
{
"error": "Content version not found or access denied"
}What Gets Deleted
When you delete a specific content version, the following items are permanently removed:
Version-Specific Data
- The specific content version (title, content, metadata)
- Version creation and modification history
- Publishing status for that specific version
- SEO data specific to that version
Analytics Data
- View statistics for that specific version
- User engagement data for that version
- Search performance metrics for that version
What Remains Intact
- Article metadata and settings
- Other content versions in the same language
- Content in other languages
- Category assignments and article properties
- Overall article analytics (aggregated data)
Common Use Cases
Version Management
Remove outdated content versions while keeping the latest ones in each language
Quality Control
Remove content versions that failed review or contain errors
Rollback Operations
Remove problematic versions and revert to previous stable versions
Storage Optimization
Clean up test, development, or experimental versions from production
Best Practices
- Verify Version Details: Use
GET /articlesto confirm the version exists and check its status - Check Published Status: Be extra careful when deleting published versions as it affects live content
- Maintain Version History: Keep at least one version per language for historical reference
- Backup Before Deletion: Export version content using
GET /articlesbefore deletion - Handle Errors Gracefully: Implement proper error handling for non-existent versions
- Respect Rate Limits: Add delays between multiple deletions to avoid hitting rate limits
Common Error Scenarios
Version Not Found
Cause: Incorrect correlation IDs (article, language, or content version)
Solution: Verify all three IDs using GET /articles endpoint
Last Version Protection
Cause: Attempting to delete the only remaining version in a language
Solution: Create new version before deleting, or delete entire language content instead
Permission Issues
Cause: Insufficient API key permissions for version deletion
Solution: Check API token permissions and user roles
Invalid Parameters
Cause: Malformed correlation IDs or invalid language codes
Solution: Validate parameter formats before making requests
Error Response Examples
400 Bad Request - Missing Article Correlation ID
{
"error": "Article correlation ID is required"
}400 Bad Request - Missing Language Code
{
"error": "Language code is required"
}400 Bad Request - Missing Content ID
{
"error": "Valid content correlation ID is required"
}400 Bad Request - Not Found
{
"error": "Content version not found or access denied"
}401 Unauthorized
{
"error": "Authentication required or invalid API token"
}500 Internal Server Error
{
"error": "Internal server error occurred while deleting content version"
}Rate Limiting
Please read this guide for detailed information about API limits and optimization strategies