Skip to main content
POST
/
v1
/
knowledge
Criar novo conhecimento ou mídia
curl --request POST \
  --url https://api.nuvia.ai/v1/knowledge \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form file='@example-file' \
  --form 'name=<string>' \
  --form 'description=<string>'
{
  "_id": {},
  "name": "<string>",
  "company": {
    "_id": {},
    "name": "<string>",
    "channels": [],
    "agent_flows": [
      {
        "_id": {},
        "name": "<string>",
        "url": "<string>",
        "specialist_url": "<string>"
      }
    ],
    "description": "<string>",
    "general_config": {}
  },
  "description": "<string>",
  "s3_key": "<string>",
  "file_url": "<string>",
  "content": "<string>",
  "meta": {},
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

Token JWT de autenticação

Body

multipart/form-data
file
file
required

Arquivo para upload

name
string
required

Nome do conhecimento/mídia

type
enum<string>
required

Tipo: KNOWLEDGE ou MEDIA

Available options:
KNOWLEDGE,
MEDIA
file_type
enum<string>
required

Tipo do arquivo: PDF, DOCX, IMAGE, VIDEO, AUDIO, DOCUMENT

Available options:
PDF,
DOCX,
AUTCL,
IMAGE,
VIDEO,
AUDIO,
DOCUMENT
description
string

Descrição opcional

Response

201 - application/json
_id
object
required
name
string
required
type
enum<string>
required
Available options:
KNOWLEDGE,
MEDIA
file_type
enum<string>
required
Available options:
PDF,
DOCX,
AUTCL,
IMAGE,
VIDEO,
AUDIO,
DOCUMENT
company
object
required
description
string
s3_key
string

Chave do objeto no S3. Fonte da verdade para gerar URL assinada.

file_url
string
deprecated
content
string
status
enum<string>
Available options:
PROCESSING,
READY,
ERROR
meta
object
createdAt
string<date-time>
updatedAt
string<date-time>