API shows sucuess when creating/updating rich text entity, but does not display on UI

New to Fibery and am struggling with creating an entity that has a rich text field.

I’ve followed the docs to create the entity without the rich text field. That part works great. But I’m stuck trying to update/create the document to display the rich text. The API returns 200 and indicates that the document is updated, but it doesn’t display on the UI.

Here’s the code being used to update the document.

const createResponse = await fetch(`https://${fiberyAccount}.fibery.io/api/commands`, {
      method: 'POST',
      headers: {
        'Authorization': `Token ${fiberyToken}`,
        'Content-Type': 'application/json'
      },
      body: JSON.stringify(createPayload)
    });

if (!createResponse.ok) {
      const errorText = await createResponse.text();
      throw createError({
        statusCode: createResponse.status,
        statusMessage: `Failed to create Fibery request: ${createResponse.statusText} - ${errorText}`
      });
    }

// Get the message document ID from the create result
const messageDocId = createResult[0].result['Requests/Message']?.['fibery/id'];
console.log('Message document ID:', messageDocId);

const documentUpdateResponse = await fetch(`https://${fiberyAccount}.fibery.io/api/documents/commands?format=md`, {
      method: 'POST',
      headers: {
        'Authorization': `Token ${fiberyToken}`,
        'Content-Type': 'application/json'
      },
      body: JSON.stringify({
        command: 'create-or-update-documents',
        args: [
          {
            secret: messageDocId,
            content: messageContent
          }
        ]
      })
    });

I wrote a validation to check that the document has content in it - and was able to validate that it does have data, despite not showing on the UI. Here are the logs.

Validating Message field content...\n
Creating a test request...
Create response: [{"success":true,"result":{"Requests/Internal Reques_07kv6gl_deleted":false,"fibery/modification-date":"2025-06-23T23:24:21.200Z","Requests/Assignee_1lkc32k_deleted":null,"Requests/Title_0t9o4pq_deleted":null,"Requests/Request Type":null,"Requests/Original Subject":null,"Requests/Title":null,"fibery/id":"beac4753-25da-4e40-9d64-17275773fc6b","fibery/created-by":{"fibery/id":"7337f0f0-35c9-11f0-b339-6540d6cd3af4"},"fibery/creation-date":"2025-06-23T23:24:21.200Z","Requests/Subject":"Content Validation Test","Requests/Count_06bk75l_deleted":null,"fibery/public-id":"129","Requests/Priority":null,"Requests/Description":null,"workflow/state":{"fibery/id":"e42f4a10-31c8-11f0-958a-83f7526c0e97"},"Requests/Customer":{"fibery/id":"f3ab31fd-3dd0-11f0-874e-476d7c034126"},"Requests/Description_1g6nt46_deleted":{"fibery/id":"aa2319cf-46c4-4608-94d2-5a5341e398af"},"Requests/Ad Name(s)":null,"Requests/Queue":{"fibery/id":"69425da6-c566-49ef-a128-0765139a220a"},"Requests/Name":null,"Requests/Subject2":null,"Requests/Message":{"fibery/id":"3ba339ac-01d7-49dd-9f38-e3e3e8307ace"},"Requests/Created Date":null,"Requests/Due Date":null,"Requests/Requester_1tnffdq_deleted":null,"Requests/Queue_0iczzew_deleted":null,"fibery/rank":7810111516019475,"Requests/Count":null}}]
Message document ID: 3ba339ac-01d7-49dd-9f38-e3e3e8307ace
Entity ID: beac4753-25da-4e40-9d64-17275773fc6b
Public ID: 129

Updating document with unique content...
Document payload: {
  "command": "create-or-update-documents",
  "args": [
    {
      "secret": "3ba339ac-01d7-49dd-9f38-e3e3e8307ace",
      "content": "VALIDATION TEST - 2025-06-23T23:24:21.3NZ\n\n**Subject:** Content Validation Test\n**Category:** Technical Issue\n**Message:** This is a unique validation message to confirm the content is being stored and retrieved correctly.\n\n**Client Information:**\n- Client ID: VALIDATION-123\n- Client Name: Validation Client\n\n**User Information:**\n- User ID: VALIDATION-456\n- User Name: Validation User\n- User Email: validation@test.com\n\n**Submission Date:** 2025-06-23T23:24:21.3NZ\n\n*This content should be visible in the Message field!*\n"
    }
  ]
}
Document response: true

Waiting 5 seconds and validating content...
Document get response: {"secret":"3ba339ac-01d7-49dd-9f38-e3e3e8307ace","content":"VALIDATION  TEST - 2025-06-23T23:24:21.3NZ\n\n**Subject:** Content Validation Test\\\n**Category:** Technical Issue\\\n**Message:** This is a unique validation message to confirm the content is being stored and retrieved correctly.\n\n**Client Information:**\n\n* Client ID: VALIDATION-123\n* Client Name: Validation Client\n\n**User Information:**\n\n* User ID: VALIDATION-456\n* User Name: Validation User\n* User Email: validation@test.com\n\n**Submission Date:** 2025-06-23T23:24:21.3NZ\n\n*This content should be visible in the Message field!*"}

ACTUAL DOCUMENT CONTENT:
==========================================
VALIDATION TEST - 2025-06-23T23:24:21.3NZ

**Subject:** Content Validation Test\
**Category:** Technical Issue\
**Message:** This is a unique validation message to confirm the content is being stored and retrieved correctly.

**Client Information:**

* Client ID: VALIDATION-123
* Client Name: Validation Client

**User Information:**

* User ID: VALIDATION-456
* User Name: Validation User
* User Email: validation@test.com

**Submission Date:** 2025-06-23T23:24:21.3NZ

*This content should be visible in the Message field!*
==========================================

Content validation:
SUCCESS: Content contains 'VALIDATION TEST' - the message is being stored!
SUCCESS: Content contains the expected message!

Validation completed!
Check Fibery UI for request #129
Document ID: 3ba339ac-01d7-49dd-9f38-e3e3e8307ace
Entity ID: beac4753-25da-4e4

* List item

0-9d64-17275773fc6b

Hi there, the issue is in the document id, you got the Reference Entity Id here

// Get the message document ID from the create result
const messageDocId = createResult[0].result['Requests/Message']?.['fibery/id'];
console.log('Message document ID:', messageDocId);

But this is not the document content id, for that you have to grab

"Collaboration~Documents/secret"

smth like

// Get the message document ID from the create result
const messageDocId = createResult[0].result['Requests/Message']?.['Collaboration~Documents/secret'];
console.log('Message document ID:', messageDocId);

as it shown here in the docs

hope this helps