# Update an inspection plan (/docs/api-reference/quality/QualityController_updatePlan)

`PATCH /api/factories/{factoryId}/quality/plans/{id}`

Base URL: https://api.xentr.ai

Authentication: bearer token (`Authorization: Bearer <token>`).

## Parameters

| Name | In | Required | Type | Description |
| --- | --- | --- | --- | --- |
| `factoryId` | path | yes | string | Factory ID |
| `id` | path | yes | string | Plan ID |

## Request body

Required.

Content type: `application/json`

```json
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Plan name.",
      "example": "First-article dimensional check v2"
    },
    "inspectionType": {
      "type": "string",
      "description": "Inspection type.",
      "enum": [
        "first_article",
        "in_process",
        "final",
        "incoming"
      ],
      "example": "final"
    },
    "characteristics": {
      "description": "Updated characteristics array.",
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "sampleSize": {
      "type": "number",
      "description": "Sample size.",
      "example": 10
    },
    "frequency": {
      "type": "string",
      "description": "Frequency.",
      "example": "hourly"
    },
    "isActive": {
      "type": "boolean",
      "description": "Active flag.",
      "example": true
    }
  }
}
```

## Responses

### 200