# Plan

> The result of a dry run or guv plan.

The result of a dry run or `guv plan`. `plan_hash` is a SHA-256 over the canonical changes and the live state version; `apply` must present the same hash.

## Fields

| Field | Type | Description |
| --- | --- | --- |
| `plan_hash` * | string |  |
| `dry_run` * | boolean |  |
| `summary` | string |  |
| `changes` * | array of [PlanChange](/docs/api/objects/plan-change/) |  |
| `cost` * | [CostDelta](/docs/api/objects/cost-delta/) |  |
| `policy` * | [PolicyDecision](/docs/api/objects/policy-decision/) |  |
| `warnings` | array of [PlanWarning](/docs/api/objects/plan-warning/) |  |
| `layout` | [PlanLayout](/docs/api/objects/plan-layout/) | Presentation-only layout; it never deploys and costs nothing. |
| `requires_approval` | boolean |  |
| `expires_at` | string (date-time) | The plan hash is accepted until this time. |

\* always present

## Example

```json
{
  "plan_hash": "sha256:9f2c1e0b7a4d3c2b1a09f8e7d6c5b4a39281706f5e4d3c2b1a0f9e8d7c6b5a49",
  "dry_run": true,
  "summary": "1 to update. +£5.00/month at current usage.",
  "changes": [
    {
      "action": "update",
      "resource": {
        "type": "service",
        "id": "svc_01jbx2m9k7q4r8t5v6w3y0z1sv",
        "name": "web"
      },
      "environment": "production",
      "summary": "Raise web memory limit from 1 GB to 2 GB",
      "diff": [
        {
          "path": "/resources/memory_mb",
          "before": 1024,
          "after": 2048
        }
      ],
      "destructive": false,
      "requires_approval": true,
      "reason": "production requires approval for changes made by agents"
    }
  ],
  "cost": {
    "current_monthly": {
      "amount": "18.20",
      "currency": "GBP",
      "display": "£18.20"
    },
    "projected_monthly": {
      "amount": "23.20",
      "currency": "GBP",
      "display": "£23.20"
    },
    "delta_monthly": {
      "amount": "5.00",
      "currency": "GBP",
      "display": "£5.00"
    },
    "confidence": "medium"
  },
  "policy": {
    "decision": "approval_required",
    "reasons": [
      {
        "code": "environment_protected",
        "message": "production requires approval for changes made by agents",
        "policy": "guv.environment.protection"
      }
    ],
    "approver_roles": [
      "owner",
      "admin"
    ]
  },
  "requires_approval": true,
  "expires_at": "2026-10-23T15:00:00Z"
}
```

## Used by

- [Sign out a session](/docs/api/me/#sign-out-a-session)
- [Remove a passkey](/docs/api/me/#remove-a-passkey)
- [Create a personal access token](/docs/api/me/#create-a-personal-access-token)
- [Revoke a personal access token](/docs/api/me/#revoke-a-personal-access-token)
- [Create a workspace](/docs/api/workspaces/#create-a-workspace)
- [Close a workspace](/docs/api/workspaces/#close-a-workspace)
- [Invite a member](/docs/api/members/#invite-a-member)
- [Remove a member or cancel an invitation](/docs/api/members/#remove-a-member-or-cancel-an-invitation)
- [Create an agent token](/docs/api/agent-tokens/#create-an-agent-token)
- [Revoke an agent token](/docs/api/agent-tokens/#revoke-an-agent-token)
- [Create a project](/docs/api/projects/#create-a-project)
- [Delete a project](/docs/api/projects/#delete-a-project)
- [Create an environment](/docs/api/environments/#create-an-environment)
- [Delete an environment](/docs/api/environments/#delete-an-environment)
- [Create a service](/docs/api/services/#create-a-service)
- [Delete a service from every environment](/docs/api/services/#delete-a-service-from-every-environment)
- [Restart the running deployment](/docs/api/services/#restart-the-running-deployment)
- [Deploy](/docs/api/deployments/#deploy)
- [Roll back to this deployment](/docs/api/deployments/#roll-back-to-this-deployment)
- [Unset a plain variable](/docs/api/variables/#unset-a-plain-variable)
- [Unset a secret](/docs/api/secrets/#unset-a-secret)
- [Add a custom domain](/docs/api/domains/#add-a-custom-domain)
- [Remove a domain](/docs/api/domains/#remove-a-domain)
- [Create a database](/docs/api/databases/#create-a-database)
- [Change plan, storage, extensions, masking or access](/docs/api/databases/#change-plan-storage-extensions-masking-or-access)
- [Delete a database (7-day soft delete)](/docs/api/databases/#delete-a-database-7-day-soft-delete)
- [Cancel a pending deletion](/docs/api/databases/#cancel-a-pending-deletion)
- [Rotate credentials (rolling, dual-password window)](/docs/api/databases/#rotate-credentials-rolling-dual-password-window)
- [Branch a database (copy-on-write clone, masked)](/docs/api/databases/#branch-a-database-copy-on-write-clone-masked)
- [Delete a branch](/docs/api/databases/#delete-a-branch)
- [Take a backup now](/docs/api/databases/#take-a-backup-now)
- [Restore from a backup or point in time](/docs/api/databases/#restore-from-a-backup-or-point-in-time)
- [Create a volume](/docs/api/volumes/#create-a-volume)
- [Grow, change HA, or attach to a service](/docs/api/volumes/#grow-change-ha-or-attach-to-a-service)
- [Delete a volume (7-day soft delete)](/docs/api/volumes/#delete-a-volume-7-day-soft-delete)
- [Plan guv.yaml against live state](/docs/api/manifest/#plan-guvyaml-against-live-state)
- [Apply a plan](/docs/api/manifest/#apply-a-plan)
- [Create a spend cap](/docs/api/spend/#create-a-spend-cap)
- [Remove a spend cap](/docs/api/spend/#remove-a-spend-cap)
- [Apply a finding's one-click fix (or open an AI fix PR)](/docs/api/safety/#apply-a-findings-one-click-fix-or-open-an-ai-fix-pr)
- [Create a webhook](/docs/api/webhooks/#create-a-webhook)
- [Delete a webhook](/docs/api/webhooks/#delete-a-webhook)
- [Create a project from a template and deploy it](/docs/api/templates/#create-a-project-from-a-template-and-deploy-it)
- [Create an alert rule](/docs/api/alerts/#create-an-alert-rule)
- [Delete an alert rule](/docs/api/alerts/#delete-an-alert-rule)
