Skip to main content

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

HeaderRequiredDescription
AuthorizationYesBearer <access_token>

Path Parameters

ParameterTypeRequiredDescription
prompt_idintegerYesPrompt ID

Response

Success (200)

{
"success": true,
"data": {
"prompt_id": 1,
"deleted_at": "2024-12-01T11:00:00Z"
},
"message": "Prompt deleted successfully"
}

Error Codes

StatusCodeDescription
401UNAUTHORIZEDInvalid or missing authentication token
404NOT_FOUNDPrompt not found

Features

  • Soft delete (sets deleted_at timestamp)
  • 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>"