# ModifyManagedServicesPlan Method

## Description

Updates an existing Managed Services Plan.

## HTTP Request

`PUT https://api.skeddly.com/api/ManagedServices/Plans/<id>`

## URL Parameters

### Id

ID of the plan.

Type: `string`

Required: Yes

## Body

The body is a JSON structure with the following properties.

### isEnabled

Indicates whether the plan is enabled.

Type: `bool`

Required: No

Default Value: `false`

### name

Friendly name for the plan.

Type: `string`

Required: Yes

### parameters

Additional parameters for the plan. The object value is dependent on the value of `planType`.

Type: [ManagedServicesPlanParameters](/data-types/managedservicesplanparameters-object.md) object.

Required: Yes

### schedule

Indicates the schedule for the plan

Type: [ManagedServicesPlanSchedule](/data-types/managedservicesplanschedule-object.md) object.

Required: Yes

## Returns

A [ManagedServicesPlan](/data-types/managedservicesplan-object.md) object.

## Sample Request

{% tabs %}
{% tab title="HTTP" %}

```http
PUT /api/ManagedServices/Plans/plan-00000001 HTTP/1.1
Host: api.skeddly.com
Authorization: AccessKey <api key>
Content-Type: application/json

{
    "name": "Start Development Environment",
    "isEnabled": true,
    
    "schedule": {
        "scheduleType": "daily",
        "timeOfDay": "08:00:00",
        "timeZoneId": "Eastern Standard Time",
        "parameters": {
            "days": [
                "monday",
                "tuesday",
                "wednesday",
                "thursday",
                "friday"
            ]
        }
    },
    
    "parameters": {
        "startStopMode": "start-stop-combined",
        "stopTimeInSeconds": 43200
    }
}
```

{% endtab %}

{% tab title="Bash" %}

```bash
curl -X PUT "https://api.skeddly.com/api/ManagedServices/Plans/plan-00000001" \
  -H "Authorization: AccessKey <api key>" \
  -d name="Start Development Environment" \
  -d isEnabled=true \
  -d schedule.scheduleType=daily \
  -d schedule.timeOfDay="08:00:00" \
  -d schedule.timeZoneId="Eastern Standard Time" \
  -d schedule.parameters.days[0]=monday \
  -d schedule.parameters.days[1]=tuesday \
  -d schedule.parameters.days[2]=wednesday \
  -d schedule.parameters.days[3]=thursday \
  -d schedule.parameters.days[4]=friday \
  -d parameters.startStopMode=start-stop-combined \
  -d parameters.stopTimeInSeconds=43200
```

{% endtab %}
{% endtabs %}

## Sample Response

```javascript
{
    "planId": "plan-00000001",
    "projectId": "proj-00000001",
    "planType": "start-stop-plan",
    "name": "Start Development Environment",
    
    "state": "active",
    "isEnabled": true,
    "isDeleted": false,
    
    "createdDate": "2023-02-13T00:00:00Z",
    "lastModifiedDate": "2023-02-14T00:00:00Z",
    "lastModifiedBy": "u-00000001",
    
    "schedule": {
        "scheduleType": "daily",
        "timeOfDay": "08:00:00",
        "timeZoneId": "Eastern Standard Time",
        "parameters": {
            "days": [
                "monday",
                "tuesday",
                "wednesday",
                "thursday",
                "friday"
            ]
        }
    },
    
    "parameters": {
        "startStopMode": "start-stop-combined",
        "stopTimeInSeconds": 43200
    }
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.skeddly.com/resources/managed-services/modifymanagedservicesplan-method.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
