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

# TypeBot

> Gerencie TypeBots e sessões pelo SDK .NET

Use `client.TypeBots` para listar, criar, atualizar, excluir e controlar sessões de TypeBot.

## `client.TypeBots.ListAsync<TResponse>(instanceId, options?)`

```csharp theme={null}
await client.TypeBots.ListAsync<object>("VZ...", new InstanceRequestOptions { InstanceToken = "instance-token" });
```

**Retorno:** lista/array de configuracoes TypeBot da instancia (IDs, gatilhos, prioridade, etc.).

## `client.TypeBots.CreateAsync<TResponse>(request)`

```csharp theme={null}
await client.TypeBots.CreateAsync<object>(new TypeBotRequest
{
    InstanceId = "VZ...",
    InstanceToken = "instance-token",
    Enabled = true,
    Description = "Bot de atendimento",
    TypebotUrl = "https://app.typebot.io",
    PublicId = "my-bot",
    TriggerType = "keyword",
    TriggerOperator = "equals",
    TriggerValue = "start",
    Priority = 1,
    ExpireInMinutes = 60,
    KeywordFinish = "sair",
    DefaultDelayMs = 1000,
    UnknownMessage = "Não entendi sua mensagem.",
    ListenFromMe = false,
    StopBotFromMe = true,
    KeepOpen = false,
    DebounceMs = 500,
    IgnoreGroups = true,
    TranscribeAudio = false,
});
```

**Retorno:** configuracao criada, incluindo `TypebotId` para updates posteriores.

## `client.TypeBots.UpdateAsync<TResponse>(request)`

```csharp theme={null}
await client.TypeBots.UpdateAsync<object>(new TypeBotMutationRequest
{
    InstanceId = "VZ...",
    InstanceToken = "instance-token",
    TypebotId = "typebot_123",
    Enabled = false,
});
```

**Retorno:** configuracao atualizada ou `{ Status: "ok" }`.

## `client.TypeBots.DeleteAsync<TResponse>(request)`

```csharp theme={null}
await client.TypeBots.DeleteAsync<object>(new TypeBotMutationRequest
{
    InstanceId = "VZ...",
    InstanceToken = "instance-token",
    TypebotId = "typebot_123",
});
```

**Retorno:** confirmacao de remocao (`{ Status: "ok" }` ou mensagem equivalente).

## `client.TypeBots.StartSessionAsync<TResponse>(request)`

```csharp theme={null}
await client.TypeBots.StartSessionAsync<object>(new TypeBotStartSessionRequest
{
    InstanceId = "VZ...",
    InstanceToken = "instance-token",
    TypebotId = "typebot_123",
    Phone = "5511999999999",
    PushName = "Maria",
    Message = "start",
});
```

**Retorno:** sessao iniciada (UUID da sessao, contato, status `opened`).

## `client.TypeBots.ListSessionsAsync<TResponse>(instanceId, options?)`

```csharp theme={null}
await client.TypeBots.ListSessionsAsync<object>("VZ...", new InstanceRequestOptions { InstanceToken = "instance-token" });
```

**Retorno:** lista de sessoes (`opened`, `paused`, `closed`) por contato/flow.

## `client.TypeBots.PauseSessionAsync<TResponse>(request)`

```csharp theme={null}
await client.TypeBots.PauseSessionAsync<object>(new TypeBotSessionRequest
{
    InstanceId = "VZ...",
    InstanceToken = "instance-token",
    Session = "5511999999999",
});
```

**Retorno:** sessao com status `paused`.

## `client.TypeBots.CloseSessionAsync<TResponse>(request)`

```csharp theme={null}
await client.TypeBots.CloseSessionAsync<object>(new TypeBotSessionRequest
{
    InstanceId = "VZ...",
    InstanceToken = "instance-token",
    Session = "5511999999999",
});
```

**Retorno:** sessao encerrada (`closed`) ou confirmacao por telefone.
