---
title: "Deletes a file synchronously. Requires a `secret_*` API key. Alternatively, you can use a `public_*` API key and JWT-based auth."
method: DELETE
path: "/v2/accounts/{accountId}/files"
tags: ["File"]
---

# Deletes a file synchronously. Requires a \`secret_\*\` API key. Alternatively, you can use a \`public_\*\` API key and JWT-based auth.

`DELETE /v2/accounts/{accountId}/files`

## Request

- Base URL: `https://api.bytescale.com`
- URL: `https://api.bytescale.com/v2/accounts/{accountId}/files`
- Auth: API key in header `Authorization`
- TypeScript: <https://skmtc.dev/bytescale/apis/bytescale-api/docs/v2/accounts/:accountId/files/delete.ts> (a function with typed inputs; its response is checked against the schema)

Deletes a file synchronously.

Requires a `secret_*` API key. Alternatively, you can use a `public_*` API key and JWT-based auth.

## Path parameters

- `accountId` string, required: Your account ID. This is visible on the settings page: https://www.bytescale.com/dashboard/settings

## Query parameters

- `filePath` string, required: Absolute path to a file. Begins with a `/`.

## Response `200`

Success.

## Other responses

- `401`: Unauthenticated.

## Changes

- **2026-09-01** `d63ecdd9ae9c`: 1 breaking, 1 info
  - removed the success response with the status `204`
  - added the success response with the status `200`

[Operation history](https://skmtc.dev/bytescale/apis/bytescale-api/changes/v2/accounts/:accountId/files/delete.md)

---

[API](https://skmtc.dev/bytescale/apis/bytescale-api.md) - [All operations](https://skmtc.dev/bytescale/apis/bytescale-api/llms.txt) - [OpenAPI document](https://skmtc.dev/bytescale/apis/bytescale-api/revisions/d63ecdd9ae9c?raw)
