GET
/
conversations
/
export
curl --request GET \
  --url https://dash.superagentes.ai/api/conversations/export \
  --header 'Authorization: Bearer <token>'

Exportar Conversa

Este endpoint permite exportar uma conversa em formato PDF ou CSV para análise ou arquivamento.

Casos de uso

  • Exportar histórico de conversas para análise offline
  • Criar relatórios de atendimento
  • Arquivar conversas importantes
  • Compartilhar conversas com membros da equipe

Exemplos de código

const exportConversation = async (conversationId, format) => {
  const response = await fetch(`https://dash.superagentes.ai/api/conversations/export?conversationId=${conversationId}&format=${format}`, {
    method: 'GET',
    headers: {
      'Authorization': `Bearer ${seu_token_jwt}`
    }
  });
  
  const blob = await response.blob();
  const url = window.URL.createObjectURL(blob);
  
  // Criar link para download
  const a = document.createElement('a');
  a.href = url;
  a.download = `conversation-${conversationId}.${format}`;
  document.body.appendChild(a);
  a.click();
  window.URL.revokeObjectURL(url);
};

// Exemplo de uso
exportConversation('conversation-id-1', 'pdf');

Exemplo de resposta

Arquivo binário no formato solicitado (PDF ou CSV).

Authorizations

Authorization
string
header
required

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

Query Parameters

conversationId
string
required

ID da conversa a ser exportada

format
enum<string>
default:pdf

Formato do arquivo exportado

Available options:
pdf,
csv

Response

200
application/pdf
Arquivo exportado

The response is of type file.