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

# Obter Sessão

> Obtém detalhes de uma sessão específica

Retorna os detalhes completos de uma sessão.

## Path Parameters

<ParamField path="id" type="string" required>
  ID da sessão (UUID).
</ParamField>

## Resposta

<ResponseField name="id" type="string">
  ID único da sessão.
</ResponseField>

<ResponseField name="name" type="string">
  Nome da sessão.
</ResponseField>

<ResponseField name="status" type="string">
  Status atual da sessão.
</ResponseField>

<ResponseField name="phone" type="string">
  Número de telefone conectado (quando conectado).
</ResponseField>

<ResponseField name="allowGroup" type="boolean">
  Se mensagens de grupo estão habilitadas.
</ResponseField>

<ResponseField name="webhookUrl" type="string">
  URL do webhook configurado.
</ResponseField>

<ResponseField name="webhookEvents" type="string[]">
  Eventos configurados para o webhook.
</ResponseField>

<ResponseField name="hasWebhook" type="boolean">
  Se há webhook configurado.
</ResponseField>

<ResponseField name="createdAt" type="string">
  Data de criação (ISO 8601).
</ResponseField>

<ResponseField name="updatedAt" type="string">
  Data da última atualização.
</ResponseField>

<ResponseField name="connectedAt" type="string">
  Data da última conexão bem-sucedida.
</ResponseField>

<RequestExample>
  ```bash cURL theme={"system"}
  curl -X GET "https://api.oxenty.api.br/api/sessions/550e8400-e29b-41d4-a716-446655440000" \
    -H "X-API-Key: YOUR_API_KEY"
  ```

  ```typescript TypeScript theme={"system"}
  const session = await client.sessions.get('550e8400-e29b-41d4-a716-446655440000');
  ```

  ```python Python theme={"system"}
  session = client.sessions.get('550e8400-e29b-41d4-a716-446655440000')
  ```
</RequestExample>

<ResponseExample>
  ```json 200 OK theme={"system"}
  {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "name": "atendimento-principal",
    "status": "connected",
    "phone": "5511999999999",
    "allowGroup": true,
    "webhookUrl": "https://seu-servidor.com/webhook",
    "webhookEvents": ["message.received", "message.status"],
    "hasWebhook": true,
    "createdAt": "2024-01-15T10:00:00.000Z",
    "updatedAt": "2024-01-15T10:00:00.000Z",
    "connectedAt": "2024-01-15T10:05:00.000Z"
  }
  ```

  ```json 404 Not Found theme={"system"}
  {
    "statusCode": 404,
    "error": "SESSION_NOT_FOUND",
    "message": "Sessão não encontrada"
  }
  ```
</ResponseExample>
