Issues in Layout API v2.0.0

Hi,
I’m running v2.0.0 and running into a few issues with the Layouts API. I created a layout through the CMS web and added regions with media, text and a clock. But when I’m fetching the same layout through the API, I’m receiving the layout information but the region key is coming up as empty. I checked out the layout and published it as well. All the changes in the other fields are coming but regions is an empty array.

Moreover, when I’m trying to edit a layout through the API, I’m getting a 422 - Unprocessable entity error, with the following response payload:

{
    "error": {
        "message": "Layout Name must be between 1 and 50 characters",
        "code": 422,
        "data": {
            "property": "name"
        }
    }
}

The Swagger required fields do mention the name key in the required fields, but in the response, I see the layout name is coming in the layout key, and not name. Here’s the response I’m getting:

[
    {
        "layoutId": 55,
        "ownerId": 1,
        "campaignId": 6,
        "parentId": null,
        "publishedStatusId": 2,
        "publishedStatus": "Draft",
        "backgroundImageId": null,
        "schemaVersion": 3,
        "layout": "layout-test",
        "description": null,
        "backgroundColor": "#000",
        "createdDt": "2025-08-20 12:54:59",
        "modifiedDt": "2025-08-20 13:12:51",
        "status": 1,
        "retired": 0,
        "backgroundzIndex": 0,
        "width": 1920,
        "height": 1080,
        "displayOrder": null,
        "duration": 60,
        "statusMessage": null,
        "regions": [],
        "tags": null,
        "permissions": [],
        "campaigns": [],
        "owner": "flexsol",
        "groupsWithPermissions": null
    }
]

I specifically added the name key in the request payload as well, and tried with layout too, but still the same 422 error. Any idea if I’m missing anything?

Hi! The issue may be caused by the character limit in media and layout names. Could you try renaming the layout/media files to under 50 characters and see if the issue persists?

The name is under 50 characters for both the media and the layout. I found another weird behavior though. Everytime I edit, or publish a certain layout, its id changes . This i believe can cause huge problems since I won’t ever now the ID of my layout and subsequently won’t be able to fetch or perform any operations on my layout.

image

These are two images of the same layout, one before and one after publishing