Delete a File
DELETEhttps://api.zigned.se/rest/v3/files/:file_id
Delete a file uploaded by the authenticated client or user.
Request
Path Parameters
file_id cuidrequired
DELETE /files/:file_id parameter
Responses
- 200
- 400
DELETE /files/:file_id Successful response
- application/json
- Schema
- Example (from schema)
Schema
version stringrequired
Possible values: [1.0
]
The version of the response schema
result_type stringrequired
Possible values: [deleted
]
Returns a single object of the file resource which was deleted.
resource_type stringrequired
Possible values: [file
]
Data contains the file resource.
data objectrequired
{
"version": "1.0",
"result_type": "deleted",
"resource_type": "file",
"data": {
"id": "cdypzghb8xpdp4c6kgvexample",
"resource_type": "file",
"filename": "my-file.pdf",
"mime_type": "application/pdf",
"url": "https://zigned.se",
"metadata": {
"lookup_key": "file_tag"
},
"created_at": "2024-01-01T00:00:00.000Z",
"updated_at": "2024-01-01T00:00:00.000Z"
}
}
DELETE /files/:file_id Error response
- application/json
- Schema
- Example (from schema)
Schema
status stringrequired
Possible values: [error
]
error objectrequired
{
"status": "error",
"error": {
"code": 0,
"message": "string",
"request_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
}
Authorization: http
name: HTTP_1type: httpscheme: bearer
- curl
- python
- go
- nodejs
- ruby
- csharp
- php
- java
- powershell
- CURL
curl -L -X DELETE 'https://api.zigned.se/rest/v3/files/:file_id' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>'