Update the content of an existing item. The existing item will have a structure which will contain fields. You can update any number of the items fields by sending an array of content values in the request body, keyed by the field uuid. For example, if you only want to update a single field you would only send a single field in the request body.
The content value could take one of a few formats, depending on the field type. For example:

  • Text Field (HTML or plain text) - this should just be the value, e.g.
    "<h1>hello</h1><p>world</p>" or "hello world"

  • Repeatable Text Fields - This should be an ordered array of content values. All repeatable text fields that
    you wish to keep should be included in the array, otherwise they will be deleted. Any fields you wish to add simply
    include them in the array, at the order you wish for the content to appear. E.g. If existing repeatable fields
    has content ['hello', 'world', 'test'] then submitted content array of ['hello', 'world'] would delete 'test' field.
    Alternatively, submitting a content array of ['hello', 'world', 'test', 'another'] would create a new field with the
    text 'another'. Submitting a content array of ['world', 'hello', 'test'] would simply swap the first two fields content.

  • Option Field - this should be an array of objects which each containing the selected option id as an id
    property, e.g. [{"id": "864cc5f7-e93b-4077-8b88-e4448a26c892"}]. If the option field has "other option"
    enabled, you can select that by id and set a value for the other option e.g.
    [{"id": "d6e91c1e-7765-454e-90fe-0ef272768a8e", "value": "Other option value"}]

  • Attachment Field - To leave this field unchanged, omit the field id from the content object in the request.
    To remove all existing attachments for the field, send an empty array []. To keep one or more existing
    attachments, or rearrange the order of attachments, send an array of the fileIds in the new order, omitting
    any files that you want to remove, e.g. ["MjU5MzE/elo0LlJffypudKIs", "MjU5MzE/26KVIGh2CCyLjTq8"].

    Deprecated - Uploading files directly to items is soon to be deprecated,
    please see the Upload files endpoint
    to upload the files to the
    project, and then include them in the content as described above.

    To upload one or more new files to an attachment field, send a multipart/form-data request, with each file keyed by
    assets[field id][optional index if more than one file], e.g.
    assets[46529874-0e0d-43fe-8c90-e65d4765573b] or assets[46529874-0e0d-43fe-8c90-e65d4765573b][0]. It is
    possible to upload new assets and update the content of other fields in the same multipart/form-data
    request.

  • Component Field - A component field can be repeatable, and will contain a collection of fields.
    Fields omitted from the request wont be updated.

Recipes
🦉
Course Content: Adding content to an item
Open Recipe
🦉
Updating attachment fields
Open Recipe

👍

For a full guide on adding content to an item see: Adding content to our item

Language
Authentication
Basic
base64
:
URL
Response
Click Try It! to start a request and see the response here!