> ## Documentation Index
> Fetch the complete documentation index at: https://smartcar.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Charge Schedule

> Sets the charging schedule for a vehicle.

<Snippet file="api-reference/note-bse-tesla.mdx" />

## Permission

`control_charge`

## Request

**Path**

<Snippet file="api-reference/path-bse.mdx" />

**Body**

**type** `string` *required*

The type of schedule you want to set.

**type**

**START\_TIME**

When plugged in, the vehicle will delay starting a charging session until this time in `HH:mm`.

**DEPARTURE\_TIME**

When plugged in, the vehicle may delay starting a charging session as long as it can reach its
[charge limit](https://smartcar.com/docs/api-reference/evs/get-charge-limit.md) by this time in `HH:mm`.

**enable** `boolean` *required*

Enables or disables the specified charging schedule.

**time** `string` *required*

The time for the provided schedule type in HH:mm.

```bash cURL theme={null}
curl "https://api.smartcar.com/v2.0/vehicles/{id}/{make}/charge/schedule" \
-H "Authorization: Bearer {token}" \
-X "POST" \
-H "Content-Type: application/json" \
-d '{"type": "START_TIME", "enable": true, "time": "23:30"}'
```

```python Python theme={null}
chargeSchedule = vehicle.request(
  "POST", 
  "{make}/charge/schedule",
  {"type": "START_TIME", "enable": true, "time": "23:30"}
)
```

```js Node theme={null}
const chargeSchedule = vehicle.request(
  "POST", 
  "{make}/charge/schedule",
  {"type": "START_TIME", "enable": true, "time": "23:30"}
);
```

```java Java theme={null}
SmartcarVehicleRequest request = new SmartcarVehicleRequest.Builder()
      .method("POST")
      .path("{make}/charge/schedule")
      .addBodyParameter("type", "START_TIME")
      .addBodyParameter("enable", "true")
      .addBodyParameter("time", "23:30")
      .build();
ChargeSchedule chargeSchedule = vehicle.request(request);
```

```ruby Ruby theme={null}
chargeSchedule = vehicle.request(
  "POST", 
  "{make}/charge/schedule",
  {"type": "START_TIME", "enable": true, "time": "23:30"}
)
```

## Response

**departureTime** `object`

The departure time configuration for the charging schedule.

**departureTime**

**enabled** `boolean`

Indicates whether this schedule type is enabled or disabled.
Only one of `departureTime` or `departureTime` can be enabled at a time.

**time** `string | null`

When plugged in, the vehicle **may** delay starting a charging session as long as it can reach its
[charge limit](https://smartcar.com/docs/api-reference/evs/get-charge-limit.md) by this time in HH:mm.

**startTime** `object`

The start time configuration for the charging schedule.

**startTime**

**enabled** `boolean`

Indicates whether this schedule type is enabled or disabled.
Only one of `departureTime` or `departureTime` can be enabled at a time.

**time** `string | null`

When plugged in, the vehicle will delay starting a charging session until this time in HH:mm.

```json Example Response theme={null}
{
  "departureTime": {
    "enabled": false,
    "time": null
  },
  "startTime": {
    "enabled": true,
    "time": "18:30"
  }
}
```
