Basker Docs

Discover fields & options

Ask the API what blocks, theme settings, and custom attributes a collection supports so you can build valid writes without guessing

The blocks, theme settings, and custom attributes of every collection are specific to the tenant and its theme. Rather than hard-coding field names or guessing valid values, ask the API first. Each mutation endpoint has a matching read-only …/schema endpoint that describes exactly what you can write.

The workflow

Discover, then create, then mutate. Read the schema once, then construct your create, block, settings, and attribute writes from it.

The schema endpoints

EndpointDescribes
GET /{version}/{tenant}/{collection}/blocks/schemaThe block types available and the fields for each block
GET /{version}/{tenant}/{collection}/theme-settings/schemaThe theme settings that apply to a record, based on its template
GET /{version}/{tenant}/{collection}/custom-attributes/schemaThe custom attributes for a collection
GET /{version}/{tenant}/theme/settings/schemaThe site-wide settings for the theme
curl -H "Authorization: users API-Key a1b2c3d4-…" \
  "https://api.basker.app/partners/2026-02/remarkable-theatre/events/custom-attributes/schema"

What a field looks like

Every field comes back in a uniform shape, so one piece of code can handle them all:

{
  "key": "theme_color",        // the name to use in your write
  "type": "select",            // text · richText · number · checkbox · select · date ·
                               // relationship · upload · customObject · array · group
  "label": "Theme Color",
  "options": [                 // present for select / radio: use one of these values
    { "value": "azure", "label": "Azure" },
    { "value": "midnight", "label": "Midnight" }
  ],
  "relationTo": "media",        // present for relationship / upload
  "customObjectType": "genre",  // present for customObject: the type to link
  "hasMany": false,
  "fields": [ /* nested fields, present for array / group */ ]
}
  • options lists the only valid values for a select/radio: send one of them exactly.
  • customObjectType tells you which custom-objects a customObject field links to (see below).
  • fields recurses for array and group types, describing each sub-field.

Building values from the schema

The type of a field determines how to construct its value:

typeSend
text, textarea, emaila string
richTextan HTML string (or <key>_html)
numbera number
checkboxa boolean
select, radioone of the field's options values
datean ISO 8601 string
relationship, uploadan id (or an array of ids when hasMany)
customObjecta custom-object instance id (or an array when hasMany)
arraya list of objects shaped by the field's nested fields
groupan object shaped by the field's nested fields

Linking custom-objects

A customObject field links to instances of the type named in customObjectType. List the matching instances, then set their id or ids:

# the schema said: { "key": "genres", "type": "customObject", "customObjectType": "genre", "hasMany": true }
curl -H "Authorization: users API-Key a1b2c3d4-…" \
  "https://api.basker.app/partners/2026-02/remarkable-theatre/custom-object-instances?where[definition.handle][equals]=genre"
# → pick an id, then: "set": { "genres": ["<instance-id>"] }

Instances may belong to your tenant. If your tenant is in a tenant group, instances may also belong to another member that shares them. The list includes both, and you can link either. If no instances of that type exist anywhere in scope, you cannot link the field yet.

Next steps

On this page