The API is included on the Business plan. See plans.
An event object is one event in a group, with its time, location, hosts, registration types, and settings. Heylo assigns every event ID. Fetching events works with any API key for the group. Creating and updating events needs an API key with write access.
Operations
- Fetch events:
POST https://api.heylo.com/apiv1-fetchwithtypeset to"communityEvents" - Create an event:
POST https://api.heylo.com/apiv1-createwithtypeset to"event" - Update an event:
POST https://api.heylo.com/apiv1-updatewithtypeset to"event"
Event object
Every event operation returns event objects in this shape. A field with no value is left out.
A request and a response do not hold registration types and registration questions the same way. A request sends each as an array, with no IDs. Heylo assigns the IDs, and the event object returns each as an object keyed by those IDs.
Attributes
absorbFees(boolean):truewhen the group absorbs the payment fees.falsewhen registrants pay them.attendanceCapacity(number): the most people who can attend, across all registration types.billingCutoffHours(number): how many hours before the start registrants are charged.-1charges at registration.canceled(boolean):truefor a canceled event.canRegisterInterested(boolean): whether members can answer that they are interested.canRegisterNotGoing(boolean): whether members can answer that they are not going.chatRestricted(boolean):truewhen the event chat is turned off.communityId(string): the ID of the group that created the event.confirmationEmailsEnabled(boolean): whether registrants receive a confirmation email.currency(string): the three-letter currency code of the event's prices, in lowercase.donationConfig(object): present when the event accepts donations.currency(string): the three-letter currency code, in lowercase.maxAmountInCents(number): the largest donation accepted.minAmountInCents(number): the smallest donation accepted.suggestedAmountInCents(number): the suggested donation.
eventDiscounts(array): the event's discount links.disabled(boolean):truefor a discount that is turned off.discountName(string): the name of the discount.discountPercent(number): the share taken off the price, above0and up to1, so0.25is 25% off.inviteId(string): the ID of the discount link.
eventId(string): the unique ID of the event.hostUserIds(object): the event's hosts, keyed by Heylo user ID, such as{"HEYLO_USER_ID": true}.image(string): the URL of the cover image, hosted by Heylo.isDraft(boolean):truefor a draft that members cannot see yet.isVisibleToPublic(boolean):truewhen people who are not members can see the event.location(string): the location as members see it, such as"North gate, Riverside Park".locationData(object): the place behind the location.address(object): the postal address.addressCountry(string)addressLocality(string): the city or town.addressRegion(string): the state or region.neighborhood(string)postalCode(string)streetAddress(string)
googlePlaceId(string): the Google Maps place ID.label(string): the name of the place.lat(number): the latitude.long(number): the longitude.
locationHidden(boolean):truewhen only confirmed attendees see the location.name(string): the event title.notes(string): the event description.recurrenceInterval(number): how often the event repeats, counted inrecurrenceUnits.recurrenceUnits(string): the unit of the interval, such as"weeks".registrationListVisibility(string): who sees the registration list. One of"members-only","attendees-only", or"hosts-only".registrationQuestions(object): the event's registration questions, keyed by registration question ID. Each value is a registration question object.registrationTypes(object): the event's registration types, keyed by registration type ID. Each value is a registration type object.requiresCommunitySignUp(boolean):truewhen a person must join the group to register.roleDiscountsDisabled(boolean):truewhen role discounts do not apply to this event.roleIds(object): for a private event, the roles that can see the event, keyed by role ID.timestamp(number): the start time, in Unix milliseconds.timestampEnd(number): the end time, in Unix milliseconds.timezone(string): the event's IANA time zone, such as"America/Los_Angeles".
{
"absorbFees": true,
"communityId": "HEYLO_GROUP_ID",
"eventId": "HEYLO_EVENT_ID",
"hostUserIds": {"HEYLO_USER_ID": true},
"image": "https://heylo-s1.b-cdn.net/communities/HEYLO_GROUP_ID/events/long-run.jpg",
"isVisibleToPublic": true,
"location": "North gate, Riverside Park",
"name": "Saturday long run",
"notes": "Ten easy miles. All paces welcome.",
"registrationQuestions": {
"HEYLO_REGISTRATION_QUESTION_ID": {
"order": 0,
"required": true,
"text": "What is your shirt size?",
"type": "text",
"visibility": "visible"
}
},
"registrationTypes": {
"HEYLO_REGISTRATION_TYPE_ID": {"cap": 50, "name": "General", "order": 1}
},
"timestamp": 1798822800000,
"timestampEnd": 1798833600000,
"timezone": "America/Los_Angeles"
}
Fetch events
Returns a group's events, sorted by start time, oldest first. The response includes role-restricted private events, canceled events (marked "canceled": true), and events another group created and shared with yours. Draft events are not included. Each event's communityId is the group that created it.
POST https://api.heylo.com/apiv1-fetch
Parameters
communityId(string, required): the group ID.type(string, required):"communityEvents".batchSize(number, optional): the number of events to return, 50 by default and 100 at most.endTimestamp(number, optional): return events that start at or before this time.lastEventId(string, optional): theeventIdof the last event from the previous page.startTimestamp(number, optional): return events that start at or after this time.
Always send both startTimestamp and endTimestamp. The response is then the earliest events in that window, up to batchSize. A request with only one of the two, or neither, reads from a short list of recent and upcoming events and can leave out events you asked for.
Returns
events(array): the event objects in the window, oldest first.
curl -X POST https://api.heylo.com/apiv1-fetch \
-H "Authorization: Bearer HEYLO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"batchSize": 100,
"communityId": "HEYLO_GROUP_ID",
"endTimestamp": 1801439999000,
"startTimestamp": 1798761600000,
"type": "communityEvents"
}'
{
"events": [
{
"communityId": "HEYLO_GROUP_ID",
"eventId": "HEYLO_EVENT_ID",
"name": "Saturday long run",
"timestamp": 1798822800000,
"timestampEnd": 1798833600000,
"timezone": "America/Los_Angeles"
}
]
}
Fetch the next page of events
Repeat the request with the same endTimestamp, with startTimestamp set to the timestamp of the last event you received, and with lastEventId set to that event's eventId.
Several events can start at the same moment, so a page can repeat an event from the previous one. Keep events by eventId and skip ones you already have. You have reached the last page when a response holds fewer events than batchSize.
Create an event
Creates an event in a group and returns it. The event is created on behalf of the group's owner and appears in the group right away. Heylo does not notify members about an event created through the API. An admin or host can notify members from the event in Heylo. Event reminders are sent as usual.
POST https://api.heylo.com/apiv1-create
Parameters
communityId(string, required): the group ID.event(object, required): the event to create.name(string, required): the event title, up to 200 characters.timestamp(number, required): the start time, in Unix milliseconds.timezone(string, required): an IANA time zone, such as"America/Los_Angeles".absorbFees(boolean, optional):true(the default) has your group absorb the payment fees.falseadds them to what the registrant pays.attendanceCapacity(number, optional): the most people who can attend, a whole number up to 1,000,000.billingCutoffHours(number, optional): how many hours before the start registrants are charged, a whole number up to 720.-1charges at registration.canRegisterInterested(boolean, optional): whether members can answer that they are interested.canRegisterNotGoing(boolean, optional): whether members can answer that they are not going.hostUserIds(object, optional): the event's hosts, as an object of 1 to 20 Heylo user IDs, such as{"HEYLO_USER_ID": true}. Every host must be a member of the group. An event without hosts is hosted by the group's owner.image(string, optional): anhttpsURL of a JPEG, PNG, or WebP cover image, up to 10 MB. The URL must return the image directly, without a redirect. Heylo downloads the image once and stores its own copy, so theimagein the response is a Heylo URL.isDraft(boolean, optional):truesaves a draft instead of publishing the event.isVisibleToPublic(boolean, optional):trueshows the event to people who are not members. An event in a public group is visible by default.location(string, optional): the location as members see it, up to 500 characters.locationData(object, optional): the place behind the location. Every field is optional.address(object): the postal address, with any ofaddressCountry,addressLocality(the city),addressRegion,neighborhood,postalCode, andstreetAddress. Each is a string of up to 500 characters.googlePlaceId(string): the Google Maps place ID.label(string): the name of the place, up to 500 characters.lat(number): the latitude, from-90to90. Sendlatandlongtogether.long(number): the longitude, from-180to180.
notes(string, optional): the event description, up to 20,000 characters.registrationListVisibility(string, optional): who sees the registration list. One of"members-only","attendees-only", or"hosts-only".registrationQuestions(array, optional): the event's registration questions, up to 20. Do not send anid.text(string, required): the question, up to 120 characters.options(array, optional): the choices of a multiple choice question, as 2 to 10 different strings of up to 100 characters each. Required for a multiple choice question, and not accepted for a text question.order(number, optional): the display position, lowest first, from 0 to 1,000. By default the questions follow the order of the array.required(boolean, optional): whether a registrant must answer.falseby default.type(string, optional):"text"(the default) or"multipleChoice".visibility(string, optional):"visible"(the default), or"private"so only hosts and admins see the answers.
registrationTypes(array, optional): the event's registration types, up to 50. Do not send anid.name(string, required): the name registrants see, up to 100 characters.cap(number, optional): the most people who can register with this type, a whole number from 1 to 1,000,000.description(string, optional): the description, up to 1,000 characters.guestSettings(object, optional): lets a registrant bring guests.max(number, optional): the most guests per registrant, from 1 to 100.priceInCents(number, optional): the price per guest.
order(number, optional): the display position, lowest first, from 0 to 1,000. By default the types follow the order of the array.priceInCents(number, optional): the price in the smallest unit of your group's currency. Leave it out or send0for a free type.
timestampEnd(number, optional): the end time, which must be after the start. An event without one ends 3 hours after it starts.
type(string, required):"event".
A field sent as null is treated as not sent. A request with any other field returns a 400 that names the field.
Returns
event(object): the event object as Heylo stored it. Save itseventId, which you need to update the event. Heylo assigns theeventIdand the ID of every registration type and registration question.
curl -X POST https://api.heylo.com/apiv1-create \
-H "Authorization: Bearer HEYLO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"communityId": "HEYLO_GROUP_ID",
"event": {
"image": "https://example.com/long-run.jpg",
"location": "North gate, Riverside Park",
"name": "Saturday long run",
"notes": "Ten easy miles. All paces welcome.",
"registrationQuestions": [
{"required": true, "text": "What is your shirt size?"}
],
"registrationTypes": [{"cap": 50, "name": "General"}],
"timestamp": 1798822800000,
"timezone": "America/Los_Angeles"
},
"type": "event"
}'
{
"event": {
"communityId": "HEYLO_GROUP_ID",
"eventId": "HEYLO_EVENT_ID",
"name": "Saturday long run",
"registrationQuestions": {
"HEYLO_REGISTRATION_QUESTION_ID": {
"order": 0,
"required": true,
"text": "What is your shirt size?",
"type": "text",
"visibility": "visible"
}
},
"registrationTypes": {
"HEYLO_REGISTRATION_TYPE_ID": {"cap": 50, "name": "General", "order": 1}
},
"timestamp": 1798822800000,
"timestampEnd": 1798833600000,
"timezone": "America/Los_Angeles"
}
}
A request that fails creates nothing, so it is safe to correct and send again. A request that succeeds twice creates two events.
Paid events
A registration type with a price makes the event a paid event.
- A price needs your group to be set up for paid event tickets, with a linked bank account that is ready for payouts. Without one, a request with a price returns a
400. Publishing a draft that has a price is checked the same way. - Prices are charged in your group's currency. The API does not accept a currency.
Registration questions and your plan
One text question is available on all plans. More than one question, or a multiple choice question, needs Plus or higher. A request that asks for more than your group's plan includes returns a 400, and nothing is saved. Admins can change the plan in Admin Settings > Subscription.
Settings the API does not write
Recurring events, collabs, private events, registration opening times, discount links, and donations are set in Heylo, not through the API. An update leaves those settings as they are.
Update an event
Changes an event that belongs to a group your key covers, and returns it. Only the fields you send change. Heylo does not notify members about an update made through the API.
POST https://api.heylo.com/apiv1-update
Parameters
eventId(string, required): the event ID, from a create or fetch events response.type(string, required):"event".updates(object, required): the fields to change. Sendnullto clear a field marked clearable.absorbFees(boolean): whether your group absorbs the payment fees.attendanceCapacity(number, clearable): the most people who can attend.billingCutoffHours(number, clearable): how many hours before the start registrants are charged. Clearing it returns the event to your group's default.canceled(boolean):truecancels the event. See below.canRegisterInterested(boolean): whether members can answer that they are interested.canRegisterNotGoing(boolean): whether members can answer that they are not going.hostUserIds(object): the event's hosts, 1 to 20 Heylo user IDs. An update replaces the whole list.image(string, clearable): anhttpsURL of a new cover image, with the same rules as on create.isDraft(boolean):falsepublishes a draft. A published event cannot go back to a draft.isVisibleToPublic(boolean):trueshows the event to people who are not members.location(string, clearable): the location as members see it, up to 500 characters.locationData(object, clearable): the place behind the location, with the same fields as on create. An update replaces the whole object.name(string): the event title, up to 200 characters.notes(string, clearable): the event description, up to 20,000 characters.registrationListVisibility(string): one of"members-only","attendees-only", or"hosts-only".timestamp(number): the start time, in Unix milliseconds.timestampEnd(number): the end time, which must be after the start.timezone(string): an IANA time zone.
An update takes no communityId: the event ID is enough, and your key must cover the event's group. An update does not accept registrationQuestions or registrationTypes. To change them on an existing event, use the event registration question and event registration type operations.
Returns
event(object): the event object after the change.
curl -X POST https://api.heylo.com/apiv1-update \
-H "Authorization: Bearer HEYLO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"eventId": "HEYLO_EVENT_ID",
"type": "event",
"updates": {
"notes": "Meet at the north gate.",
"timestamp": 1798826400000,
"timestampEnd": 1798837200000
}
}'
{
"event": {
"communityId": "HEYLO_GROUP_ID",
"eventId": "HEYLO_EVENT_ID",
"name": "Saturday long run",
"notes": "Meet at the north gate.",
"timestamp": 1798826400000,
"timestampEnd": 1798837200000,
"timezone": "America/Los_Angeles"
}
}
Publish a draft
Send "updates": {"isDraft": false}. A published event cannot go back to a draft.
Cancel an event
Send "updates": {"canceled": true} with no other fields. Canceling does notify members: everyone registered and every host is told the event is canceled.
A draft cannot be canceled. A canceled event cannot be updated or restored through the API.