Skip to main content
POST
/
api
/
openapi
/
v1
/
documents
Fazer Upload de Documento
curl --request POST \
  --url https://app.converza.io/api/openapi/v1/documents \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form file='@example-file' \
  --form team_id=3c90c3cc-0d44-4b50-8888-8dd25736052a \
  --form chars=5000
{
  "success": true,
  "data": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "team_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "name": "contrato.pdf",
    "type": "pdf",
    "size": 1024000,
    "openai_id": "file-abc123",
    "file_url": "550e8400-e29b-41d4-a716-446655440000/file-abc123.pdf",
    "chars": 5000,
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z"
  }
}

Authorizations

Authorization
string
header
required

Token JWT obtido do endpoint /api/openapi/auth/token

Body

multipart/form-data
file
file
required

Arquivo para upload (pdf, txt, docx, doc)

team_id
string<uuid>
required

ID da Equipe

chars
integer

Contagem de caracteres (opcional, padrão 0)

Example:

5000

Response

Documento enviado com sucesso

success
boolean
Example:

true

data
object