Skip to main content
DELETE
/
v1beta
/
namespaces
/
{namespace}
/
documents
JavaScript
import Charcoal from 'charcoal';

const client = new Charcoal({
  apiKey: process.env['CHARCOAL_API_KEY'], // This is the default and can be omitted
});

const deleteDocumentsResponse = await client.namespaces.documents.delete('namespace', {
  document_ids: ['string'],
});

console.log(deleteDocumentsResponse.documents_deleted);
{
  "documents_deleted": 123
}

Authorizations

Authorization
string
header
required

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

Path Parameters

namespace
string
required

Namespace identifier. Alphanumeric characters, hyphens, underscores, and dots. Max 128 characters.

Maximum string length: 128

Body

application/json
document_ids
string[]
required
Maximum array length: 10000

Response

200 - application/json

Successful response

documents_deleted
integer
required