Skip to content

Create a schedule

Create a new schedule. Tier limits are enforced server-side.

Endpoint

POST /wp-json/nereida-imgrot/v1/schedules

Headers

Authorization: Bearer your-api-key-here
Content-Type: application/json
Accept: application/json

Body

{
  "name":             "Lobby status",
  "endpoint_path":    "image-rotate",
  "endpoint_file":    "status.jpg",
  "default_image_id": 4521,
  "blocks": [
    { "days": [1,2,3,4,5], "start": "08:00", "end": "17:00", "image_id": 4522 },
    { "days": [1,2,3,4,5], "start": "17:00", "end": "08:00", "image_id": 4523 }
  ]
}

Response (201 Created)

{
  "schedule": {
    "id":  "sched_xyz789",
    "url": "https://yoursite.com/image-rotate/status.jpg",
    "...": "..."
  }
}

Errors

  • 400 — invalid body (missing fields, malformed time, image ID does not resolve to a media library item).
  • 409 — a schedule with the same endpoint_path + endpoint_file already exists.
  • 422 — would exceed your tier's schedule limit (5 for Business, 36 for Enterprise) or images-per-schedule limit.