> ## Documentation Index
> Fetch the complete documentation index at: https://docs.exode.biz/llms.txt
> Use this file to discover all available pages before exploring further.

# Update a form layout

> Update an existing form layout by its ID

## Request headers

**Authorization** `string` *required*

The service user's API token in the `Bearer YOUR_TOKEN` format. The school owner issues the token in the admin panel:
**Manage → School → For developers → API keys** — see the ["Authentication"](https://docs.exode.biz/en/exode-api/setup.md#authentication) section for details.

**Seller-Id** `integer` *required*

The numeric ID of the seller — the account the school belongs to. Copy it on the **API keys** page, in
the **Integration data → Identifiers** card. The token's permissions are checked against this ID.

**School-Id** `integer` *required*

The numeric ID of the school, found in the same place as `Seller-Id`. The value must match the seller's school — otherwise
a `400` error with `cause: "ForbiddenSchoolMismatch"` is returned.

```
PUT /saas/v2/form/layout/:layoutId/update
```

Requires authentication and the [**"Forms management"**](https://docs.exode.biz/en/exode-api/permissions.md) permission (`FormManage`).

## Path parameters

**layoutId** `integer` *required*

ID of the form layout to update. The layout must belong to the current school.

## Request parameters

> [!NOTE]
>
> All request body parameters are optional. Pass only the fields you want to update.

**mode** `enum`

Form layout mode. Possible values: `Custom`, `Form`, `Signup`, `Welcome`, `Participant`.

**name** `string`

Form layout name. Maximum 255 characters.

**internalName** `string`

Internal layout name. Maximum 255 characters.

**status** `enum`

Layout status. Possible values: `Draft`, `Published`.

**slug** `string`

Layout slug. From 1 to 50 characters. Must be unique within the seller (school).

**note** `string`

Layout note. Maximum 255 characters.

**productIds** `integer[]`

Array of IDs of the products the layout is linked to. When passed, it fully replaces the current list of linked products.

**config** `object`

Layout settings.

**config properties**

**resubmitMode** `enum`

Form resubmission mode. Possible values: `Overwrite`, `NewFill`, `NotAllowed`.

```bash cURL theme={null}
curl --location --request PUT 'https://api.exode.biz/saas/v2/form/layout/5/update' \
  --header 'Seller-Id: {{ sellerId }}' \
  --header 'School-Id: {{ schoolId }}' \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_TOKEN' \
  --data-raw '{
    "name": "Updated name",
    "status": "Published",
    "config": {
      "resubmitMode": "NotAllowed"
    }
  }'
```

```javascript Node.js theme={null}
const axios = require('axios');

const updateLayout = async () => {
  const layoutId = 5;

  try {
    const response = await axios.put(`https://api.exode.biz/saas/v2/form/layout/${layoutId}/update`, {
      name: 'Updated name',
      status: 'Published',
      config: {
        resubmitMode: 'NotAllowed'
      }
    }, {
      headers: {
        'Seller-Id': '{{ sellerId }}',
        'School-Id': '{{ schoolId }}',
        'Content-Type': 'application/json',
        'Authorization': 'Bearer YOUR_TOKEN'
      }
    });

    console.log('Layout updated:', response.data.payload);
  } catch (error) {
    console.error('Error:', error.response?.data || error.message);
  }
};

updateLayout();
```

```php PHP theme={null}
<?php

$layoutId = 5;
$url = "https://api.exode.biz/saas/v2/form/layout/{$layoutId}/update";
$data = [
  'name' => 'Updated name',
  'status' => 'Published',
  'config' => [
    'resubmitMode' => 'NotAllowed'
  ]
];

$headers = [
  'Seller-Id: {{ sellerId }}',
  'School-Id: {{ schoolId }}',
  'Content-Type: application/json',
  'Authorization: Bearer YOUR_TOKEN'
];

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT');
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);

if ($httpCode === 200) {
  $result = json_decode($response, true);
  echo "Layout updated successfully\n";
  print_r($result['payload']);
} else {
  echo "Error: HTTP $httpCode\n";
  echo $response;
}
?>
```

```python Python theme={null}
import requests
import json

layout_id = 5
url = f'https://api.exode.biz/saas/v2/form/layout/{layout_id}/update'

data = {
  'name': 'Updated name',
  'status': 'Published',
  'config': {
    'resubmitMode': 'NotAllowed'
  }
}

headers = {
  'Seller-Id': '{{ sellerId }}',
  'School-Id': '{{ schoolId }}',
  'Content-Type': 'application/json',
  'Authorization': 'Bearer YOUR_TOKEN'
}

try:
  response = requests.put(url, json=data, headers=headers)
  response.raise_for_status()

  result = response.json()
  print('Layout updated successfully:')
  print(json.dumps(result['payload'], indent=2, ensure_ascii=False))

except requests.exceptions.RequestException as e:
  print(f'Error: {e}')
  if hasattr(e, 'response') and e.response is not None:
    print(f'Response: {e.response.text}')
```

```bsl 1С theme={null}
Конфигурация = Новый Структура;
Конфигурация.Вставить("resubmitMode", "NotAllowed");

Данные = Новый Структура;
Данные.Вставить("name", "Updated name");
Данные.Вставить("status", "Published");
Данные.Вставить("config", Конфигурация);

// Serialize body to JSON
ЗаписьJSON = Новый ЗаписьJSON;
ЗаписьJSON.УстановитьСтроку();
ЗаписатьJSON(ЗаписьJSON, Данные);
ТелоЗапроса = ЗаписьJSON.Закрыть();

Соединение = Новый HTTPСоединение("api.exode.biz", 443, , , , 30, Новый OpenSSLSecureConnection);

Запрос = Новый HTTPЗапрос("/saas/v2/form/layout/5/update");
Запрос.Заголовки.Вставить("Seller-Id", "{{ sellerId }}");
Запрос.Заголовки.Вставить("School-Id", "{{ schoolId }}");
Запрос.Заголовки.Вставить("Content-Type", "application/json");
Запрос.Заголовки.Вставить("Authorization", "Bearer YOUR_TOKEN");
Запрос.УстановитьТелоИзСтроки(ТелоЗапроса);

Ответ = Соединение.ВызватьHTTPМетод("PUT", Запрос);

Если Ответ.КодСостояния = 200 Тогда
    ЧтениеJSON = Новый ЧтениеJSON;
    ЧтениеJSON.УстановитьСтроку(Ответ.ПолучитьТелоКакСтроку());
    Результат = ПрочитатьJSON(ЧтениеJSON);
    Сообщить("Form updated");
Иначе
    Сообщить("Error: HTTP " + Ответ.КодСостояния);
    Сообщить(Ответ.ПолучитьТелоКакСтроку());
КонецЕсли;
```

```json Success theme={null}
{
  "success": true,
  "code": 200,
  "payload": {
    "id": 5,
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "mode": "Custom",
    "status": "Published",
    "slug": "client-extra",
    "name": "Updated name",
    "note": "Additional fields for CRM",
    "sellerId": 1,
    "createdAt": "2025-03-10T12:00:00.000Z",
    "updatedAt": "2025-03-12T09:15:00.000Z",
    "config": {
      "resubmitMode": "NotAllowed"
    }
  }
}
```

```json Error - Layout Not Found / Not Owned theme={null}
{
  "code": 401,
  "success": false,
  "cause": "Forbidden",
  "message": "Forbidden seller resource - seller not entity owner",
  "error": "Forbidden seller resource - seller not entity owner"
}
```

```json Error - Duplicate Slug theme={null}
{
  "code": 400,
  "success": false,
  "cause": "LayoutWithSlugAlreadyExists",
  "message": "Form layout with slug \"client-extra\" already exists",
  "error": "Form layout with slug \"client-extra\" already exists"
}
```

```json Error - Forbidden theme={null}
{
  "code": 401,
  "success": false,
  "cause": "Forbidden",
  "message": "Forbidden seller resource - permissions FormManage",
  "error": "Forbidden seller resource - permissions FormManage"
}
```

## Permission requirements

> [!TIP]
>
> Updating a form layout requires the service user to have the **"Forms management"** permission (`FormManage`).

> [!TIP]
>
> The layout must belong to the current school (checked automatically).

> [!WARNING]
>
> The service user must be authenticated with a token and have the appropriate access permissions for the specified
> school.

***

*Updated: 2026-09-25 14:33 UTC*


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.