Skip to main content
POST
/
v1
/
namespaces
/
{namespace}
/
documents
/
delete
JavaScript
import Charcoal from '@charcoalhq/sdk';

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
Pattern: ^[A-Za-z0-9-_.]{1,128}$

Body

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

Response

Successful response

documents_deleted
integer
required