Event Intake

Create a customer draft from a website

Create a draft event in an authorized organization and start a durable website import. Requires an explicit request to start, not just check readiness. Eligible empty drafts initiated by platform admins can be populated automatically; verified official media may also import automatically. Other content remains for review. This does not publish the event.

Method

POST

Path

/v1/events/from-website

Required scope

event-intake:write

Request

curl -X POST "https://api.endurancehq.app/v1/events/from-website" \
  -H "Authorization: Bearer $EHQ_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"

JSON body schema

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "organizationId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 120,
      "description": "Organization that will own the new customer event."
    },
    "url": {
      "type": "string",
      "maxLength": 2000,
      "format": "uri",
      "description": "Official event website URL to import."
    },
    "additionalUrls": {
      "description": "Optional extra public links for the same event, such as its registration page on UltraSignup or RunSignup or a race guide. They are read in the same import and merged into one review.",
      "maxItems": 4,
      "type": "array",
      "items": {
        "type": "string",
        "maxLength": 2000,
        "format": "uri"
      }
    },
    "title": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200
    },
    "eventDate": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "location": {
      "type": "string",
      "minLength": 1,
      "maxLength": 300
    },
    "eventMode": {
      "type": "string",
      "enum": [
        "race",
        "conference",
        "operations"
      ]
    },
    "eventDiscipline": {
      "type": "string",
      "enum": [
        "running",
        "cycling",
        "paddling",
        "walking",
        "multisport",
        "other"
      ]
    },
    "participantSupportMode": {
      "type": "string",
      "enum": [
        "auto",
        "crew",
        "support",
        "off"
      ]
    }
  },
  "required": [
    "organizationId",
    "url"
  ],
  "additionalProperties": false
}

Response

Success status: 201

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "eventId": {
          "type": "string"
        },
        "organizationId": {
          "type": "string"
        },
        "title": {
          "type": "string"
        },
        "slug": {
          "type": "string"
        },
        "status": {
          "type": "string",
          "const": "draft"
        },
        "dashboardPath": {
          "type": "string"
        },
        "websiteImport": {
          "type": "object",
          "properties": {
            "sourceId": {
              "type": "string"
            },
            "eventId": {
              "type": "string"
            },
            "sourceUrl": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uri"
                },
                {
                  "type": "null"
                }
              ]
            },
            "status": {
              "type": "string",
              "enum": [
                "created",
                "processing",
                "classified",
                "needs_review",
                "applied",
                "failed"
              ]
            },
            "workflowStatus": {
              "type": "string",
              "enum": [
                "idle",
                "queued",
                "running",
                "succeeded",
                "failed",
                "cancelled"
              ]
            },
            "summary": {
              "type": [
                "string",
                "null"
              ]
            },
            "errorMessage": {
              "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))$"
            },
            "workflowStartedAt": {
              "anyOf": [
                {
                  "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))$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "workflowCompletedAt": {
              "anyOf": [
                {
                  "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))$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "reviewPath": {
              "type": [
                "string",
                "null"
              ]
            },
            "inspection": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "mediaImport": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "mediaIds": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "minLength": 1
                              }
                            },
                            "requestId": {
                              "type": "string"
                            },
                            "jobId": {
                              "type": "string"
                            },
                            "sourceUrl": {
                              "type": "string",
                              "format": "uri"
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "queued",
                                "running",
                                "succeeded",
                                "needs_attention",
                                "failed"
                              ]
                            },
                            "requestedAt": {
                              "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))$"
                            },
                            "error": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "completedAt": {
                              "anyOf": [
                                {
                                  "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))$"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "pages": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "url": {
                                    "type": "string"
                                  },
                                  "label": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "url",
                                  "label"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "considered": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "imported": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "existing": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "skipped": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "failures": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "url": {
                                    "type": "string"
                                  },
                                  "stage": {
                                    "type": "string",
                                    "enum": [
                                      "page",
                                      "image",
                                      "hosting",
                                      "job"
                                    ]
                                  },
                                  "reason": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "url",
                                  "stage",
                                  "reason"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "warnings": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          },
                          "required": [
                            "requestId",
                            "jobId",
                            "sourceUrl",
                            "status",
                            "requestedAt",
                            "error",
                            "completedAt",
                            "pages",
                            "considered",
                            "imported",
                            "existing",
                            "skipped",
                            "failures",
                            "warnings"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "phase": {
                      "type": "string",
                      "enum": [
                        "extracting",
                        "applying",
                        "review_ready",
                        "apply_failed",
                        "extraction_failed",
                        "cancelled",
                        "applied",
                        "needs_attention"
                      ]
                    },
                    "counts": {
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {
                        "type": "number"
                      }
                    },
                    "missingSections": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "warnings": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "reviewDraft": {
                      "type": "object",
                      "properties": {
                        "revision": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "resolutions": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": [
                              "unresolved",
                              "entered",
                              "not_applicable"
                            ]
                          }
                        },
                        "editedItemIds": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      },
                      "required": [
                        "revision",
                        "resolutions",
                        "editedItemIds"
                      ],
                      "additionalProperties": false
                    },
                    "draftData": {
                      "anyOf": [
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "galleryImages": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "additionalSourceUrls": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "sources": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "url": {
                            "type": "string"
                          },
                          "label": {
                            "type": "string"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "read",
                              "failed",
                              "proposed",
                              "unknown"
                            ]
                          },
                          "note": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "url",
                          "label",
                          "status",
                          "note"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "importItems": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "sectionKey": {
                            "type": "string"
                          },
                          "label": {
                            "type": "string"
                          },
                          "summary": {
                            "type": "string"
                          },
                          "destination": {
                            "type": "string"
                          },
                          "details": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "label": {
                                  "type": "string"
                                },
                                "value": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "label",
                                "value"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "reviewed": {
                            "type": [
                              "boolean",
                              "null"
                            ]
                          },
                          "applicable": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "id",
                          "sectionKey",
                          "label",
                          "summary",
                          "destination",
                          "details",
                          "reviewed",
                          "applicable"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "remainingItemIds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "itemHistoryKnown": {
                      "type": "boolean"
                    },
                    "canEditDraft": {
                      "type": "boolean"
                    },
                    "applyRequest": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "requestId": {
                              "type": "string"
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "queued",
                                "running",
                                "failed",
                                "succeeded"
                              ]
                            },
                            "selectedItemIds": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "error": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          },
                          "required": [
                            "requestId",
                            "status",
                            "selectedItemIds",
                            "error"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "nextSteps": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "path": {
                            "type": "string"
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "query",
                              "mutation"
                            ]
                          },
                          "reason": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "path",
                          "kind",
                          "reason"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "guidance": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "mediaImport",
                    "phase",
                    "counts",
                    "missingSections",
                    "warnings",
                    "reviewDraft",
                    "draftData",
                    "galleryImages",
                    "additionalSourceUrls",
                    "sources",
                    "importItems",
                    "remainingItemIds",
                    "itemHistoryKnown",
                    "canEditDraft",
                    "applyRequest",
                    "nextSteps",
                    "guidance"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "sourceId",
            "eventId",
            "sourceUrl",
            "status",
            "workflowStatus",
            "summary",
            "errorMessage",
            "createdAt",
            "updatedAt",
            "workflowStartedAt",
            "workflowCompletedAt",
            "reviewPath"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "eventId",
        "organizationId",
        "title",
        "slug",
        "status",
        "dashboardPath",
        "websiteImport"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "data"
  ],
  "additionalProperties": false
}

Other surfaces

CLI: ehq events create-from-website --organization <org_id> --url <url>

MCP tool: ehq_event_create_from_website