Skip to main content
POST
/
schedules
curl
curl --request POST \
  --url 'https://api.amps.ai/schedules' \
  --header 'x-api-key: amps_sk_test_xxxxxxxxxxxxxxxxxxxxxxxx' \
  --header 'content-type: application/json' \
  --data '{
    "deviceId": "dev_abc123",
    "timezone": "Europe/London",
    "recurrence": {
      "rule": "daily"
    },
    "slots": [
      {
        "time": "00:30",
        "duration": "PT5H",
        "action": {
          "command": "charge",
          "parameters": {
            "target": {
              "value": 100,
              "unit": "percent"
            }
          }
        }
      }
    ]
  }'
{
  "id": "sched_abc123",
  "deviceId": "dev_abc123",
  "state": "pending",
  "timezone": "Europe/London",
  "recurrence": {
    "rule": "daily"
  },
  "slots": [
    {
      "time": "00:30",
      "duration": "PT5H",
      "action": {
        "command": "charge",
        "parameters": {
          "target": {
            "value": 100,
            "unit": "percent"
          }
        }
      }
    }
  ],
  "createdAt": "2026-04-29T12:00:00.000Z",
  "nextFireAt": "2026-04-30T00:30:00.000Z"
}

Documentation Index

Fetch the complete documentation index at: https://docs.amps.ai/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

x-api-key
string
header
required

Body

application/json

A schedule body: deviceId, optional timezone (required for time-variant slots), optional recurrence, and a non-empty slots array. Slots carry the action template the platform materialises on each fire.

The body is of type string.

Response

Schedule created.