diff --git a/src/index.js b/src/index.js
index 94fa182a3cec7e9e2c69df3f64d1f6ce0a7b9717..7c815b6f0b49a851ca09044207f9c63e20978473 100644
--- a/src/index.js
+++ b/src/index.js
@@ -45,6 +45,16 @@ app.post('/api/tasks', (req, res) => {
     }
 });
 
+app.delete('/api/tasks/:id', (req, res) => {
+    const id = req.params.id;
+    const result = taskService.deleteTask(id);
+    if (result) {
+        res.status(204).send();
+    } else {
+        res.status(404).json({ error: 'Tâche non trouvée' });
+    }
+});
+
 // Fonction pour démarrer le serveur
 const startServer = () => {
     const server = app.listen(port, () => {
diff --git a/src/taskService.js b/src/taskService.js
index 1ec2dd452d95b72a1b5b6ad9285dd67637a5fa06..e564d91f7ec3e0ed6528636d0b446d52dca238d2 100644
--- a/src/taskService.js
+++ b/src/taskService.js
@@ -28,9 +28,20 @@ function addTask(description) {
     return newTask;
 }
 
+function deleteTask(id) {
+    const taskId = parseInt(id, 10);
+    const index = tasks.findIndex(task => task.id === taskId);
+    if (index === -1) {
+        return false;
+    }
+    tasks.splice(index, 1);
+    return true;
+}
+
 //export des fonctions
 module.exports = {
     getAllTasks,
     getTaskById,
-    addTask
+    addTask,
+    deleteTask
 };
diff --git a/tests/integration/app.test.js b/tests/integration/app.test.js
index 79bdebee3c0f1ec93b53a8f1842ad369defdbd4c..c83e54605139ac60b816ea0b1f1dceb97fc5fdd9 100644
--- a/tests/integration/app.test.js
+++ b/tests/integration/app.test.js
@@ -64,4 +64,29 @@ describe('POST /api/tasks', () => {
         expect(response.body).toHaveProperty('error', 'La description est requise');
     });
 
+});
+
+
+describe('DELETE /api/tasks/:id', () => {
+
+    test('should delete an existing task and return 204', async () => {
+        const addResponse = await request(app)
+            .post('/api/tasks')
+            .send({ description: "Task to delete via DELETE endpoint" });
+        expect(addResponse.statusCode).toBe(201);
+        const taskId = addResponse.body.id;
+
+        const deleteResponse = await request(app).delete(`/api/tasks/${taskId}`);
+        expect(deleteResponse.statusCode).toBe(204);
+
+        const getResponse = await request(app).get(`/api/tasks/${taskId}`);
+        expect(getResponse.statusCode).toBe(404);
+    });
+
+    test('should return 404 when trying to delete a non-existent task', async () => {
+        const response = await request(app).delete('/api/tasks/99999');
+        expect(response.statusCode).toBe(404);
+        expect(response.body).toEqual({ error: 'Tâche non trouvée' });
+    });
+
 });
\ No newline at end of file
diff --git a/tests/unit/todoService.test.js b/tests/unit/todoService.test.js
index a5409b434cae156f7af2a0ea9f30a6f84733501e..a252acc5b71a8884ba3ebfafeb492b70c4e2320d 100644
--- a/tests/unit/todoService.test.js
+++ b/tests/unit/todoService.test.js
@@ -1,7 +1,7 @@
 //test unitaire des fonctions de service
 
 // Import de la fonction à tester
-const { getAllTasks, getTaskById, addTask } = require('../../src/taskService');
+const { getAllTasks, getTaskById, addTask, deleteTask } = require('../../src/taskService');
 
 //Test de la fonction de récupération de toutes les tâches.
 test('should return all tasks', () => {
@@ -32,4 +32,21 @@ test('should add a new task with provided description', () => {
 
 test('should throw an error if description is missing', () => {
     expect(() => addTask()).toThrow("La description est requise");
+});
+
+test('should delete a task with a valid id', () => {
+    const initialLength = getAllTasks().length;
+    
+    const newTask = addTask("Task to delete");
+    expect(getAllTasks().length).toBe(initialLength + 1);
+    
+    const result = deleteTask(newTask.id);
+    expect(result).toBe(true);
+    
+    expect(getAllTasks().length).toBe(initialLength);
+});
+
+test('should return false when deleting a non-existent task', () => {
+    const result = deleteTask(999);
+    expect(result).toBe(false);
 });
\ No newline at end of file