Delete Prompt
Sprint 3
Soft delete a prompt. Sets deleted_at timestamp but does not permanently remove from database.
Endpoint
DELETE /api/v1/prompts/{prompt_id}
Headers
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Bearer <access_token> |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
prompt_id | integer | Yes | Prompt ID |
Response
Success (200)
{
"success": true,
"data": {
"prompt_id": 1,
"deleted_at": "2024-12-01T11:00:00Z"
},
"message": "Prompt deleted successfully"
}
Error Codes
| Status | Code | Description |
|---|---|---|
| 401 | UNAUTHORIZED | Invalid or missing authentication token |
| 404 | NOT_FOUND | Prompt not found |
Features
- Soft delete (sets
deleted_attimestamp) - Organization-scoped access control
- Prompt is not permanently removed from database
Important Notes
- This is a soft delete - the prompt is marked as deleted but not permanently removed
- Deleted prompts are excluded from normal queries
- Can be restored if needed (implementation-dependent)
Example
curl -X DELETE "https://api.rivergen.com/api/v1/prompts/1" \
-H "Authorization: Bearer <access_token>"
Related Endpoints
- List Prompts - List all prompts (excludes deleted by default)
- Clear History - Clear prompt history