---
updatedAt: 2026-05-30T03:15:38.000Z
agentTools:
  projectIndex: https://docs.frisbii.com/llms.txt
---

# Update dunning plan

Update dunning plan. If currently default plan is made non-default, the oldest plan will be made new default.

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "API",
    "description": "REST API to manage Frisbii resources",
    "contact": {
      "email": "support@frisbii.com"
    },
    "version": "1"
  },
  "servers": [
    {
      "url": "https://api.frisbii.com"
    }
  ],
  "paths": {
    "/v1/dunning_plan/{handle}": {
      "put": {
        "tags": [
          "dunning plan"
        ],
        "summary": "Update dunning plan",
        "operationId": "updateJson",
        "parameters": [
          {
            "name": "handle",
            "in": "path",
            "description": "Dunning plan handle",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateDunningPlan"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DunningPlan"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request, see error codes at https://api.frisbii.com/v1/error_codes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "None or invalid credentials provided in access to secured resource",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Not authorized to perform resource operation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource or referenced resource not found, see error codes at https://api.frisbii.com/v1/error_codes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Request limiting exceeded, request rate or concurrent requests, see error code 122 and 123",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal service error, error is reported automatically to Frisbii",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "basicAuth": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "ErrorResponse": {
        "required": [
          "code",
          "error",
          "http_reason",
          "http_status",
          "path",
          "request_id",
          "timestamp"
        ],
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "description": "Frisbii API [error codes](https://api.frisbii.com/v1/error_codes)",
            "format": "int32",
            "example": 12
          },
          "error": {
            "type": "string",
            "description": "Short error message",
            "example": "Subscription not found"
          },
          "message": {
            "type": "string",
            "description": "Optional clarifying error message"
          },
          "path": {
            "type": "string",
            "description": "The path generating the error response",
            "example": "/v1/subscription/sub0019"
          },
          "timestamp": {
            "type": "string",
            "description": "Timestamp for the error response in ISO-8601 extended offset date-time format",
            "format": "date-time"
          },
          "http_status": {
            "type": "integer",
            "description": "HTTP status code of the error",
            "format": "int32",
            "example": 404
          },
          "http_reason": {
            "type": "string",
            "description": "HTTP reason of the error",
            "example": "Not Found"
          },
          "request_id": {
            "type": "string",
            "description": "Request-Id for the failed request",
            "example": "f1988fc2374b4a26a51ebd876b478428"
          },
          "transaction_error": {
            "type": "string",
            "description": "Optional transaction error in the case the request involved a transaction processing. See [transaction errors](https://docs.frisbii.com/reference/transaction_errors).",
            "example": "credit_card_expired"
          }
        },
        "description": "Generic error response"
      },
      "DunningPlan": {
        "required": [
          "created",
          "default_plan",
          "final_subscription_action",
          "handle",
          "name",
          "schedule",
          "state"
        ],
        "type": "object",
        "properties": {
          "name": {
            "minLength": 1,
            "type": "string",
            "description": "Dunning plan name",
            "example": "Short interval"
          },
          "schedule": {
            "type": "array",
            "description": "The schedule as list of intervals in days",
            "items": {
              "type": "integer",
              "description": "The schedule as list of intervals in days",
              "format": "int32"
            }
          },
          "handle": {
            "minLength": 1,
            "pattern": "^[a-zA-Z0-9_\\.\\-@]*$",
            "type": "string",
            "description": "Per account unique handle for the dunning plan. Max length 255 with allowable characters [a-zA-Z0-9_.-@].",
            "example": "dp0012"
          },
          "state": {
            "minLength": 1,
            "type": "string",
            "description": "State of dunning plan, one of the following: `active`, `deleted`.",
            "example": "active",
            "enum": [
              "active",
              "deleted"
            ]
          },
          "created": {
            "type": "string",
            "description": "Date when the dunning plan was created. In [ISO-8601](http://en.wikipedia.org/wiki/ISO_8601) extended offset date-time format.",
            "format": "date-time",
            "example": "2015-04-04T12:40:56.656Z"
          },
          "default_plan": {
            "type": "boolean",
            "description": "If this is default plan",
            "example": true
          },
          "final_subscription_action": {
            "type": "string",
            "description": "Action to take for subscription if dunning fails, one of the following: `expire`, `on_hold`, `none`",
            "example": "expire",
            "enum": [
              "expire",
              "on_hold",
              "none"
            ]
          },
          "grace_period": {
            "type": "string",
            "description": "Optional grace period before starting dunning process. Also see `no_grace_hard_decline`. If eligible re-trying will be attempted in the grace period. The period is defined as an ISO-8601 duration. See https://en.wikipedia.org/wiki/ISO_8601#Durations",
            "example": "P3D"
          },
          "no_grace_hard_decline": {
            "type": "boolean",
            "description": "If a grace period has been defined, this parameter can be used to control whether the grace period is only for soft failing invoices. That is, the used payment method is actually eligible for retrying. Default is true.",
            "example": true
          }
        }
      },
      "UpdateDunningPlan": {
        "required": [
          "default_plan",
          "final_subscription_action",
          "name",
          "schedule"
        ],
        "type": "object",
        "properties": {
          "name": {
            "minLength": 1,
            "type": "string",
            "description": "Dunning plan name",
            "example": "Short interval"
          },
          "schedule": {
            "type": "array",
            "description": "The schedule as list of intervals in days",
            "items": {
              "type": "integer",
              "description": "The schedule as list of intervals in days",
              "format": "int32"
            }
          },
          "default_plan": {
            "type": "boolean",
            "description": "If this is default plan",
            "example": true
          },
          "final_subscription_action": {
            "type": "string",
            "description": "Action to take for subscription if dunning fails, one of the following: `expire`, `on_hold`, `none`",
            "example": "expire",
            "enum": [
              "expire",
              "on_hold",
              "none"
            ]
          },
          "grace_period": {
            "type": "string",
            "description": "Optional grace period before starting dunning process. Also see `no_grace_hard_decline`. If eligible re-trying will be attempted in the grace period. The period is defined as an ISO-8601 duration. See https://en.wikipedia.org/wiki/ISO_8601#Durations",
            "example": "P3D"
          },
          "no_grace_hard_decline": {
            "type": "boolean",
            "description": "If a grace period has been defined, this parameter can be used to control whether the grace period is only for soft failing invoices. That is, the used payment method is actually eligible for retrying. Default is true.",
            "example": true
          }
        }
      }
    },
    "securitySchemes": {
      "basicAuth": {
        "type": "http",
        "scheme": "basic"
      }
    }
  }
}
```