---
title: "Apply"
method: POST
path: "/admin/crm/maintenance-optout-migrations/apply"
tags: ["admin", "crm"]
---

# Apply

`POST /admin/crm/maintenance-optout-migrations/apply`

## Request

- Base URL: `https://api-docs.upsmith.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api-docs.upsmith.com/admin/crm/maintenance-optout-migrations/apply`
- Auth: one of:
  - API key in header `x-api-key`
  - HTTP bearer

## Headers

- `organization-id` string, nullable
- `timezone` string
- `x-user-id` string, nullable
- `x-actor-email` string, nullable
- `x-request-source` string, nullable
- `x-operation-id` string, nullable
- `x-commit-message` string, nullable
- `x-confirmation-id` string, nullable
- `x-chat-id` string, nullable

## Request body

- ApplyMaintenanceOptoutMigrationRequest
  - `organization_id` string, required
  - `entries` MaintenanceOptoutMigrationEntry[], required
    - `source_request_id` string, required
    - `maintenance_type_id` string, nullable
    - `maintenance_type_ids` string[]
    - `evidence_event_ids` string[]
    - `evidence_notes` MaintenanceOptoutNoteEvidence[]
      - `kind` 'customer_note' | 'location_note', required
      - `id` integer, required
    - `expiry_mode` 'preserve' | 'until_lifted' | 'until_date'
    - `expires_at` string, date-time, nullable
    - `review_reason` string, required
  - `review_sha256` string, required

## Response `200`

Successful Response

- AppliedMaintenanceOptoutMigration
  - `organization_id` string, required
  - `review_sha256` string, required
  - `already_applied` boolean, required
  - `items` MaintenanceOptoutMigrationResult[], required
    - `source_request_id` string, required
    - `replacement_request_id` string, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/upsmith/apis/upsmith-api.md) - [All operations](https://skmtc.dev/upsmith/apis/upsmith-api/llms.txt) - [OpenAPI document](https://skmtc.dev/upsmith/apis/upsmith-api/revisions/cce8b07a5787?raw)
