> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs-parschat.parstechai.com/api-reference/channels/update-channel-status/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs-parschat.parstechai.com/_mcp/server. # Enable or disable a channel PATCH https://api-chat.parstechai.com/v1/robots/{robot_id}/channels/{channel_id} Content-Type: application/json Enables or disables a channel without disconnecting it. A disabled channel keeps its configuration, automation rules and conversation history, stops delivering events, and **does not occupy a slot against your plan** — capacity counts enabled channels only. This is how you bring channels back after renewing a lapsed plan. Enabling is checked against your plan at that moment, so you can never exceed your capacity by toggling. Disabling never requires capacity and always succeeds. Reference: https://docs-parschat.parstechai.com/api-reference/channels/update-channel-status ## Authentication - `Authorization` header (bearer token, required) — Your API key, issued by ParsChat sales. One key per account, spanning every robot you own. Send it as `Authorization: Bearer pk_live_…`. ## Request ### Path parameters - `robot_id` (string, required) — The robot's id, as returned by the create call. - `channel_id` (string, required) — The channel's id. ### Body (application/json) This endpoint expects an object. - `is_active` (boolean, required) — `true` enables the channel and occupies a capacity slot. `false` disables it and frees the slot. ## Response ### 200 The updated channel. - `id` (string, optional) — ParsChat identifier for the channel. - `type` (enum, optional) — The kind of surface this channel connects. - Allowed values: `telegram`, `instagram`, `goftino`, `widget`, `crisp`, `gap`, `whatsapp` - `robot_id` (string, optional) — The robot that owns this channel. - `username` (string, optional) — The connected account's handle. Present once the page owner has authorised. - `is_active` (boolean, optional) — Whether the channel is receiving traffic. False while a handshake is pending or after a plan lapses. - `connected_at` (datetime, optional) — When the channel went live. ## Errors ### 400 Bad Request Error The request itself is malformed: a parameter is missing, unparseable, or out of range. Unlike 422, the request never reached validation of its contents. - `error` (ErrorError, optional) ### 401 Unauthorized Error The key is missing, wrong, revoked, or past its expiry date. All four answer `invalid_key`: telling an expired key from an unknown one would confirm to whoever holds a leaked key that it was once real. - `error` (ErrorError, optional) ### 403 Forbidden Error The call is understood but not permitted: a missing role, a lapsed plan, or exhausted capacity. - `error` (ErrorError, optional) ### 404 Not Found Error No such resource, or it belongs to another partner. We return 404 rather than 403 here, because a 403 would confirm the id exists. - `error` (ErrorError, optional) ### 429 Too Many Requests Error You are calling the API too fast. `details` names the limit you are held to. This never means an automated reply to an end customer was discarded: those are queued, not dropped. - `error` (ErrorError, optional) ### 500 Internal Server Error Something failed on our side. Retry with backoff, and quote `request_id` if it persists. - `error` (ErrorError, optional) ### 503 Service Unavailable Error A service we depend on (a channel provider, or our AI service) is unavailable. Retry with backoff. - `error` (ErrorError, optional) ## Types ### ErrorError - `code` (string, optional) — Stable machine-readable code. Branch on this, not on the message. - `message` (string, optional) — Human-readable explanation. Wording may change. - `request_id` (string, optional) — Log this. It is what lets support find your exact request. - `details` (map from string to any, optional) — Machine-readable context for the code. On `capacity_exhausted` it carries `occupied`, `requested` and `capacity`; on `rate_limited`, `limit_per_minute` and `window_seconds`. ## Examples ### Enable a channel **Request** ```json { "is_active": true } ``` **Response** ```json { "id": "chn_3pQ7xL", "type": "instagram", "robot_id": "rbt_8fK2mQ", "username": "rose.flower.shop", "is_active": true, "connected_at": "2026-09-20T11:04:02Z", "status": "connected" } ``` **SDK Code** ```python Enable a channel import requests url = "https://api-chat.parstechai.com/v1/robots/rbt_8fK2mQ/channels/chn_3pQ7xL" payload = { "is_active": True } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.patch(url, json=payload, headers=headers) print(response.json()) ``` ```javascript Enable a channel const url = 'https://api-chat.parstechai.com/v1/robots/rbt_8fK2mQ/channels/chn_3pQ7xL'; const options = { method: 'PATCH', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: '{"is_active":true}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go Enable a channel package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api-chat.parstechai.com/v1/robots/rbt_8fK2mQ/channels/chn_3pQ7xL" payload := strings.NewReader("{\n \"is_active\": true\n}") req, _ := http.NewRequest("PATCH", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby Enable a channel require 'uri' require 'net/http' url = URI("https://api-chat.parstechai.com/v1/robots/rbt_8fK2mQ/channels/chn_3pQ7xL") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Patch.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"is_active\": true\n}" response = http.request(request) puts response.read_body ``` ```java Enable a channel import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.patch("https://api-chat.parstechai.com/v1/robots/rbt_8fK2mQ/channels/chn_3pQ7xL") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"is_active\": true\n}") .asString(); ``` ```php Enable a channel request('PATCH', 'https://api-chat.parstechai.com/v1/robots/rbt_8fK2mQ/channels/chn_3pQ7xL', [ 'body' => '{ "is_active": true }', 'headers' => [ 'Authorization' => 'Bearer ', 'Content-Type' => 'application/json', ], ]); echo $response->getBody(); ``` ```csharp Enable a channel using RestSharp; var client = new RestClient("https://api-chat.parstechai.com/v1/robots/rbt_8fK2mQ/channels/chn_3pQ7xL"); var request = new RestRequest(Method.PATCH); request.AddHeader("Authorization", "Bearer "); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"is_active\": true\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift Enable a channel import Foundation let headers = [ "Authorization": "Bearer ", "Content-Type": "application/json" ] let parameters = ["is_active": true] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api-chat.parstechai.com/v1/robots/rbt_8fK2mQ/channels/chn_3pQ7xL")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "PATCH" request.allHTTPHeaderFields = headers request.httpBody = postData as Data let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ``` ### Disable a channel **Request** ```json { "is_active": false } ``` **Response** ```json { "id": "chn_3pQ7xL", "type": "instagram", "robot_id": "rbt_8fK2mQ", "username": "rose.flower.shop", "is_active": false, "connected_at": "2026-09-20T11:04:02Z", "status": "disabled" } ``` **SDK Code** ```python Disable a channel import requests url = "https://api-chat.parstechai.com/v1/robots/rbt_8fK2mQ/channels/chn_3pQ7xL" payload = { "is_active": False } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.patch(url, json=payload, headers=headers) print(response.json()) ``` ```javascript Disable a channel const url = 'https://api-chat.parstechai.com/v1/robots/rbt_8fK2mQ/channels/chn_3pQ7xL'; const options = { method: 'PATCH', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: '{"is_active":false}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go Disable a channel package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api-chat.parstechai.com/v1/robots/rbt_8fK2mQ/channels/chn_3pQ7xL" payload := strings.NewReader("{\n \"is_active\": false\n}") req, _ := http.NewRequest("PATCH", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby Disable a channel require 'uri' require 'net/http' url = URI("https://api-chat.parstechai.com/v1/robots/rbt_8fK2mQ/channels/chn_3pQ7xL") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Patch.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"is_active\": false\n}" response = http.request(request) puts response.read_body ``` ```java Disable a channel import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.patch("https://api-chat.parstechai.com/v1/robots/rbt_8fK2mQ/channels/chn_3pQ7xL") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"is_active\": false\n}") .asString(); ``` ```php Disable a channel request('PATCH', 'https://api-chat.parstechai.com/v1/robots/rbt_8fK2mQ/channels/chn_3pQ7xL', [ 'body' => '{ "is_active": false }', 'headers' => [ 'Authorization' => 'Bearer ', 'Content-Type' => 'application/json', ], ]); echo $response->getBody(); ``` ```csharp Disable a channel using RestSharp; var client = new RestClient("https://api-chat.parstechai.com/v1/robots/rbt_8fK2mQ/channels/chn_3pQ7xL"); var request = new RestRequest(Method.PATCH); request.AddHeader("Authorization", "Bearer "); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"is_active\": false\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift Disable a channel import Foundation let headers = [ "Authorization": "Bearer ", "Content-Type": "application/json" ] let parameters = ["is_active": false] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api-chat.parstechai.com/v1/robots/rbt_8fK2mQ/channels/chn_3pQ7xL")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "PATCH" request.allHTTPHeaderFields = headers request.httpBody = postData as Data let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```