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

# Delete Royalty Source (Admin)

> Deletes a royalty source by its ID.

<Note>
  This endpoint requires authentication. Include your Bearer token in the Authorization header.
</Note>

## Description

### Required Permissions

* `sources:admin:delete`

### Business Rules

* Cannot delete a source that is associated with any tenants
* Must first remove all tenant associations before deleting

### Validation

* Checks for existing tenant associations
* Returns 400 error if associations exist

## Code Examples

<CodeGroup>
  ```javascript Node.js theme={null}
  const response = await fetch('https://api.royalti.io/sources/admin/example-id', {
    method: 'DELETE',
    headers: {
      'Authorization': `Bearer ${token}`,
    },
  });

  const data = await response.json();
  console.log(data);
  ```

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

  response = requests.delete(
    'https://api.royalti.io/sources/admin/example-id',
    headers={
      'Authorization': f'Bearer {token}'
    },
  )

  data = response.json()
  print(data)
  ```

  ```bash cURL theme={null}
  curl -X DELETE https://api.royalti.io/sources/admin/example-id \
    -H "Authorization: Bearer YOUR_TOKEN" \

  ```
</CodeGroup>
