# Change a form

Any subset of a form's `name`, `description`, `fields`, `sections`, `settings` and `targetDefinitionKey`. Fields, sections and settings REPLACE, whole — send the complete list, not just the line you changed. The SLUG is deliberately not patchable: it is the published address, and changing it would break every link already handed out.

Access class: `workspace`.

## Endpoint

`PATCH /v1/forms/{id}`

## Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| id | path | string | Yes |

## Request body

Content type: `application/json`.

```json
{
  "body": {
    "description": "string",
    "fields": [
      {
        "column": "string",
        "documentType": "string",
        "id": "",
        "kind": "string",
        "label": "string",
        "placeholder": "string",
        "required": true
      }
    ],
    "name": "string",
    "sections": [
      {
        "fieldIds": [
          "string"
        ],
        "title": "string"
      }
    ],
    "settings": "string",
    "targetDefinitionKey": "string"
  },
  "params": {
    ":id": "string"
  },
  "query": {}
}
```

## Responses

### 200

the action's answer

Content type: `application/json`.

```json
{
  "data": {
    "createdAt": "string",
    "createdBy": "string",
    "description": "string",
    "fields": [
      {
        "column": "string",
        "documentType": "string",
        "entityType": "string",
        "id": "",
        "kind": "string",
        "label": "string",
        "options": "string",
        "placeholder": "string",
        "required": "string"
      }
    ],
    "id": "",
    "name": "string",
    "publishedAt": "string",
    "sections": [
      {
        "fieldIds": "string",
        "title": "string"
      }
    ],
    "settings": {
      "analytics": true,
      "automations": [
        "string"
      ],
      "branding": "string",
      "pacing": "string",
      "postSubmit": "string",
      "saveDrafts": true,
      "signature": "string",
      "theme": "string"
    },
    "slug": "string",
    "sourceUrl": "string",
    "stats": {
      "submissions": 1,
      "views": 1
    },
    "status": "string",
    "targetDefinitionKey": "string",
    "updatedAt": "string"
  }
}
```

### default

a refusal: `{"error": "<what a person needs to read>"}`. 401 no credential, 402 the plan does not include this, 403 the seat does not, 404 the thing does not exist or is not yours to see.

Content type: `application/json`.

```json
{
  "error": "string"
}
```
