Sorry, no results found for "".

Show examples in:
Javascript HTTP
Endpoint info
Available examples

Content Management API > Fieldset

Update a fieldset

Body parameters

type string Required

Must be exactly "fieldset".

attributes.title string Optional

The title of the fieldset

Example: "SEO-related fields"
attributes.hint string, null Optional

Description/contextual hint for the fieldset

Example: "Please fill in these fields!"
attributes.position integer Optional

Ordering index

Example: 1
attributes.collapsible boolean Optional

Whether the fieldset can be collapsed or not

attributes.start_collapsed boolean Optional

When fieldset is collapsible, determines if the default is to start collapsed or not

Returns

Returns a resource object of type fieldset.

Examples

PUT https://site-api.datocms.com/fieldsets/:fieldset_id HTTP/1.1
Authorization: Bearer YOUR-API-TOKEN
Accept: application/json
X-Api-Version: 3
Content-Type: application/vnd.api+json
{
"data": {
"type": "fieldset",
"id": "93Y1C2sySkG4Eg0atBRIwg",
"attributes": {}
}
}
Terminal window
curl -g 'https://site-api.datocms.com/fieldsets/:fieldset_id' \
-X PUT \
-H "Authorization: Bearer YOUR-API-TOKEN" \
-H "Accept: application/json" \
-H "X-Api-Version: 3" \
-H "Content-Type: application/vnd.api+json" \
--data-binary '{"data":{"type":"fieldset","id":"93Y1C2sySkG4Eg0atBRIwg","attributes":{}}}'
await fetch("https://site-api.datocms.com/fieldsets/:fieldset_id", {
method: "PUT",
headers: {
Authorization: "Bearer YOUR-API-TOKEN",
Accept: "application/json",
"X-Api-Version": "3",
"Content-Type": "application/vnd.api+json",
},
body: JSON.stringify({
data: { type: "fieldset", id: "93Y1C2sySkG4Eg0atBRIwg", attributes: {} },
}),
});
HTTP/1.1 200 OK
Content-Type: application/json
Cache-Control: cache-control: max-age=0, private, must-revalidate
X-RateLimit-Limit: 30
X-RateLimit-Remaining: 28
{
"data": {
"type": "fieldset",
"id": "93Y1C2sySkG4Eg0atBRIwg",
"attributes": {
"title": "SEO-related fields",
"hint": "Please fill in these fields!",
"position": 1,
"collapsible": true,
"start_collapsed": false
},
"relationships": {
"item_type": {
"data": {
"type": "item_type",
"id": "DxMaW10UQiCmZcuuA-IkkA"
}
}
}
}
}