---
title: "leaveChannel(channelUUID:)"
framework: pushtotalk
role: symbol
role_heading: Instance Method
path: "pushtotalk/ptchannelmanager/leavechannel(channeluuid:)"
---

# leaveChannel(channelUUID:)

Leaves a channel with the identifier.

## Declaration

```swift
func leaveChannel(channelUUID: UUID)
```

## Parameters

- `channelUUID`: The channel identifier.

## Discussion

Discussion If successful, you receive a callback from channelManager(_:didLeaveChannel:reason:) with PTChannelLeaveReason.programmaticRequest; otherwise, you receive a failure reason through channelManager(_:failedToLeaveChannel:error:).

## See Also

### Joining and leaving a channel

- [requestJoinChannel(channelUUID:descriptor:)](pushtotalk/ptchannelmanager/requestjoinchannel(channeluuid:descriptor:).md)
