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

# Delete connection

> Delete an API-visible connection from your Markifact team workspace.

Deletes one connection by Markifact connection ID. The connection must be shared in your team, or private to the user who created the API key.

## Endpoint

```http theme={"dark"}
DELETE /v1/connections/{connection_id}
```

## Path Parameters

| Parameter       | Type   | Description                     |
| --------------- | ------ | ------------------------------- |
| `connection_id` | string | Public Markifact connection ID. |

## Example Request

```bash theme={"dark"}
curl -X DELETE https://api.markifact.com/v1/connections/1f2e3d4c-0000-0000-0000-000000000000 \
  -H "Authorization: Bearer YOUR_API_KEY"
```

## Response

Returns the deleted connection.

```json theme={"dark"}
{
  "id": "1f2e3d4c-0000-0000-0000-000000000000",
  "type": "ga4",
  "display_name": "login@example.com",
  "external_id": "customer_123",
  "is_private": false,
  "created_at": 1764000000000,
  "updated_at": 1764000000000
}
```

## Effects

Deleting a connection also deactivates active workflows in your team that use that connection.

## Notes

* Delete only supports Markifact connection IDs.
* You cannot delete by `external_id`.
* Private connections can only be deleted when they belong to the user who created the API key.
* If the connection does not exist or does not belong to your team, the API returns `404`.


## OpenAPI

````yaml DELETE /v1/connections/{connection_id}
openapi: 3.1.0
info:
  title: Markifact API
  version: 1.0.0
  description: API for managing Markifact workspace connections.
servers:
  - url: https://api.markifact.com
security:
  - bearerAuth: []
paths:
  /v1/connections/{connection_id}:
    delete:
      tags:
        - Connections
      summary: Delete connection
      description: Delete an API-visible connection from your Markifact team workspace.
      operationId: deleteConnection
      parameters:
        - name: connection_id
          in: path
          required: true
          schema:
            type: string
          description: Public Markifact connection ID.
      responses:
        '200':
          description: Deleted connection returned.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Connection'
        '404':
          description: Connection not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Connection:
      type: object
      properties:
        id:
          type:
            - string
            - 'null'
          description: Public Markifact connection ID.
        type:
          type: string
          description: Connection type.
        display_name:
          type:
            - string
            - 'null'
        external_id:
          type:
            - string
            - 'null'
        is_private:
          type: boolean
        created_at:
          type:
            - integer
            - 'null'
          format: int64
        updated_at:
          type:
            - integer
            - 'null'
          format: int64
      required:
        - id
        - type
        - is_private
    Error:
      type: object
      properties:
        detail: {}
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````