Skip to content

Delete a Custom API

DELETEhttps://api.diffbot.com/v3/custom

Delete definitions of existing Custom APIs for a given URL pattern and API on your token.

Example

bash
curl --request DELETE \
  --url 'https://api.diffbot.com/v3/custom?token=<DIFFBOT_TOKEN>' \
  --header 'Content-Type: application/json' \
  --data '{
  "api": "/api/discussion",
  "urlPattern": "examplePattern.com"
}'
json
{
  "api": "/api/discussion",
  "token": "TOKEN",
  "urlPattern": "examplePattern.com",
  "status": "success"
}

API Definition

Generated from v1.1.0 of the Extract APIs OpenAPI specification.

Delete definitions of existing Custom APIs for a given URL pattern and API on your token

Request

Authentication
tokenquery
Cache and insert token into example requests (15d expiry)
Request body application/json
apistring

The specific API being targeted. Always precede the API name with “/api/” as in "/api/article" except for “all”)

urlPatternstring

A regex that defines the URLs corresponding to which the Custom API definitions will be deleted. Make sure that is json-escaped before url-encoding it.

tokenstring

Your token. The Custom API definitions only for this token will be deleted

Example request

bash
curl --request DELETE \
  --url 'https://api.diffbot.com/v3/custom?token=<DIFFBOT_TOKEN>' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data-raw '{}'

Response

200Successful API Response
tokenstring
urlPatternstring
apistring
statusstring
json
{
  "api": "/api/discussion",
  "token": "TOKEN",
  "urlPattern": "examplePattern.com",
  "status": "success"
}
500Internal Server Error
statusCodeinteger
errorstring
json
{
  "statusCode": 500,
  "error": "urlPattern and apiPrefix required to delete rule"
}