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
| Endpoint | Describes |
|---|---|
GET /{version}/{tenant}/{collection}/blocks/schema | The block types available and the fields for each block |
GET /{version}/{tenant}/{collection}/theme-settings/schema | The theme settings that apply to a record, based on its template |
GET /{version}/{tenant}/{collection}/custom-attributes/schema | The custom attributes for a collection |
GET /{version}/{tenant}/theme/settings/schema | The 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 */ ]
}optionslists the only valid values for aselect/radio: send one of them exactly.customObjectTypetells you which custom-objects acustomObjectfield links to (see below).fieldsrecurses forarrayandgrouptypes, describing each sub-field.
Building values from the schema
The type of a field determines how to construct its value:
type | Send |
|---|---|
text, textarea, email | a string |
richText | an HTML string (or <key>_html) |
number | a number |
checkbox | a boolean |
select, radio | one of the field's options values |
date | an ISO 8601 string |
relationship, upload | an id (or an array of ids when hasMany) |
customObject | a custom-object instance id (or an array when hasMany) |
array | a list of objects shaped by the field's nested fields |
group | an 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
- Edit content blocks: apply the block/theme-settings schema you just read.
- Bulk update configured fields: preview and apply one change across matching records.
- Field selection: trim what a read returns.