Schedule

Update a schedule item

Update an authorized event schedule item. Times use YYYY-MM-DDTHH:mm:ss in the event's local wall clock. Send an Idempotency-Key header.

Method

PATCH

Path

/v1/schedule-items/{scheduleItemId}

Required scope

schedule:write

Request

curl -X PATCH "https://api.endurancehq.app/v1/schedule-items/{scheduleItemId}" \
  -H "Authorization: Bearer $EHQ_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"

Path parameters

scheduleItemIdstring, required

JSON body schema

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "title": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200
    },
    "description": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 5000
        },
        {
          "type": "null"
        }
      ]
    },
    "startTimeLocal": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}$"
    },
    "endTimeLocal": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}$"
        },
        {
          "type": "null"
        }
      ]
    },
    "timezone": {
      "anyOf": [
        {
          "type": "string",
          "minLength": 1,
          "maxLength": 100
        },
        {
          "type": "null"
        }
      ]
    },
    "location": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 500
        },
        {
          "type": "null"
        }
      ]
    },
    "address": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 1000
        },
        {
          "type": "null"
        }
      ]
    },
    "category": {
      "type": "string",
      "enum": [
        "pre_race",
        "race",
        "post_race",
        "other"
      ]
    },
    "allDay": {
      "type": "boolean"
    },
    "pinScope": {
      "type": "string",
      "enum": [
        "none",
        "day",
        "all_days"
      ]
    },
    "featured": {
      "type": "boolean"
    },
    "audienceTags": {
      "maxItems": 20,
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 40
      }
    },
    "raceOptionIds": {
      "maxItems": 50,
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1
      }
    },
    "signupUrl": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2048,
          "format": "uri"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "additionalProperties": false
}

Response

Success status: 200

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "eventId": {
          "type": "string"
        },
        "eventTitle": {
          "type": "string"
        },
        "title": {
          "type": "string"
        },
        "description": {
          "type": [
            "string",
            "null"
          ]
        },
        "startTimeLocal": {
          "type": "string",
          "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}$"
        },
        "endTimeLocal": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}$"
            },
            {
              "type": "null"
            }
          ]
        },
        "timezone": {
          "type": "string"
        },
        "location": {
          "type": [
            "string",
            "null"
          ]
        },
        "address": {
          "type": [
            "string",
            "null"
          ]
        },
        "category": {
          "type": "string",
          "enum": [
            "pre_race",
            "race",
            "post_race",
            "other"
          ]
        },
        "allDay": {
          "type": "boolean"
        },
        "pinScope": {
          "type": "string",
          "enum": [
            "none",
            "day",
            "all_days"
          ]
        },
        "featured": {
          "type": "boolean"
        },
        "audienceTags": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "raceOptionIds": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "order": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        "signupUrl": {
          "anyOf": [
            {
              "type": "string",
              "format": "uri"
            },
            {
              "type": "null"
            }
          ]
        },
        "createdAt": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        }
      },
      "required": [
        "id",
        "eventId",
        "eventTitle",
        "title",
        "description",
        "startTimeLocal",
        "endTimeLocal",
        "timezone",
        "location",
        "address",
        "category",
        "allDay",
        "pinScope",
        "featured",
        "audienceTags",
        "raceOptionIds",
        "order",
        "signupUrl",
        "createdAt",
        "updatedAt"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "data"
  ],
  "additionalProperties": false
}

Other surfaces

CLI: ehq schedule update <schedule_item_id> --start-time <YYYY-MM-DDTHH:mm:ss>

MCP tool: ehq_schedule_items_update