Skip to content

Delete Enum

Deletes an Enum model from the project’s schema.

Reference protection

If any entity field of type enum references this enum, the deletion is rejected with 409 CONFLICT and nothing is deleted. There is no force override — remove or repoint the referencing field first, then retry.

Endpoint

shell
curl -X DELETE https://api.contentisland.net/api/1.0/model/enum/:id \
--header 'Authorization: Bearer YOUR_WRITE_TOKEN'

Path Parameters

NameTypeRequiredDescription
idstringyesThe 24-character id of the enum to delete.

Example

shell
curl -X DELETE https://api.contentisland.net/api/1.0/model/enum/660f5b8a3a1c2d4e7f8b34cd \
--header 'Authorization: Bearer YOUR_WRITE_TOKEN'

Response

On success the endpoint returns 204 No Content with an empty body.

Status Codes

CodeDescription
204The enum was deleted.
401Unauthorized. The token is missing, malformed or expired.
403Forbidden. The token does not have write permissions — use a Write Token.
404No enum with the given :id exists in the project.
409The enum is referenced by an entity field and cannot be deleted. Remove the reference first.
500Internal server error.