# Detach a file from a task

`DELETE /api/task/{taskId}/files/{fileId}`

URL: https://repsona.com/api/delete-task-taskid-files-fileid

## Parameters

| name | in | type | required | description |
| --- | --- | --- | --- | --- |
| `taskId` | path | integer | required | ID of the task. |
| `fileId` | path | integer | required | ID of the file, returned as `id` when the file was uploaded. |

## Request

```sh
curl -X DELETE "https://<space>.repsona.com/api/task/{taskId}/files/{fileId}" \
  -H "Authorization: Bearer $REPSONA_API_KEY"
```

## Responses

- 200: Remaining attached files
- 401: Authentication is required
- 403: Not a project member
- 404: Task not found

## Example response

```json
{
  "files": []
}
```
