channels.deleteChannel
DELETE
/v1/organization/channels/{channelId}
const url = 'https://example.com/v1/organization/channels/example';const options = { method: 'DELETE', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"commandKey":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url https://example.com/v1/organization/channels/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "commandKey": "example" }'Stops Channel work, then deletes the Channel and its links. Read the returned execution to wait for release. Its Chats stay.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”channelId
required
string
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
commandKey
required
string
Example generated
{ "commandKey": "example"}Responses
Section titled “Responses”Success
Media typeapplication/json
object
executionId
required
string
commandKey
required
string
sequence
required
integer
Example generated
{ "executionId": "example", "commandKey": "example", "sequence": 1}ChannelInvalid | OrganizationRequired
AuthenticationRequired
Media typeapplication/json
object
_tag
required
string
Example
{ "_tag": "AuthenticationRequired"}ExecutionForbidden | @nmnmcc/ability/Authorizer/Forbidden | MembershipRequired | ForbiddenOrigin
ExecutionNotFound | ChannelNotFound | ChannelIdentityNotFound
ExecutionConflict | ExecutionKeyConflict | @nmnmcc/ability/Authorizer/Pending | ChannelConflict
RateLimited
Media typeapplication/json
object
_tag
required
string
retryAfterSeconds
required
integer
Example
{ "_tag": "RateLimited"}ExecutionUnavailable | ChannelsUnavailable | AuthenticationUnavailable | RequestFailed