# Create Schedule

### Create Schedule with empty rotation

```
mutation {
  createSchedule(input:{
    teamID:"6129ac15518568defa92794c",
    name:"Product Schedule",
    timeZone:"Asia/kolkata",
    rotations:[],
    owner:{
      type:team,
      ID:"6129ac15518568defa92794c"
    }
  }){
    ID,
    name,
    rotations{
      ID,
      name
    },
    timeZone
  }
}
```

**Response:**

```
{
  "data": {
    "createSchedule": {
      "ID": 001,
      "name": "Product Schedule",
      "rotations": [],
      "timeZone": "Asia/kolkata"
    }
  }
}
```

### **Create Schedule with Rotation and without Participants Group**

```
mutation {
  createSchedule(input:{
    teamID:"6129ac15518568defa92794c",
    name:"Product Schedule",
    timeZone:"Asia/kolkata",
    rotations:[{
    name:"new daily 24x7",
    participantGroups:[{
      participants:[{
        type:"user",
        ID:"60f12dd3814bef0008c4036e"
      }]
    }],
    startDate:"2023-05-09T00:00:00Z",
    shiftTimeSlot:{
      startHour:1,
      startMin:0,
      duration:1440
    }
    period:daily,
    changeParticipantsFrequency:1,
    changeParticipantsUnit:day
  }],
    owner:{
      type:team,
      ID:"6129ac15518568defa92794c"
    }
  }){
    ID,
    name,
    rotations{
      ID,
      name,
      startDate,
      period,
      changeParticipantsUnit,
      changeParticipantsFrequency
    },
    timeZone
  }
}
```

**Response:**

```
{
        "ID": 12937,
        "name": "Product Schedule",
        "rotations": [
          {
            "ID": 18134,
            "name": "new daily 24x7",
            "startDate": "2023-05-10T00:00:00Z",
            "period": "daily",
            "changeParticipantsUnit": "day",
            "changeParticipantsFrequency": 1
          }
        ],
        "timeZone": "Asia/kolkata"
      }
```

### **Create Schedule with Rotation and Participants Group**

```
mutation {
  createSchedule(input:{
    teamID:"6129ac15518568defa92794b",
    name:"Product Schedule",
    timeZone:"Asia/kolkata",
    rotations:[{
      name:"Daily 24x7",
      startDate:"2023-05-09T00:00:00Z",
      period:daily,
      changeParticipantsFrequency:1,
      changeParticipantsUnit:day,
      participantGroups:[{
        participants:[{
          type:"user",
          ID:"60f12dd3814bef0008c4036e"
        }]
      },
      {participants:[{
        type:"user",
	ID:"60f12dd3814bef0008c4036e"
      }]}]
    }],
    owner:{
      type:team,
      ID:"6129ac15518568defa92794b"
    }
  }){
    ID,
    name,
    rotations{
      ID,
      name,
      startDate,
      period,
      changeParticipantsUnit,
      changeParticipantsFrequency,
      participantGroups{
        participants{
          type:
          ID
        }
    }
    },
    timeZone
  }
}
```

#### Response:

```
{
        "ID": 12937,
        "name": "Product Schedule",
        "rotations": [
          {
            "ID": 18134,
            "name": "new daily 24x7",
            "startDate": "2023-05-10T00:00:00Z",
            "period": "daily",
            "changeParticipantsUnit": "day",
            "changeParticipantsFrequency": 1,
            "participantGroups": [
              {
                "participants": [
                  {
                    "type": "60f12dd3814bef0008c4036e"
                  }
                ]
              }
            ]
          }
        ],
        "timeZone": "Asia/kolkata"
      }
```

*Have any questions?* [*Ask the community*](https://community.squadcast.com/view/home)*.*


---

# 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://support.incidents.cloud.solarwinds.com/terraform-and-api-documentation/getting-started-with-squadcast-graphql/schedules/create-schedule.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.
