---
agentTools:
  projectIndex: https://uspacy.readme.io/llms.txt
---

# Delete an external line

Permanently deletes an external communication line. This will disconnect the integration.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "paths": {
    "/messenger/v1/external-lines/{id}": {
      "delete": {
        "operationId": "ExternalLinesController_deleteExternalLineById",
        "summary": "Delete an external line",
        "description": "Permanently deletes an external communication line. This will disconnect the integration.",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "The unique identifier of the external line to delete",
            "schema": {
              "type": "string"
            },
            "example": "659ff121fd62e43063340f2f"
          }
        ],
        "responses": {
          "200": {
            "description": "The deleted external line",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalLineResponseDto"
                }
              }
            }
          }
        },
        "tags": [
          "external-lines"
        ],
        "security": [
          {
            "bearer": []
          }
        ]
      }
    }
  },
  "info": {
    "title": "Messenger service",
    "description": "API for managing chats, messages, and other messenger-related functionalities.",
    "version": "v1",
    "contact": {}
  },
  "servers": [
    {
      "url": "https://{domain}.uspacy.ua",
      "description": "Ukrainian server"
    },
    {
      "url": "https://{domain}.uspacy.eu",
      "description": "EU server"
    },
    {
      "url": "https://{domain}.uspacy.com.br",
      "description": "Brazilian server"
    },
    {
      "url": "https://{domain}.uspacy.com",
      "description": "International server"
    }
  ],
  "components": {
    "securitySchemes": {
      "bearer": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "type": "http"
      }
    },
    "schemas": {
      "ExternalLineResponseDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "External line id",
            "example": "659ff121fd62e43063340f2f"
          },
          "name": {
            "type": "string",
            "description": "External line name",
            "example": "Main line"
          },
          "icon": {
            "type": "string",
            "description": "External line icon",
            "example": "https://example.com/icon.png"
          },
          "externalId": {
            "type": "string",
            "description": "External line external id",
            "example": "externalId"
          },
          "timestamp": {
            "type": "number",
            "description": "External line timestamp",
            "example": 1620211200000
          },
          "portal": {
            "type": "string",
            "description": "External line portal",
            "example": "portal"
          },
          "phoneNumber": {
            "type": "string",
            "description": "External line phone number",
            "example": "+1234567890"
          }
        },
        "required": [
          "id",
          "name",
          "icon",
          "externalId",
          "timestamp",
          "portal",
          "phoneNumber"
        ]
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "_id": {
    "buffer": {
      "0": 101,
      "1": 187,
      "2": 117,
      "3": 228,
      "4": 199,
      "5": 37,
      "6": 48,
      "7": 0,
      "8": 120,
      "9": 36,
      "10": 113,
      "11": 177
    }
  }
}
```