--- title: maintenance.createPlan | Doing Work API description: Start a maintenance plan for a job's customer (owner or office). AI can draft the priced lines for one term; the owner approves them before the plan is sent. url: https://doingwork.work/docs/reference/maintenance-createplan/ --- # maintenance.createPlan Start a maintenance plan for a job's customer (owner or office). AI can draft the priced lines for one term; the owner approves them before the plan is sent. The first term's invoice is created now (and sent if send_first is true). When a term ends, the next term's invoice is created automatically and sent if auto_send is on. With visits_per_term, each term also gets that many service due dates (see services.listDue), so the shop knows when each covered visit is due; schedule the actual visit with visits.create as usual. | | | |---|---| | Who | Agents can call this | | REST | `POST /v1/maintenance-plans` | | MCP tool | `maintenance_createPlan` | | Writes | yes, send an Idempotency-Key | | Area | [Scheduling and visits](https://doingwork.work/docs/reference/#scheduling-and-visits) | ## When to use it Start a maintenance plan for a job's customer (owner or office). AI can draft the priced lines for one term; the owner approves them before the plan is sent. ## What to tell the owner Say what you did in plain words and what happens next. ## Input | Field | Type | Required | |---|---|---| | `job_id` | string (uuid) | yes | | `name` | string | yes | | `term_months` | integer | yes | | `starts_on` | string | no | | `lines` | array | yes | | `lines[].description` | string | yes | | `lines[].quantity` | number | yes | | `lines[].unit_price_minor` | integer | yes | | `lines[].kind` | string (one of item, fee, discount) | no | | `lines[].taxable` | boolean | no | | `tax_rate_id` | ['string', 'null', ' ', '(', 'u', 'u', 'i', 'd', ')'] | no | | `auto_send` | boolean | no | | `send_first` | boolean | no | | `visits_per_term` | integer | no | | `visit_title` | string | no | ## Example ```http POST https://doingwork.work/v1/maintenance-plans content-type: application/json Idempotency-Key: 3f1c... { "job_id": "00000000-0000-4000-8000-000000000000", "name": "Ruiz Plumbing", "term_months": 1, "lines": [ { "description": "40 gallon gas heater, installed", "quantity": "...", "unit_price_minor": 50000 } ] } ``` ## Output JSON. The response shape isn't published yet; read the fields you need and ignore the rest. Errors are `{code, message, status}`. ## Errors | Code | Status | What to do | |---|---|---| | `invalid_input`, `invalid_token`, `rate_limited` | | Can happen on any call. See [errors](https://doingwork.work/docs/errors/). |