Skip to content

Update a Component

Terminal window
https://mapi.storyblok.com/v1/spaces/:space_id/components/:component_id

Update the values of a component.

  • :space_id required number

    Numeric ID of a space

  • :component_id required number

    Numeric ID of a component

  • component The Component Object

    The component object

    Show child properties
    • name string

      Technical name of a component. Visible in the content editor if the display_name is null.

    • display_name string

      Name displayed in the content editor

    • schema object

      Key value pairs of the component fields

    • image string | null

      URL of the component preview image (if uploaded)

    • preview_field string

      The component preview field in the UI

    • is_root boolean

      true if a component can be used as a content type block

    • preview_tmpl string

      The component preview template. Learn how to create a preview template.

    • is_nestable boolean

      true if a component is a Nestable block

    • component_group_id string

      The component folder ID

    • icon string

      Icon of the component

    • color string

      Color of the icon

    • internal_tag_ids string[]

      List of IDs of the internal tags assigned to a component

    • content_type_asset_preview string

      Asset preview field of a content type block

curl "https://mapi.storyblok.com/v1/spaces/656/components/4123" \
-X PUT \
-H "Authorization: YOUR_OAUTH_TOKEN" \
-H "Content-Type: application/json" \
-d "{\"component\":{\"display_name\":null,\"id\":4123,\"is_nestable\":true,\"is_root\":false,\"name\":\"banner_section\",\"schema\":{\"headline\":{\"description\":\"Use this field for the title\",\"pos\":0,\"translatable\":true,\"type\":\"text\"}}}}"