Cancel a channel connection.
curl --request POST \
--url https://dash.dmly.io/api/agency/v1/workspaces/{workspace}/channel-connections/{connection}/cancel \
--header 'x-api-key: <api-key>'import requests
url = "https://dash.dmly.io/api/agency/v1/workspaces/{workspace}/channel-connections/{connection}/cancel"
headers = {"x-api-key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'x-api-key': '<api-key>'}};
fetch('https://dash.dmly.io/api/agency/v1/workspaces/{workspace}/channel-connections/{connection}/cancel', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://dash.dmly.io/api/agency/v1/workspaces/{workspace}/channel-connections/{connection}/cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://dash.dmly.io/api/agency/v1/workspaces/{workspace}/channel-connections/{connection}/cancel"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://dash.dmly.io/api/agency/v1/workspaces/{workspace}/channel-connections/{connection}/cancel")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://dash.dmly.io/api/agency/v1/workspaces/{workspace}/channel-connections/{connection}/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "6f0e2c1a-8b7d-4c3e-9a1f-0d2b3c4e5f60",
"workspace_id": "11111111-1111-1111-1111-111111111111",
"platform": "whatsapp",
"status": "cancelled",
"channel_id": null,
"error_code": null,
"state": "cust_8841",
"expires_at": "2026-10-06T12:30:00+00:00"
}
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}Cancel a channel connection.
Cancels an unfinished session and discards its temporary Meta credentials. Safe to repeat. A session that already finished keeps its result: cancelling never disconnects a connected channel.
POST
/
workspaces
/
{workspace}
/
channel-connections
/
{connection}
/
cancel
Cancel a channel connection.
curl --request POST \
--url https://dash.dmly.io/api/agency/v1/workspaces/{workspace}/channel-connections/{connection}/cancel \
--header 'x-api-key: <api-key>'import requests
url = "https://dash.dmly.io/api/agency/v1/workspaces/{workspace}/channel-connections/{connection}/cancel"
headers = {"x-api-key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'x-api-key': '<api-key>'}};
fetch('https://dash.dmly.io/api/agency/v1/workspaces/{workspace}/channel-connections/{connection}/cancel', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://dash.dmly.io/api/agency/v1/workspaces/{workspace}/channel-connections/{connection}/cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://dash.dmly.io/api/agency/v1/workspaces/{workspace}/channel-connections/{connection}/cancel"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://dash.dmly.io/api/agency/v1/workspaces/{workspace}/channel-connections/{connection}/cancel")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://dash.dmly.io/api/agency/v1/workspaces/{workspace}/channel-connections/{connection}/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "6f0e2c1a-8b7d-4c3e-9a1f-0d2b3c4e5f60",
"workspace_id": "11111111-1111-1111-1111-111111111111",
"platform": "whatsapp",
"status": "cancelled",
"channel_id": null,
"error_code": null,
"state": "cust_8841",
"expires_at": "2026-10-06T12:30:00+00:00"
}
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}Authorizations
agencyApiKeyAuthagencyBearerAuth
Your agency API key (dmly_ag_…). It authenticates the acting agency and scopes every request to that agency's own sub-accounts and plans.
Path Parameters
Workspace id.
Connection id.
Response
Success.
A channel connection session.
Show child attributes
Show child attributes
Was this page helpful?

