Pular para o conteúdo

Arquivo de uma conversa

POST
/v1/conversations/{channel}/{conversationId}/file
curl --request POST \
--url https://developers.nexo.winningsales.com.br/v1/conversations/example/example/file \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "format": "pdf" }'

Monta a conversa inteira em PDF, texto ou JSON, de qualquer canal, grava no bucket de exportações e devolve um link assinado do S3, válido por 15 minutos, que já baixa com o nome do arquivo. O arquivo não passa pela API e some em 7 dias. O vendedor só baixa as conversas que enxerga. Exige o escopo conversations:read; cada arquivo fica na atividade da empresa.

conversationId
required

Id da conversa no canal

channel
required

Canal: meeting, note, call, email, whatsapp ou crm_whatsapp

Media typeapplication/json
object
format

Formato: pdf (padrão), txt ou json

string
default: pdf
Allowed values: pdf txt json

O link do arquivo

Media typeapplication/json
object
url
required

Link assinado do S3, válido por 15 minutos, que já baixa com o nome do arquivo

string format: uri
expiresAt
required

Quando o link expira

string format: date-time
fileName
required

Nome do arquivo, com a data no fuso da empresa

string
contentType
required

Tipo do arquivo

string
sizeInBytes
required

Tamanho em bytes

integer

Example generated

{
"url": "https://example.com",
"expiresAt": "2026-04-15T12:00:00Z",
"fileName": "example",
"contentType": "example",
"sizeInBytes": 1
}

Canal ou formato inválido

Media typeapplication/json
object
type
required

Stable machine-readable error code (e.g. identity.email_already_in_use)

string
title
required

Error class name

string
status
required

HTTP status code

integer
detail
required

Human-readable message, safe to display to end users

string
requestId
required

Correlation id — send it to support to locate the full trail

string
nullable
meta

Structured details safe for the frontend (field errors, ids)

object
key
additional properties

Example generated

{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"requestId": "example",
"meta": {
"additionalProperty": "example"
}
}

Token ausente, inválido, expirado ou revogado

Media typeapplication/json
object
type
required

Stable machine-readable error code (e.g. identity.email_already_in_use)

string
title
required

Error class name

string
status
required

HTTP status code

integer
detail
required

Human-readable message, safe to display to end users

string
requestId
required

Correlation id — send it to support to locate the full trail

string
nullable
meta

Structured details safe for the frontend (field errors, ids)

object
key
additional properties

Example

{
"type": "public_api.invalid_credential",
"title": "InvalidCredentialError",
"status": 401,
"detail": "Token de acesso inválido, expirado ou revogado. Crie um novo token de acesso no Nexo.",
"requestId": "019fcae7-3e54-755a-8458-bdb605b324bb"
}

Papel, escopo do token ou plano não permitem a operação

Media typeapplication/json
object
type
required

Stable machine-readable error code (e.g. identity.email_already_in_use)

string
title
required

Error class name

string
status
required

HTTP status code

integer
detail
required

Human-readable message, safe to display to end users

string
requestId
required

Correlation id — send it to support to locate the full trail

string
nullable
meta

Structured details safe for the frontend (field errors, ids)

object
key
additional properties

Example

{
"type": "public_api.insufficient_scope",
"title": "InsufficientScopeError",
"status": 403,
"detail": "Este token não tem o escopo conversations:read, exigido por esta operação. Gere um token com esse escopo.",
"requestId": "019fcae7-3e54-755a-8458-bdb605b324bb",
"meta": {
"operation": "conversations.reading",
"scope": "conversations:read"
}
}

Conversa inexistente ou fora da visibilidade

Media typeapplication/json
object
type
required

Stable machine-readable error code (e.g. identity.email_already_in_use)

string
title
required

Error class name

string
status
required

HTTP status code

integer
detail
required

Human-readable message, safe to display to end users

string
requestId
required

Correlation id — send it to support to locate the full trail

string
nullable
meta

Structured details safe for the frontend (field errors, ids)

object
key
additional properties

Example

{
"type": "conversations.conversation_unavailable",
"title": "ConversationUnavailableError",
"status": 404,
"detail": "Esta conversa não está disponível.",
"requestId": "019fcae7-3e54-755a-8458-bdb605b324bb",
"meta": {
"channel": "meeting",
"conversationId": "019fcae7-3e54-755a-8458-bdb605b324aa"
}
}

Limite de chamadas da empresa ou do token atingido

Media typeapplication/json
object
type
required

Stable machine-readable error code (e.g. identity.email_already_in_use)

string
title
required

Error class name

string
status
required

HTTP status code

integer
detail
required

Human-readable message, safe to display to end users

string
requestId
required

Correlation id — send it to support to locate the full trail

string
nullable
meta

Structured details safe for the frontend (field errors, ids)

object
key
additional properties

Example

{
"type": "public_api.rate_limited",
"title": "PublicRateLimitedError",
"status": 429,
"detail": "Muitas chamadas em pouco tempo. Tente de novo em 12 segundos.",
"requestId": "019fcae7-3e54-755a-8458-bdb605b324bb",
"meta": {
"class": "content",
"limitedBy": "company",
"limit": 120,
"windowSeconds": 60,
"retryAfterSeconds": 12
}
}