Skip to content
RedirHub/API
Sign inGet API key
Bulk Operations · recordBulk.destroy
DELETE/bulkrecordBulk.destroy

Delete records in bulk

Removes many records in one request. There is no undo — page through GET /link first if you need a record of what is about to go.

Base URL
https://api.redirhub.com/v1
Auth
Bearer token
Idempotent
Yes
Returns
application/json

The request

Call DELETE /bulk with your bearer token. Narrow or order the result with the query parameters below.

# Delete records in bulk
curl -X DELETE "https://api.redirhub.com/v1/bulk?filter=value" \
  -H "Authorization: Bearer $REDIRHUB_TOKEN"

Query parameters

ParameterDescription
sortoptionalstringSort results by field. Prefix with - for descending order. Available sorts: id, created_at, updated_atid-idcreated_at-created_atupdated_at-updated_at
filterRequiredobjectRecords the operation applies to. Accepted as a query object (filter[host]=go.example.com) or as a filter object in the JSON body. At least one filter must carry a value, or every record of the workspace would match. Available filters: id, host, tld, handler, destination, search, tags, traffic, dns_correct, created_after, created_before
filter[id]optionalstring
filter[host]optionalstring
filter[tld]optionalstring
filter[handler]optionalstring
filter[destination]optionalstring
filter[search]optionalstring
filter[tags]optionalstring
filter[traffic]optionalstring
filter[dns_correct]optionalstring
filter[created_after]optionalstring
filter[created_before]optionalstring

The response

A 200 returns the record as JSON.

"string"

Status codes

200
SuccessNumber of records the filter matched. Deletion itself runs in the background, so the records may disappear slightly later.
401
UnauthenticatedUnauthenticated
422
Validation failedA field was rejected. errors lists every field with its reason.
429
Too many requestsToo many requests
484
Bad requestThe workspace role of the authenticated user is too low for this action.