Update Block
PATCH
/blocks/:idUpdate an existing block. Only the attributes you include are changed.
Attributes
| Attribute | Type | Description |
|---|---|---|
type | enum | text, header, gallery, video, speakers, schedule, sponsors, organisers, location, countdown, mailinglist, live, custom, organisation-events, menu-organisation, link, message-text, message-image. The type of block. Determines which content fields are valid. |
status | enum | published, preview, deleted, hidden. Block visibility status. |
slug | string | |
order | number | |
content | object | Block content object. ONLY use fields listed for the specific type — unknown fields are silently stripped. Shared fields (all types): name, cssClassName, theme (primary|inverted|secondary|custom), style (spacing object with spacing/spacingTop/spacingBottom each: small|medium|large|custom), blockStyleSettings (colors/fonts/css/effects), includeTickets (bool), filterTicketBatches (number[]), url. Type-specific fields: - text, message-text: html, textLayout (text-only|image-left|image-right|image-top|image-background|custom), showSocial, showRsvpButton, ctaText, ctaUrl - header: title, headerStyle (text|logo|none), logoSize, coverStyle (fullscreen|poster|compact), shadowStyle (gradient|grid|none), shadowOpacity, headerTextColor, ctaText, ctaUrl - gallery: title, html, galleryLayout (standard|grid|info|custom) - video: videoEmbedId, videoEmbedType (youtube|vimeo|vimeo-event|facebook|twitch), videoEmbedVimeoChat, videoLayout (block|block-large|theater) - speakers: title, speakersLayout (standard|grid|full|preview|custom), speakersShowSelected, speakersSettings ({id, order, show, isAnnounced?}[]), focusOn (speaker|talk), speakersPagePath, schedulePagePath - schedule: title, speakersPagePath - organisers: title, organisersLayout (standard|minimal) - location: html, showMap, showRsvpButton - countdown: title, countdownType (custom|event-start-date), countdownTo (ISO date string) - mailinglist: title, showPublicCategories, categoriesTitle - live: liveStreamId, liveStreamMode (block|theater) - custom: html - organisation-events: title, organisationEventsLayout (standard|grid-layout), organisationEventsSelection (all|upcoming|past) - sponsors, menu-organisation, link, message-image: shared fields only When updating, provide the complete content object — partial content replaces the entire content. |
blockStyleId | number | |
pageId | number | |
eventId | number | |
workspaceId | number | |
categoryIds | array of numbers |
Fields marked with * are required.
Request
js
import Confetti from 'confetti'
const confetti = new Confetti({ apiKey: 'your-key' })
const block = await confetti.blocks.update(210645, {
type: 'text',
status: 'published',
slug: 'example',
order: 0,
})sh
curl -X PATCH "https://api.confetti.events/blocks/210645" \
-H "Content-Type: application/json" \
-H "Authorization: apikey your-key" \
-d '{
"data": {
"type": "block",
"id": "210645",
"attributes": {
"type": "text",
"status": "published",
"slug": "example",
"order": 0
}
}
}'