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

# Delete Profile

> Delete a profile

## Overview

Delete a profile from the system. This operation will fail if the profile has existing invoices or subprofiles with requests.

<Warning>
  This action is irreversible. Make sure you want to permanently delete this profile before proceeding.
</Warning>

## Path Parameters

<ParamField path="rfc" type="string" required>
  The RFC (Mexican tax ID) or UUID of the profile to delete
</ParamField>

## Response

Returns a success message on successful deletion.

<ResponseField name="success" type="boolean">
  Whether the deletion was successful
</ResponseField>

<ResponseField name="message" type="string">
  Confirmation message
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X DELETE "https://app.usatimbre.com/api/profile/XAXX010101000" \
    -H "Authorization: Bearer tmb_your_api_key_here"
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://app.usatimbre.com/api/profile/XAXX010101000', {
    method: 'DELETE',
    headers: {
      'Authorization': 'Bearer tmb_your_api_key_here'
    }
  });
  const result = await response.json();
  ```

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

  response = requests.delete(
      'https://app.usatimbre.com/api/profile/XAXX010101000',
      headers={'Authorization': 'Bearer tmb_your_api_key_here'}
  )
  result = response.json()
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "success": true,
    "message": "Profile deleted successfully"
  }
  ```

  ```json 400 theme={null}
  {
    "error": "Bad Request",
    "message": "Cannot delete profile with existing invoices"
  }
  ```

  ```json 404 theme={null}
  {
    "error": "Not Found",
    "message": "Profile not found"
  }
  ```
</ResponseExample>
