Skip to main content

Event locations

A single mutation handles three cases: create a location, edit an existing one, or flip the event to "no physical location". All three flow through addOrEditEventLocation.

The mutation requires a JWT — get one from the homepage first. The API key needs the events:write scope. Only allowed while the event is draft.

Set or update a location

Pass the address fields. If locationId is omitted (or doesn't match an existing location on the event), a new EventLocation is created. If it matches, the matching row is updated — only the fields you provide are changed; null fields keep their current value.

mutation addOrEditEventLocation($input: AddOrEditEventLocationInput!) {
addOrEditEventLocation(input: $input) {
eventLocation {
id
name
streetName
postalCode
city
}
}
}

Validation when hasNoLocation: false:

  • name, streetName, postalCode, city are all required.

After the mutation runs, the parent event's hasLocation flag is set to true.

Edit an existing location

Pass locationId matching a location already attached to the event. Any field passed as null keeps its current value.

mutation updateLocationFields($input: AddOrEditEventLocationInput!) {
addOrEditEventLocation(input: $input) {
eventLocation {
id
name
streetName
}
}
}

Mark the event as having no location

Pass hasNoLocation: true. The other fields are ignored. The parent event's hasLocation flag is set to false. The mutation returns an empty EventLocation payload (no id, no fields).

mutation removeLocation($input: AddOrEditEventLocationInput!) {
addOrEditEventLocation(input: $input) {
eventLocation {
id
name
}
}
}

Errors:

  • Event not found — wrong ID, or the event belongs to another organization.
  • Cannot add new location to an event, which is completed / …which has already been published.