Skip to content

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": {
      "description": "The item's flags, replaced as a whole list (send the ones it keeps). \"mandatory\": must attend. \"admin\": hidden from participants. \"break\": a meal, break, registration, or expo or booth hours, left out of attendees' Wrapped.",
      "maxItems": 20,
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 40
      }
    },
    "raceOptionIds": {
      "maxItems": 50,
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1
      }
    },
    "participationMode": {
      "type": "string",
      "enum": [
        "none",
        "interest",
        "rsvp",
        "registration"
      ]
    },
    "participationSpots": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 1,
          "maximum": 100000
        },
        {
          "type": "null"
        }
      ]
    },
    "participationShowRoster": {
      "type": "boolean"
    },
    "participationRaceOptionId": {
      "type": [
        "string",
        "null"
      ]
    },
    "signupUrl": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2048,
          "format": "uri"
        },
        {
          "type": "null"
        }
      ]
    },
    "routeUrl": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2048,
          "format": "uri"
        },
        {
          "type": "null"
        }
      ],
      "description": "The activity's own route (a group run, a shakeout): an AllTrails trail, Strava route, Ride with GPS route, CalTopo map or GPX file link. Drawn on the app's map with an open-in-provider door. Null removes it."
    },
    "routeMapView": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "provider",
            "ours"
          ]
        },
        {
          "type": "null"
        }
      ],
      "description": "Which map attendees see for the route: \"provider\" (the linked site's own map, e.g. AllTrails) or \"ours\" (Endurance HQ's map with flyover and elevation). Null = automatic: the provider's map when the run's sponsor is that provider, otherwise ours."
    },
    "routeLabel": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 80
        },
        {
          "type": "null"
        }
      ],
      "description": "The route above's name beside the session's other routes, e.g. \"11 mi from Music City Center\". Shown only when routeOptions has routes."
    },
    "routeOptions": {
      "description": "The session's other routes (a group run with a long and a short option), replaced as a whole list: send the ones it keeps, with their ids. The session's own route is the first option.",
      "maxItems": 6,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "description": "An existing option's id; omit for a new one.",
            "type": [
              "string",
              "null"
            ]
          },
          "label": {
            "type": "string",
            "minLength": 1,
            "maxLength": 80
          },
          "startTimeLocal": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}$"
              },
              {
                "type": "null"
              }
            ],
            "description": "Its own start on the session's day; null = the session's start."
          },
          "location": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 200
              },
              {
                "type": "null"
              }
            ],
            "description": "Its own meeting point; null = the session's location."
          },
          "routeUrl": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2048,
                "format": "uri"
              },
              {
                "type": "null"
              }
            ]
          },
          "routeMapView": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "provider",
                  "ours"
                ]
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "label"
        ],
        "additionalProperties": false
      }
    },
    "carpool": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "label": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 40
                },
                {
                  "type": "null"
                }
              ],
              "description": "The Carpool tab's name, e.g. \"Saturday run\". Empty uses the session's title."
            }
          },
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ],
      "description": "Offer carpool to this session (a group run that meets away from the venue): attendees get a Carpool tab for it beside getting in and heading out, and a Carpool chip on its card. Null stops offering it."
    }
  },
  "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"
            }
          ]
        },
        "routeUrl": {
          "anyOf": [
            {
              "type": "string",
              "format": "uri"
            },
            {
              "type": "null"
            }
          ]
        },
        "routeMapView": {
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "provider",
                "ours"
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "routeLabel": {
          "type": [
            "string",
            "null"
          ]
        },
        "routeOptions": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "label": {
                "type": "string"
              },
              "startTimeLocal": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "location": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "routeUrl": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uri"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "routeMapView": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "provider",
                      "ours"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "id",
              "label",
              "startTimeLocal",
              "location",
              "routeUrl",
              "routeMapView"
            ],
            "additionalProperties": false
          }
        },
        "carpool": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "label": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "label"
              ],
              "additionalProperties": false
            },
            {
              "type": "null"
            }
          ]
        },
        "goingCount": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "attendedCount": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "participationMode": {
          "type": "string",
          "enum": [
            "none",
            "interest",
            "rsvp",
            "registration"
          ]
        },
        "participationSpots": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            {
              "type": "null"
            }
          ]
        },
        "participationShowRoster": {
          "type": "boolean"
        },
        "participationRaceOptionId": {
          "type": [
            "string",
            "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",
        "routeUrl",
        "routeMapView",
        "routeLabel",
        "routeOptions",
        "carpool",
        "goingCount",
        "attendedCount",
        "participationMode",
        "participationSpots",
        "participationShowRoster",
        "participationRaceOptionId",
        "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