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

# deleteDataSource

> Archives a source, or with `hardDelete` deletes it for good. Fails with `ConflictError` while any card definition, archived ones included, uses the source, and with `NotFoundError` when no live source has the id, so an archived source can't be hard-deleted.



**mutation** `deleteDataSource(input: DeleteDataSourceInput!): DeleteDataSourcePayload!`

## Arguments

**`input`**: `DeleteDataSourceInput!` (required)

## Returns

`DeleteDataSourcePayload!`

**`empty`**: `Empty`

---

**`errors`**: `[DeleteDataSourceError!]`

## Examples

```graphql Mutation
mutation DeleteDataSource($input: DeleteDataSourceInput!) {
  deleteDataSource(input: $input) {
    empty {
      value
    }
    errors {
      __typename
      ... on GraphQlError {
        code
        details {
          __typename
        }
        message
      }
    }
  }
}
```

```json Variables
{
  "input": {
    "hardDelete": true,
    "id": "id"
  }
}
```

```json Response
{
  "data": {
    "deleteDataSource": {
      "empty": {
        "value": 1
      },
      "errors": [
        {
          "__typename": "GraphQlError",
          "code": "string",
          "details": [
            {
              "__typename": "KeyValuePairOfStringAndString"
            }
          ],
          "message": "string"
        }
      ]
    }
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.