> ## 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.

# deleteEndpoint

> Deletes an endpoint for good. On a `PUBLISHED` version it also starts publishing the removal; follow `ApiVersion.state`. Fails with `ConflictError` when the version is publishing or live in a state other than `PUBLISHED`, or when the endpoint is the last one of a `PUBLISHED` version. Deleting an endpoint that doesn't exist succeeds.



**mutation** `deleteEndpoint(input: DeleteEndpointInput!): DeleteEndpointPayload!`

## Arguments

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

## Returns

`DeleteEndpointPayload!`

**`empty`**: `Empty`

---

**`errors`**: `[DeleteEndpointError!]`

## Examples

```graphql Mutation
mutation DeleteEndpoint($input: DeleteEndpointInput!) {
  deleteEndpoint(input: $input) {
    empty {
      value
    }
    errors {
      __typename
      ... on GraphQlError {
        code
        details {
          __typename
        }
        message
      }
    }
  }
}
```

```json Variables
{
  "input": {
    "destinationId": "id",
    "id": "id",
    "versionId": "id"
  }
}
```

```json Response
{
  "data": {
    "deleteEndpoint": {
      "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.