Pular para o conteúdo

Remover um material

DELETE
/v1/knowledge/materials/{materialId}
curl --request DELETE \
--url https://developers.nexo.winningsales.com.br/v1/knowledge/materials/example \
--header 'Authorization: Bearer <token>'

Como o remover da tela: tira o material da base, apaga os arquivos de todas as versões e tira de uso os itens que dependiam só dele. Não dá para desfazer. Só administradores, como a Base de conhecimento na tela Calibração; o papel é relido a cada chamada, e para mudar o token precisa do escopo calibration:write.

materialId
required

Id do material

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"
}
}

Material inexistente ou já removido

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": "knowledge.material_not_found",
"title": "MaterialNotFoundError",
"status": 404,
"detail": "Material não encontrado na base de conhecimento.",
"requestId": "019fcae7-3e54-755a-8458-bdb605b324bb",
"meta": {
"materialId": "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
}
}