DocsAPI referenceFiles
Delete several files
Deletes up to 100 uploads and outputs. Each id is answered on its own: deleted, or failed with the code and reason its single delete would answer.
POST /v1/files/delete
Needs an API key: Authorization: Bearer $VIDEXO_API_KEY.
Body DeleteFilesRequest
| Name | Type | Description |
|---|---|---|
ids required | array of string, up to 128 characters | 1 to 100 file ids. |
Request
bash
curl -X POST "$VIDEXO_API_URL/v1/files/delete" \
-H "Authorization: Bearer $VIDEXO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"ids": [
"up_0123456789abcdef01234567"
]
}'Copy failed. The text is selected; copy it with your keyboard.
JavaScript
const response = await fetch(`${process.env.VIDEXO_API_URL}/v1/files/delete`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.VIDEXO_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"ids": [
"up_0123456789abcdef01234567"
]
}),
});
const result = await response.json();Copy failed. The text is selected; copy it with your keyboard.
Response
200 JSON
{
"deleted": [
"up_0123456789abcdef01234567"
],
"failed": []
}Copy failed. The text is selected; copy it with your keyboard.
Responses
| Status | Body | When |
|---|---|---|
| 200 | DeleteFilesResult | What was deleted and what was not. |
| 400 | Problem | invalid_request |
| 401 | Problem | authentication_failed (missing_api_key, invalid_api_key, api_key_revoked, api_key_expired) |
| 403 | Problem | permission_denied (token_scope): a client token cannot call this route |
| 413 | Problem | limit_exceeded (request_body_size) |
| 429 | Problem | rate_limited |