Registration

Prepare a registration hand-off

Prepare a prefilled registration for a public event on a runner's behalf and return the link, price, availability, and the steps the runner still has to do (waiver, payment). Never charges or signs. Send an Idempotency-Key header.

Method

POST

Path

/v1/registration-intents

Required scope

registration:write

Request

curl -X POST "https://api.endurancehq.app/v1/registration-intents" \
  -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": {
    "eventId": {
      "type": "string",
      "minLength": 1
    },
    "eventSlug": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200
    },
    "raceOptionId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 120
    },
    "raceOptionName": {
      "type": "string",
      "minLength": 1,
      "maxLength": 120
    },
    "participant": {
      "type": "object",
      "properties": {
        "firstName": {
          "type": "string",
          "maxLength": 100
        },
        "lastName": {
          "type": "string",
          "maxLength": 100
        },
        "email": {
          "type": "string",
          "maxLength": 254,
          "format": "email",
          "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
        },
        "phone": {
          "type": "string",
          "maxLength": 30
        }
      },
      "required": [
        "email"
      ],
      "additionalProperties": false
    },
    "source": {
      "default": "agent",
      "type": "string",
      "minLength": 1,
      "maxLength": 60,
      "pattern": "^[a-z0-9_.:-]+$"
    },
    "crewableUserId": {
      "type": "string",
      "maxLength": 120
    },
    "crewableCatalogId": {
      "type": "string",
      "maxLength": 120
    },
    "crewableClickId": {
      "type": "string",
      "maxLength": 120
    }
  },
  "required": [
    "participant",
    "source"
  ],
  "additionalProperties": false
}

Response

Success status: 201

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "registrationUrl": {
          "type": "string",
          "format": "uri"
        },
        "expiresAt": {
          "type": "string"
        },
        "status": {
          "type": "string",
          "enum": [
            "ready",
            "already_registered",
            "closed",
            "sold_out",
            "waitlist"
          ]
        },
        "message": {
          "type": [
            "string",
            "null"
          ]
        },
        "event": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            },
            "slug": {
              "type": "string"
            },
            "title": {
              "type": "string"
            },
            "date": {
              "type": [
                "string",
                "null"
              ]
            },
            "location": {
              "type": [
                "string",
                "null"
              ]
            },
            "currency": {
              "type": "string"
            },
            "publicUrl": {
              "type": "string",
              "format": "uri"
            }
          },
          "required": [
            "id",
            "slug",
            "title",
            "date",
            "location",
            "currency",
            "publicUrl"
          ],
          "additionalProperties": false
        },
        "raceOption": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "distance": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "id",
                "name",
                "distance"
              ],
              "additionalProperties": false
            },
            {
              "type": "null"
            }
          ]
        },
        "raceOptions": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "distance": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "priceCents": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "open": {
                "type": "boolean"
              }
            },
            "required": [
              "id",
              "name",
              "distance",
              "priceCents",
              "open"
            ],
            "additionalProperties": false
          }
        },
        "price": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "amountCents": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "currency": {
                  "type": "string"
                },
                "tierName": {
                  "type": "string"
                },
                "serviceFeeCents": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "totalCents": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                }
              },
              "required": [
                "amountCents",
                "currency",
                "tierName",
                "serviceFeeCents",
                "totalCents"
              ],
              "additionalProperties": false
            },
            {
              "type": "null"
            }
          ]
        },
        "availability": {
          "type": "object",
          "properties": {
            "spotsLeft": {
              "anyOf": [
                {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                {
                  "type": "null"
                }
              ]
            },
            "waitlistEnabled": {
              "type": "boolean"
            }
          },
          "required": [
            "spotsLeft",
            "waitlistEnabled"
          ],
          "additionalProperties": false
        },
        "remainingSteps": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "required": [
        "id",
        "registrationUrl",
        "expiresAt",
        "status",
        "message",
        "event",
        "raceOption",
        "raceOptions",
        "price",
        "availability",
        "remainingSteps"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "data"
  ],
  "additionalProperties": false
}

Other surfaces

CLI: ehq registration prepare --event <slug> --email <email>

MCP tool: ehq_registration_prepare