Skip to content
RedirHub/API
Sign inGet API key
Bulk Operations · recordBulk.update
PUT/bulkrecordBulk.update

Update records in bulk

Applies the same change across many records in one request.

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

The request

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

# Update records in bulk
curl -X PUT "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]optionalstringA hostname already connected to the workspace. See List hostnames.
filter[tld]optionalstring
filter[handler]optionalstring
filter[destination]optionalstringWhere matching traffic is sent.
filter[search]optionalstring
filter[tags]optionalstringFreeform labels. Filter on them with filter[tags].
filter[traffic]optionalstring
filter[dns_correct]optionalstring
filter[created_after]optionalstring
filter[created_before]optionalstring

The response

A 200 returns the record as JSON.

{
  "affected": 1
}

Status codes

200
SuccessNumber of records the filter matched and the update was applied to.
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.

What usually comes next

One call is rarely the whole job. These are the endpoints most integrations reach for around this one.