Here’s the full API documentation for the DELETE /entities/:entityId endpoint:
Delete Entity
Endpoint
URL: /entities/:entityId
Method: DELETE
Authentication Required: Yes
Description
Deletes an existing entity within the project. Only the entity author or a master user can perform this operation. Deletion also deducts reputation from the original author.
Request
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
entityId | string | Yes | The ID of the entity to delete. |
Headers
| Header | Type | Required | Description |
|---|---|---|---|
Authorization | string | Yes | Bearer token for authenticated users. |
Response
Success Response (204 No Content)
Entity was successfully deleted. No response body is returned.
Error Responses
Invalid ID (400 Bad Request)
{
"error": "Invalid entityId.",
"code": "entity/invalid-id"
}Not Found (404 Not Found)
{
"error": "Entity not found.",
"code": "entity/not-found"
}Unauthorized (403 Forbidden)
{
"error": "Not authorized to delete this entity.",
"code": "entity/not-authorized"
}Delete Failed (404 Not Found)
{
"error": "Entity not found or already deleted.",
"code": "entity/delete-failed"
}Server Error (500 Internal Server Error)
{
"error": "Failed to delete the entity.",
"code": "entity/server-error",
"details": "[error message]"
}Notes
- Only the original author or a master user can delete an entity.
- Deleting an entity deducts reputation points from the author if applicable.
- If the entity does not exist or was already deleted, the operation is a no-op.
Here’s the full API documentation for the
DELETE /entities/:entityIdendpoint:
Delete Entity
Endpoint
URL: /entities/:entityId
Method: DELETE
Authentication Required: Yes
Description
Deletes an existing entity within the project. Only the entity author or a master user can perform this operation. Deletion also deducts reputation from the original author.
Request
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
entityId | string | Yes | The ID of the entity to delete. |
Headers
| Header | Type | Required | Description |
|---|---|---|---|
Authorization | string | Yes | Bearer token for authenticated users. |
Response
Success Response (204 No Content)
Entity was successfully deleted. No response body is returned.
Error Responses
Invalid ID (400 Bad Request)
{
"error": "Invalid entityId.",
"code": "entity/invalid-id"
}Not Found (404 Not Found)
{
"error": "Entity not found.",
"code": "entity/not-found"
}Unauthorized (403 Forbidden)
{
"error": "Not authorized to delete this entity.",
"code": "entity/not-authorized"
}Delete Failed (404 Not Found)
{
"error": "Entity not found or already deleted.",
"code": "entity/delete-failed"
}Server Error (500 Internal Server Error)
{
"error": "Failed to delete the entity.",
"code": "entity/server-error",
"details": "[error message]"
}Notes
- Only the original author or a master user can delete an entity.
- Deleting an entity deducts reputation points from the author if applicable.
- If the entity does not exist or was already deleted, the operation is a no-op.