Basker Docs

Bulk update configured fields

Safely update custom attributes or theme settings across matching records

The bulk configured-field endpoints apply the same set and unset operation to matching records. Use them for controlled migrations and administrative integrations, not as a replacement for ordinary record updates.

PATCH /partners/{version}/{tenant}/{collection}/custom-attributes
PATCH /partners/{version}/{tenant}/{collection}/theme-settings

Preview every bulk change

Send the request with dryRun: true, inspect every result, then repeat the same request with dryRun: false. A bulk request can target up to 500 records and is not an all-or-nothing transaction: each result reports its own outcome.

Supported collections

Custom-attribute bulk updates support:

events, event-instances, posts, seasons, series, works, venues, organizations, and people.

Theme-settings bulk updates support:

pages, blogs, people, seasons, series, works, organizations, events, venues, posts, and event-instances.

Use the collection's schema-discovery endpoint to obtain valid public keys and values before writing.

Target records

Supply either a body-level where object or an explicit all: true. You cannot send both, and an empty where is rejected.

{
  "where": {
    "status": { "equals": "published" }
  },
  "dryRun": true,
  "set": {
    "featured": true,
    "campaign": "autumn-2026"
  },
  "unset": ["legacy_label"]
}

where uses the same standard-field grammar as list filtering. If more than 500 records match, narrow the condition and process the migration in separate requests. Use all: true only when changing the entire collection intentionally.

Set and unset fields

At least one of set or unset is required. A field cannot appear in both.

Use bare public keys such as featured; do not send namespaces such as custom.featured, storage paths, keys containing dots, or keys containing whitespace. To remove a configured value, put its key in unset instead of assigning null.

Published and draft targets

The endpoint targets published records by default. Add ?draft=true to target the latest drafts instead:

PATCH /partners/2026-02/remarkable-theatre/events/custom-attributes?draft=true

When a published record is updated, the API also carries those configured-field changes into its latest pending draft when one exists. The response reports that draft synchronization separately. A draft-targeted request changes drafts only.

Preview and apply

First send a dry run:

curl -s -X PATCH \
  -H "Authorization: users API-Key YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "where": { "status": { "equals": "published" } },
    "dryRun": true,
    "set": { "featured": true }
  }' \
  "https://api.basker.app/partners/2026-02/remarkable-theatre/events/custom-attributes"

The response summarizes matching and per-record outcomes:

{
  "dryRun": true,
  "versionTarget": "published",
  "matched": 1,
  "updated": 0,
  "wouldUpdate": 1,
  "unchanged": 0,
  "failed": 0,
  "draftSynced": 0,
  "draftWouldSync": 1,
  "draftSyncSkipped": 0,
  "draftSyncFailed": 0,
  "results": [
    {
      "id": "evt_123",
      "status": "would_update",
      "set": ["featured"],
      "unset": []
    }
  ]
}

Check matched, wouldUpdate, failed, every item in results, and the draft-sync counts. Apply the change by resending the same target and operations with dryRun: false, then verify the returned updated, unchanged, failed, and draft-sync results.

On this page