---
agentTools:
  projectIndex: https://docs.xkit.co/llms.txt
---

# Delete Connection by ID

Remove the platform user's connection to a 3rd Party Application

This endpoint can be used by your server to remove a specific connection to a 3rd Party Application..

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Platform API",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://app.xkit.co/api/platform"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "http",
        "scheme": "basic"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/connection/{connection_id}": {
      "delete": {
        "summary": "Delete Connection by ID",
        "description": "Remove the platform user's connection to a 3rd Party Application",
        "operationId": "delete-connection-by-id",
        "parameters": [
          {
            "name": "connection_id",
            "in": "path",
            "description": "The unique identifier for this connection.",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "204",
            "content": {
              "application/json": {
                "examples": {
                  "Existing connection": {
                    "value": ""
                  }
                }
              }
            }
          },
          "404": {
            "description": "404",
            "content": {
              "application/json": {
                "examples": {
                  "Connection not found": {
                    "value": "{\n  \"error\": \"Not Found\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Not Found"
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "x-readme": {
          "code-samples": [
            {
              "language": "shell",
              "code": "curl --user publishable_key:secret_key \\\n     -X DELETE \\\n     https://app.xkit.co/api/platform/connection/unique-id"
            },
            {
              "language": "shell",
              "code": "curl --user publishable_key:secret_key \\\n     https://app.xkit.co/api/platform/users/your_user_id/connections/google-calendar-admin?provider_user_id=some.user@example.com",
              "name": "Impersonate another user"
            }
          ],
          "samples-languages": [
            "shell"
          ]
        }
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true,
  "_id": "5f08b14b1dd58e029e169b30:60211d25cc838c014fcf3245"
}
```