# Update a form

**Publié le** : 2026-05-08
**Catégorie** : Forms & Reviews

## `PUT /forms/:id`

**Update a form**

Updates a form's schema, settings, or status. Existing submissions
are preserved even if the schema changes.

Required permissions: `forms.update`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | Yes | Unique identifier |


### Request Body

Content-Type: `application/json`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | string | No | Display name. 1-255 characters |
| `slug` | string | No | URL-friendly identifier, unique per site and locale. 1-255 characters |
| `description` | string | No | Description text. Max 1000 characters |
| `schema` | object | No | Field schema definition |
| `settings` | object | No | Configuration settings |
| `notifications` | object | No | Notification preferences |
| `honeypotEnabled` | boolean | No | Boolean |
| `recaptchaEnabled` | boolean | No | Boolean |
| `recaptchaSiteKey` | string | No | Max 255 characters |
| `recaptchaSecretKey` | string | No | Max 255 characters |
| `status` | "draft" \| "active" \| "closed" \| "archived" | No | One of: draft, active, closed, archived |


### Responses

| Status | Description |
| --- | --- |
| `200` | Successful response |
| `401` | Unauthorized — invalid or missing API token |
| `403` | Forbidden — insufficient permissions |
| `404` | Not found |
| `422` | Validation error |


### Examples

```bash
curl -X PUT https://api.lynkow.com/v1/forms/1 \
  -H "Authorization: Bearer $API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Contact Form v2",
    "status": "active",
    "successMessage": "We will get back to you within 24h."
  }'
```

### Response Example

```json
{
  "data": {
    "id": 1,
    "name": "Contact Form v2",
    "slug": "contact-form",
    "status": "active",
    "locale": "en",
    "submissionCount": 134,
    "schema": [
      {
        "name": "name",
        "type": "text",
        "label": "Full Name",
        "required": true
      },
      {
        "name": "email",
        "type": "email",
        "label": "Email",
        "required": true
      },
      {
        "name": "message",
        "type": "textarea",
        "label": "Message",
        "required": true
      }
    ],
    "successMessage": "We will get back to you within 24h.",
    "redirectUrl": null,
    "createdAt": "2025-01-05T10:00:00.000Z",
    "updatedAt": "2025-04-06T12:00:00.000Z"
  }
}
```

---