Delete Documents

View as Markdown

Delete the documents of a domain, narrowed by the provided filters. Filters are combined with AND, so a document is only deleted when it matches all of them. At least one filter is required, or pass all=true to delete every document. The x-fern-basepath header narrows the deletion to a single basepath.

Authentication

AuthorizationBearer

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

Path parameters

domainstringRequired

Headers

x-fern-basepathstring or nullOptional

The basepath of the docs site that the document belongs to, e.g. /plants for a site served at docs.example.com/plants. Omit this for sites served at the root of the domain. Documents are only retrieved by Ask Fern on the site matching the domain and basepath they were created with.

Query parameters

productstring or nullOptional>=1 character
Only delete documents whose product matches this value exactly.
versionstring or nullOptional>=1 character
Only delete documents whose version matches this value exactly.
url_prefixstring or nullOptional>=1 character
Only delete documents whose url starts with this value.
allbooleanOptionalDefaults to false

Delete every document in the domain and basepath. Cannot be combined with the product, version or url_prefix filters.

Response

Successful Response
successboolean
Whether any documents were deleted
documents_deletedinteger
The number of documents that were deleted

Errors

400
Bad Request Error
422
Unprocessable Entity Error