Deactivate an agent
curl --request POST \
--url https://api.proficientai.com/agents/{agent_id}/deactivate \
--header 'Key: <api-key>'import requests
url = "https://api.proficientai.com/agents/{agent_id}/deactivate"
headers = {"Key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Key: '<api-key>'}};
fetch('https://api.proficientai.com/agents/{agent_id}/deactivate', 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://api.proficientai.com/agents/{agent_id}/deactivate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"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://api.proficientai.com/agents/{agent_id}/deactivate"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("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://api.proficientai.com/agents/{agent_id}/deactivate")
.header("Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.proficientai.com/agents/{agent_id}/deactivate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"object": "agent",
"active": true,
"description": "<string>",
"display_description": "<string>",
"display_name": "<string>",
"name": "<string>",
"created_at": 123,
"updated_at": 123
}{
"error": {
"code": "invalid_request",
"message": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>"
}
}Agents
Deactivate an agent
Deactivates the specified agent. Any new message or interaction requests sent to this agent will be blocked while the agent is disabled. This request does not fail if the agent is already deactivated.
POST
/
agents
/
{agent_id}
/
deactivate
Deactivate an agent
curl --request POST \
--url https://api.proficientai.com/agents/{agent_id}/deactivate \
--header 'Key: <api-key>'import requests
url = "https://api.proficientai.com/agents/{agent_id}/deactivate"
headers = {"Key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Key: '<api-key>'}};
fetch('https://api.proficientai.com/agents/{agent_id}/deactivate', 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://api.proficientai.com/agents/{agent_id}/deactivate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"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://api.proficientai.com/agents/{agent_id}/deactivate"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("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://api.proficientai.com/agents/{agent_id}/deactivate")
.header("Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.proficientai.com/agents/{agent_id}/deactivate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"object": "agent",
"active": true,
"description": "<string>",
"display_description": "<string>",
"display_name": "<string>",
"name": "<string>",
"created_at": 123,
"updated_at": 123
}{
"error": {
"code": "invalid_request",
"message": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>"
}
}Response
An _agent_ is an AI entity that exists to serve your project's users. Agents are intelligent, configurable and context-aware and can interact with your users via a messaging system enabled by the Proficient API.

