Pular para o conteúdo principal
PUT
/
agents
/
{id}
Atualizar assistente
curl --request PUT \
  --url https://api.meuassistente.rdstationmentoria.com.br/rest/agents/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "description": null,
  "avatar": null,
  "color": "#ff5722",
  "welcome": null,
  "instructions": null,
  "off": null,
  "references": false,
  "purpose": "leads",
  "freedom": "restricted",
  "behavior_type": "basic",
  "status": "draft",
  "left": false,
  "kbs": [],
  "destinations": [],
  "fields": [],
  "behavior": {
    "answerLength": "short",
    "personality": "personal",
    "engagement": "active"
  },
  "connections": []
}
'
import requests

url = "https://api.meuassistente.rdstationmentoria.com.br/rest/agents/{id}"

payload = {
"name": "<string>",
"description": None,
"avatar": None,
"color": "#ff5722",
"welcome": None,
"instructions": None,
"off": None,
"references": False,
"purpose": "leads",
"freedom": "restricted",
"behavior_type": "basic",
"status": "draft",
"left": False,
"kbs": [],
"destinations": [],
"fields": [],
"behavior": {
"answerLength": "short",
"personality": "personal",
"engagement": "active"
},
"connections": []
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: null,
avatar: null,
color: '#ff5722',
welcome: null,
instructions: null,
off: null,
references: false,
purpose: 'leads',
freedom: 'restricted',
behavior_type: 'basic',
status: 'draft',
left: false,
kbs: [],
destinations: [],
fields: [],
behavior: {answerLength: 'short', personality: 'personal', engagement: 'active'},
connections: []
})
};

fetch('https://api.meuassistente.rdstationmentoria.com.br/rest/agents/{id}', 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.meuassistente.rdstationmentoria.com.br/rest/agents/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'description' => null,
'avatar' => null,
'color' => '#ff5722',
'welcome' => null,
'instructions' => null,
'off' => null,
'references' => false,
'purpose' => 'leads',
'freedom' => 'restricted',
'behavior_type' => 'basic',
'status' => 'draft',
'left' => false,
'kbs' => [

],
'destinations' => [

],
'fields' => [

],
'behavior' => [
'answerLength' => 'short',
'personality' => 'personal',
'engagement' => 'active'
],
'connections' => [

]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api.meuassistente.rdstationmentoria.com.br/rest/agents/{id}"

payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": null,\n \"avatar\": null,\n \"color\": \"#ff5722\",\n \"welcome\": null,\n \"instructions\": null,\n \"off\": null,\n \"references\": false,\n \"purpose\": \"leads\",\n \"freedom\": \"restricted\",\n \"behavior_type\": \"basic\",\n \"status\": \"draft\",\n \"left\": false,\n \"kbs\": [],\n \"destinations\": [],\n \"fields\": [],\n \"behavior\": {\n \"answerLength\": \"short\",\n \"personality\": \"personal\",\n \"engagement\": \"active\"\n },\n \"connections\": []\n}")

req, _ := http.NewRequest("PUT", url, payload)

req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.put("https://api.meuassistente.rdstationmentoria.com.br/rest/agents/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": null,\n \"avatar\": null,\n \"color\": \"#ff5722\",\n \"welcome\": null,\n \"instructions\": null,\n \"off\": null,\n \"references\": false,\n \"purpose\": \"leads\",\n \"freedom\": \"restricted\",\n \"behavior_type\": \"basic\",\n \"status\": \"draft\",\n \"left\": false,\n \"kbs\": [],\n \"destinations\": [],\n \"fields\": [],\n \"behavior\": {\n \"answerLength\": \"short\",\n \"personality\": \"personal\",\n \"engagement\": \"active\"\n },\n \"connections\": []\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.meuassistente.rdstationmentoria.com.br/rest/agents/{id}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": null,\n \"avatar\": null,\n \"color\": \"#ff5722\",\n \"welcome\": null,\n \"instructions\": null,\n \"off\": null,\n \"references\": false,\n \"purpose\": \"leads\",\n \"freedom\": \"restricted\",\n \"behavior_type\": \"basic\",\n \"status\": \"draft\",\n \"left\": false,\n \"kbs\": [],\n \"destinations\": [],\n \"fields\": [],\n \"behavior\": {\n \"answerLength\": \"short\",\n \"personality\": \"personal\",\n \"engagement\": \"active\"\n },\n \"connections\": []\n}"

response = http.request(request)
puts response.read_body
{
  "message": "<string>",
  "code": "<string>",
  "issues": [
    {
      "message": "<string>"
    }
  ]
}

Autorizações

Authorization
string
header
obrigatório

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Parâmetros de caminho

id
string
obrigatório

Identificador do assistente

Corpo

application/json
name
string
obrigatório

Nome do assistente

description
string | null

Instruções ao modelo de IA para direcionar a geração de respostas desejadas

avatar
object | null

Avatar do assistente

color
string
padrão:#ff5722

Cor associada ao assistente

Pattern: ^#[0-9a-fA-F]{6}$
welcome
string | null

Mensagem de boas-vindas do assistente

instructions
string | null

Instruções para o assistente

off
string | null

Mensagem quando o assistente não souber a resposta

references
boolean
padrão:false

Indica se o assistente usa referências

purpose
enum<string>
padrão:leads

Finalidade do assistente

Opções disponíveis:
general,
leads,
cs
freedom
enum<string>
padrão:restricted

Uso da base de conhecimento

Opções disponíveis:
free,
restricted
behavior_type
enum<string>
padrão:basic

Configuração de comportamento do assistente

Opções disponíveis:
basic,
custom
status
enum<string>
padrão:draft

Status do assistente

Opções disponíveis:
online,
offline,
draft
left
boolean
padrão:false

Posição do widget do assistente à esquerda da tela

kbs
string[]

Bases de conhecimento associadas ao assistente

Identificador único da base de conhecimento

destinations
object[]

Destinos associados ao agente

fields
object[]

Campos do assistente

behavior
object | null

Comportamento configurável do assistente

connections
object[]

Conectores habilitados

Resposta

Successful response