> ## Documentation Index
> Fetch the complete documentation index at: https://api-docs.voicecheap.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete Project

> Permanently delete a translation project

# Delete Project

Permanently delete a translation project and its associated assets.

This cleanup also removes any stored cloned voice preview example files that were generated for the project.

If some internal generated files or segment records were already removed before deletion completes, cleanup continues in best-effort mode and still finalizes the project deletion.

<Warning>
  This operation is irreversible. The project, works, generated media assets, and stored voice preview example files will be deleted.
</Warning>

## Request

### Headers

<ParamField header="x-api-key" type="string" required>
  Your VoiceCheap API key. Get one from [app.voicecheap.ai/page-api](https://app.voicecheap.ai/page-api).
</ParamField>

### Path Parameters

<ParamField path="projectId" type="string" required>
  The unique identifier of the translation project to delete.
</ParamField>

## Response

<ResponseField name="success" type="boolean" required>
  Indicates the delete operation completed successfully.
</ResponseField>

<ResponseField name="message" type="string" required>
  Human-readable confirmation message.
</ResponseField>

<ResponseField name="projectId" type="string" required>
  The ID of the deleted project.
</ResponseField>

## Examples

<CodeGroup>
  ```bash cURL theme={null}
  curl -X DELETE "https://api.voicecheap.ai/v1/translate/abc123-def456-ghi789" \
    -H "x-api-key: vc_your-api-key"
  ```

  ```typescript TypeScript theme={null}
  interface DeleteProjectResponse {
    success: true;
    message: string;
    projectId: string;
  }

  async function deleteProject(projectId: string): Promise<DeleteProjectResponse> {
    const response = await fetch(
      `https://api.voicecheap.ai/v1/translate/${projectId}`,
      {
        method: 'DELETE',
        headers: {
          'x-api-key': 'vc_your-api-key',
        },
      },
    );

    if (!response.ok) {
      const error = await response.json();
      throw new Error(error.message || 'Failed to delete project');
    }

    return response.json();
  }

  // Usage
  deleteProject('abc123-def456-ghi789')
    .then((result) => console.log('Deleted:', result.projectId))
    .catch((error) => console.error('Error:', error));
  ```

  ```python Python theme={null}
  import requests

  project_id = 'abc123-def456-ghi789'
  headers = {'x-api-key': 'vc_your-api-key'}

  response = requests.delete(
      f'https://api.voicecheap.ai/v1/translate/{project_id}',
      headers=headers
  )

  if not response.ok:
      error = response.json()
      raise Exception(error.get('message', 'Failed to delete project'))

  result = response.json()
  print(f"Deleted: {result['projectId']}")
  ```

  ```php PHP theme={null}
  <?php
  $apiKey = 'vc_your-api-key';
  $projectId = 'abc123-def456-ghi789';

  $curl = curl_init();

  curl_setopt_array($curl, [
      CURLOPT_URL => "https://api.voicecheap.ai/v1/translate/{$projectId}",
      CURLOPT_RETURNTRANSFER => true,
      CURLOPT_CUSTOMREQUEST => 'DELETE',
      CURLOPT_HTTPHEADER => [
          "x-api-key: {$apiKey}"
      ]
  ]);

  $response = curl_exec($curl);
  $result = json_decode($response, true);

  if (!isset($result['success'])) {
      $message = $result['message'] ?? 'Failed to delete project';
      throw new Exception($message);
  }

  echo "Deleted: " . $result['projectId'];
  ```
</CodeGroup>

## Errors

| Status | Code                  | Description                                       |
| ------ | --------------------- | ------------------------------------------------- |
| 401    | `INVALID_API_KEY`     | The provided API key is invalid                   |
| 403    | `FORBIDDEN`           | You don't have permission to delete this project  |
| 404    | `PROJECT_NOT_FOUND`   | The specified project does not exist              |
| 429    | `RATE_LIMIT_EXCEEDED` | Too many requests (limit: 10 requests per minute) |
| 500    | `INTERNAL_ERROR`      | Unexpected server error                           |
