> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tess.im/llms.txt
> Use this file to discover all available pages before exploring further.

# Criar Employee Standalone

> Cria um novo Digital Employee com um agente host novo.

### **Exemplos de Código**

<CodeGroup>
  ```http cURL theme={null}
  curl --request POST \
    --url 'https://api.tess.im/digital-employees/standalone' \
    --header 'Authorization: Bearer YOUR_API_KEY' \
    --header 'Content-Type: application/json' \
    --header 'x-workspace-id: YOUR_WORKSPACE_ID' \
    --data '{
      "name": "Finance Ops",
      "execution_mode": "agent",
      "execution_approval_mode": "autonomous",
      "heartbeat_cron": "0 9 * * 1-5",
      "execution_timezone": "America/Sao_Paulo"
    }'
  ```

  ```json Node.js theme={null}
  const axios = require('axios');

  const config = {
    method: 'post',
    url: 'https://api.tess.im/digital-employees/standalone',
    headers: {
      'Authorization': 'Bearer YOUR_API_KEY',
      'Content-Type': 'application/json',
      'x-workspace-id': 'YOUR_WORKSPACE_ID'
    },
    data: {
      name: 'Finance Ops',
      execution_mode: 'agent',
      execution_approval_mode: 'autonomous',
      heartbeat_cron: '0 9 * * 1-5',
      execution_timezone: 'America/Sao_Paulo'
    }
  };

  try {
    const response = await axios(config);
    console.log(response.data);
  } catch (error) {
    console.error(error);
  }
  ```

  ```python Python theme={null}
  import requests

  url = "https://api.tess.im/digital-employees/standalone"
  headers = {
      "Authorization": "Bearer YOUR_API_KEY",
      "Content-Type": "application/json",
      "x-workspace-id": "YOUR_WORKSPACE_ID"
  }
  payload = {
      "name": "Finance Ops",
      "execution_mode": "agent",
      "execution_approval_mode": "autonomous",
      "heartbeat_cron": "0 9 * * 1-5",
      "execution_timezone": "America/Sao_Paulo"
  }

  response = requests.post(url, json=payload, headers=headers)
  print(response.json())
  ```

  ```php PHP theme={null}
  <?php
  $curl = curl_init();

  curl_setopt_array($curl, [
    CURLOPT_URL => "https://api.tess.im/digital-employees/standalone",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => "POST",
    CURLOPT_POSTFIELDS => json_encode([
      "name" => "Finance Ops",
      "execution_mode" => "agent",
      "execution_approval_mode" => "autonomous",
      "heartbeat_cron" => "0 9 * * 1-5",
      "execution_timezone" => "America/Sao_Paulo"
    ]),
    CURLOPT_HTTPHEADER => [
      "Authorization: Bearer YOUR_API_KEY",
      "Content-Type: application/json",
      "x-workspace-id: YOUR_WORKSPACE_ID"
    ]
  ]);

  $response = curl_exec($curl);
  curl_close($curl);
  echo $response;
  ```

  ```java Java theme={null}
  import java.net.URI;
  import java.net.http.HttpClient;
  import java.net.http.HttpRequest;
  import java.net.http.HttpResponse;

  String body = """
      {
        "name": "Finance Ops",
        "execution_mode": "agent",
        "execution_approval_mode": "autonomous",
        "heartbeat_cron": "0 9 * * 1-5",
        "execution_timezone": "America/Sao_Paulo"
      }
      """;

  HttpClient client = HttpClient.newHttpClient();
  HttpRequest request = HttpRequest.newBuilder()
      .uri(URI.create("https://api.tess.im/digital-employees/standalone"))
      .header("Authorization", "Bearer YOUR_API_KEY")
      .header("Content-Type", "application/json")
      .header("x-workspace-id", "YOUR_WORKSPACE_ID")
      .POST(HttpRequest.BodyPublishers.ofString(body))
      .build();

  HttpResponse<String> response = client.send(request,
      HttpResponse.BodyHandlers.ofString());
  System.out.println(response.body());
  ```

  ```go Go theme={null}
  package main

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

  func main() {
      payload := strings.NewReader(`{
          "name": "Finance Ops",
          "execution_mode": "agent",
          "execution_approval_mode": "autonomous",
          "heartbeat_cron": "0 9 * * 1-5",
          "execution_timezone": "America/Sao_Paulo"
      }`)

      client := &http.Client{}
      req, _ := http.NewRequest("POST", "https://api.tess.im/digital-employees/standalone", payload)
      req.Header.Add("Authorization", "Bearer YOUR_API_KEY")
      req.Header.Add("Content-Type", "application/json")
      req.Header.Add("x-workspace-id", "YOUR_WORKSPACE_ID")
      resp, _ := client.Do(req)
      defer resp.Body.Close()
      body, _ := ioutil.ReadAll(resp.Body)
      fmt.Println(string(body))
  }
  ```

  ```jsonnet .NET theme={null}
  using System.Net.Http;
  using System.Text;

  using var client = new HttpClient();
  client.DefaultRequestHeaders.Add("Authorization", "Bearer YOUR_API_KEY");
  client.DefaultRequestHeaders.Add("x-workspace-id", "YOUR_WORKSPACE_ID");

  var json = """
      {
        "name": "Finance Ops",
        "execution_mode": "agent",
        "execution_approval_mode": "autonomous",
        "heartbeat_cron": "0 9 * * 1-5",
        "execution_timezone": "America/Sao_Paulo"
      }
      """;

  var content = new StringContent(json, Encoding.UTF8, "application/json");
  var response = await client.PostAsync(
      "https://api.tess.im/digital-employees/standalone", content);
  Console.WriteLine(await response.Content.ReadAsStringAsync());
  ```

  ```ruby Ruby theme={null}
  require 'uri'
  require 'net/http'
  require 'json'

  uri = URI('https://api.tess.im/digital-employees/standalone')
  http = Net::HTTP.new(uri.host, uri.port)
  http.use_ssl = true

  request = Net::HTTP::Post.new(uri)
  request['Authorization'] = 'Bearer YOUR_API_KEY'
  request['Content-Type'] = 'application/json'
  request['x-workspace-id'] = 'YOUR_WORKSPACE_ID'
  request.body = {
    name: 'Finance Ops',
    execution_mode: 'agent',
    execution_approval_mode: 'autonomous',
    heartbeat_cron: '0 9 * * 1-5',
    execution_timezone: 'America/Sao_Paulo'
  }.to_json

  response = http.request(request)
  puts response.read_body
  ```
</CodeGroup>

### **Headers**

<Note>Passe sua chave de API como Bearer token no header `Authorization`.</Note>

<ParamField header="x-workspace-id" type="integer" required>
  ID do workspace.
</ParamField>

### **Corpo da Requisição**

<ParamField body="name" type="string" required>
  Nome do employee. Máximo de 255 caracteres.
</ParamField>

<ParamField body="execution_mode" type="string">
  Modo de execução. Valores: `agent` (autônomo) ou `chat`. Padrão: `agent`.
</ParamField>

<ParamField body="execution_approval_mode" type="string">
  Define se as execuções requerem aprovação manual. Valores: `autonomous` ou `approval_required`.
</ParamField>

<ParamField body="heartbeat_cron" type="string">
  Expressão cron para execuções agendadas (ex.: `0 9 * * 1-5`). Máximo de 128 caracteres.
</ParamField>

<ParamField body="heartbeat_schedule_json" type="object">
  Configuração do construtor de agendamento (alternativa ao `heartbeat_cron`).
</ParamField>

<ParamField body="execution_timezone" type="string">
  Fuso horário para execução do agendamento (ex.: `America/Sao_Paulo`). Máximo de 64 caracteres.
</ParamField>

<ParamField body="default_interval_seconds" type="integer">
  Intervalo mínimo em segundos entre execuções. Deve ser `0` (sem limite) ou `>= 60`.
</ParamField>

<ParamField body="system_prompt_override" type="string">
  Prompt de sistema personalizado para este employee. Máximo de 4096 caracteres.
</ParamField>

<ParamField body="model_override" type="string">
  Substitui o modelo de IA (ex.: `tess-6`). Máximo de 100 caracteres.
</ParamField>

<ParamField body="tools_override" type="string">
  Substitui a configuração de ferramentas. Máximo de 255 caracteres.
</ParamField>

<ParamField body="search_intelligence_enabled" type="boolean">
  Ativa o Search Intelligence para as execuções.
</ParamField>

<ParamField body="connectors_json" type="array">
  Array de identificadores de conectores a habilitar.
</ParamField>

<ParamField body="skills_override_json" type="array">
  Array de identificadores de skills a substituir.
</ParamField>

<ParamField body="max_consecutive_failures" type="integer">
  Número máximo de falhas consecutivas antes da pausa automática. Intervalo: 1–100.
</ParamField>

<ParamField body="execution_order" type="integer">
  Ordem de prioridade de execução. Intervalo: 0–999.
</ParamField>

<ParamField body="share_memory_with_owner" type="boolean">
  Define se o employee compartilha memória com seu agente proprietário.
</ParamField>

<ParamField body="knowledge_base_file_ids" type="array">
  Array de IDs de arquivos para a base de conhecimento. Máximo de 20 entradas.
</ParamField>

<ParamField body="avatar" type="string">
  URL da imagem de avatar. Máximo de 2048 caracteres.
</ParamField>

<ParamField body="avatar_thumbnail" type="string">
  URL da imagem de miniatura. Máximo de 2048 caracteres.
</ParamField>

<ParamField body="personality_type" type="string">
  Tipo de personalidade MBTI (ex.: `INTJ`).
</ParamField>

<ParamField body="wake_policy_json" type="object">
  Objeto de configuração da política de ativação.
</ParamField>

<ParamField body="budget_policy_json" type="object">
  Objeto de configuração da política de orçamento.
</ParamField>

<ParamField body="goal_json" type="object">
  Objeto de configuração de objetivo.
</ParamField>

<ParamField body="work_policy_json" type="object">
  Objeto de configuração da política de trabalho.
</ParamField>

<ParamField body="voice_realtime_voice" type="string">
  Identificador de voz para o modo de voz em tempo real.
</ParamField>

### **Resposta**

```json theme={null}
{
  "data": {
    "id": 123,
    "name": "Finance Ops",
    "workspace_id": 10
  }
}
```
