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

# Delete

> Delete a data connector and all associated data.

This operation will:
- Delete all vector data stored in the VDB
- Remove the connector configuration
- Clean up connection sharing metadata if enabled

## Request Body

| Field             | Type   | Description                                      |
|-------------------|--------|--------------------------------------------------|
| `connector_name`  | `str`  | The profile name of the data connector to delete.|

## Response

- **200**: VDB connector deleted successfully  
    - Returns: `{ "profile_id": str }`
- **404**: Connector not found
- **500**: Internal Server Error (e.g., failed to store secret)

## Example

```json
{
  "connector_name": "my-pinecone-db"
}
```



## OpenAPI

````yaml /deasy-openapi-stainless.yml post /data_connector/delete
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: /rest/unstructured
security: []
paths:
  /data_connector/delete:
    post:
      tags:
        - Data Connectors
      summary: Delete
      description: >-
        Delete a data connector and all associated data.


        This operation will:

        - Delete all vector data stored in the VDB

        - Remove the connector configuration

        - Clean up connection sharing metadata if enabled


        ## Request Body


        | Field             | Type   |
        Description                                      |

        |-------------------|--------|--------------------------------------------------|

        | `connector_name`  | `str`  | The profile name of the data connector to
        delete.|


        ## Response


        - **200**: VDB connector deleted successfully  
            - Returns: `{ "profile_id": str }`
        - **404**: Connector not found

        - **500**: Internal Server Error (e.g., failed to store secret)


        ## Example


        ```json

        {
          "connector_name": "my-pinecone-db"
        }

        ```
      operationId: delete_data_source_route_data_connector_delete_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeleteConnectorRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectorResponse'
        '403':
          description: Missing token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPError'
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPError'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPError'
        '500':
          description: >-
            Internal Server Error. An unexpected error occurred while processing
            the request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPError'
      security:
        - BasicAuth: []
        - BearerAuth: []
          UserIdAuth: []
      x-codeSamples:
        - lang: Python
          source: |-
            import os
            from unstructured import UnstructuredClient

            client = UnstructuredClient(
                username=os.environ.get("UNSTRUCTURED_USERNAME"),  # This is the default and can be omitted
                password=os.environ.get("UNSTRUCTURED_PASSWORD"),  # This is the default and can be omitted
            )
            connector_response = client.data_source.delete(
                connector_name="connector_name",
            )
            print(connector_response.profile_id)
        - lang: JavaScript
          source: >-
            import UnstructuredClient from 'unstructured-sdk';


            const client = new UnstructuredClient({
              authMethod: 'My Auth Method',
              username: process.env['UNSTRUCTURED_USERNAME'], // This is the default and can be omitted
              password: process.env['UNSTRUCTURED_PASSWORD'], // This is the default and can be omitted
            });


            const connectorResponse = await client.dataSource.delete({
            connector_name: 'connector_name' });


            console.log(connectorResponse.profile_id);
components:
  schemas:
    DeleteConnectorRequest:
      properties:
        connector_name:
          type: string
          title: Connector Name
      type: object
      required:
        - connector_name
      title: DeleteConnectorRequest
    ConnectorResponse:
      properties:
        profile_id:
          type: string
          title: Profile Id
      type: object
      required:
        - profile_id
      title: ConnectorResponse
    HTTPError:
      properties:
        detail:
          type: string
          title: Detail
      type: object
      required:
        - detail
      title: HTTPError
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    BasicAuth:
      type: http
      scheme: basic
    BearerAuth:
      type: http
      scheme: bearer
    UserIdAuth:
      type: apiKey
      in: header
      name: X-User-ID

````