Skip to main content
Create Event
Creates an event. The acting user (the token’s own user, or the actingUserId a service key sends) becomes the event’s owner (userId) and is automatically added to hostIds. See Owner and hosts. Supports inline upload of a cover (coverFile), images (images) and files (files) via multipart/form-data; on a multipart request every field is a string, so send location, hostIds and metadata as JSON strings. The required location fields depend on type: online needs a url; physical needs an address or location; hybrid needs both a url and an address/location. Requires authentication. Space-scoped events (spaceId) require the spaces bundle and active membership of the space, no ban in any space above it, and, in a space whose postingPermission is "team", the admin or moderator role there — for a service key, the membership of the user it names in actingUserId, exactly as that user’s own request. Every user in hostIds must be an active member of the space too. Image upload requires the files-images bundle.

Body Parameters

string
required
Event title. 1–300 characters.
string
required
ISO datetime when the event starts. RSVPs close at this moment.
string
required
"online", "physical", or "hybrid". Controls which location fields are required.
string
Optional description.
string
Optional ISO datetime when the event ends.
string
Optional IANA timezone string, e.g. "America/New_York".
string
Join/stream URL. Required for online and hybrid events.
string
Optional venue name.
string
Street address. Required (alone or with location) for physical and hybrid events.
{ latitude: number; longitude: number }
Geographic coordinates. Stored as a GeoJSON point and used for proximity search. On multipart requests, send as a JSON string.
string
Optional UUID of a space to scope the event to. Requires the spaces bundle and active membership. Mandatory when visibility is "members".
string
"public", "members", or "invite". Defaults to "public". "members" requires a spaceId.
number
Maximum number of going RSVPs. Positive integer. Omit for unlimited.
boolean
Whether a "maybe" RSVP is allowed. Defaults to true.
boolean
Whether everyone who can see the event can view the named guest list. When false, only hosts who are active members of the event’s space and not banned in it or a space above it and the space’s admins and moderators can. Defaults to true.
string[]
Additional host user IDs. The creator is always added automatically. For an event in a space, each one must be an active member of that space (409 event/host-not-member); events with no space accept anyone. On multipart requests, send as a JSON string.
object
Arbitrary key-value data. Up to 1 MB.
string
Service key only, and required with one: the user this request acts as, who becomes the creator and first host, held to their own permissions. A user that doesn’t exist returns 404 event/user-not-found. A user token always acts as its own user and must not send it (400 event/acting-user-not-allowed).
file
Optional cover image (one image). Multipart file field. Requires coverFile.options. The cover is one of the event’s files, and coverImageId points at it; it sorts before the event’s other files (find it by coverImageId). See Cover and files.
string
JSON-stringified image-processing options for the cover (the same discriminated union used by Upload Image). A key the options don’t take, a key of another mode included (for example sizes with exact-dimensions), is refused with 400 event/invalid-body, param naming it.
file[]
Optional images in the event’s files, processed into sizes per images.options. Multipart file field. Requires images.options. A request takes at most 20 files over all its file fields together.
string
JSON-stringified image-processing options applied to every image in images (mode is required). The same options as Upload Image’s file.options. A key the options don’t take, a key of another mode included (for example sizes with exact-dimensions), is refused with 400 event/invalid-body, param naming it.
file[]
Optional files in the event’s files, stored as uploaded. Multipart file field. Each file’s type comes from its MIME type; an image sent here isn’t processed, so it has no image data.
string
Optional JSON-stringified file options: pathParts (string[]) customizes the storage path. A key other than pathParts is refused with 400 event/invalid-body, param naming it.
The event’s files list the cover first, then the images, then the files, each in upload order. An images.options or files.options sent without its files isn’t used, but is still validated: invalid options get a 400.

Response

Returns 201 with the created Event object, including inline rsvpCounts. When the files-images bundle is installed it also carries files ([] for none; the cover first, then its images and files, images with their variants) and the host’s user.avatarFile / user.bannerFile; without the bundle there is no files key.

Error Responses

Returned with no JSON body: 401 when no Authorization header is sent, 403 when the access token is invalid or expired. Checked before any uploaded file is read, so a request with no credentials gets 401 rather than a body or acting-user error.
A service key sent no actingUserId.
A user token sent actingUserId, even naming its own user. Only a service key names the user it acts as; a user token always acts as its own user.
The request sent cover.options or gallery.options. The cover is uploaded as coverFile, with its options in coverFile.options, and the event’s images as images, with their options in images.options.
The request sent userId. On this route the user a service key acts as is actingUserId.With a service key:
With a user token:
Returned when a cover, images or files are uploaded on a project without the files-images bundle, or when spaceId is sent on a project without the spaces bundle: missingTables lists the tables that aren’t installed and bundleId the bundle to install. While the bundle is still being installed, the response is 503 database/tables-provisioning instead. See Bundles.
The spaceId names no space, or one the creator can’t see (a private space they aren’t an active member of, or a space under one). Checked before the membership check. See Space visibility.
The creator isn’t an active member of the space — including anyone banned in the space itself.
The creator is an active member, but is banned in a space above it, or the space’s postingPermission is "team" and they aren’t one of its admins or moderators. One body for every cause.
A user in hostIds isn’t an active member of the event’s space (not a member, pending or banned — the same body for each).
A file is over 50 MB. param names its field.
The cover can’t be read as an image. A file in images that can’t be read gets the same code with param: "images":
An image over 10000 px on a side gets the same code. error gives its size:
A file in images:
A cover or images were uploaded without their options. param is coverFile.options or images.options.
For images:
coverFile.options without mode, or with a mode that isn’t one of the five (other options fields the same way, named in error and param):
In an aspect-ratio mode, a variant’s computed side would be outside 1–10000 px. Checked once the image is read, before anything is stored. param names the option:
In aspect-ratio-height-based it names a heights option and gives a width. In multi-aspect-ratio it names a sizes option, and the ratio is the one in aspectRatios closest to the image, so the text reads ”… at the 3:1 aspect ratio, the one in aspectRatios closest to this image. Each side of a variant must be 1–10000 px.” More than 30 entries in dimensions, widths, heights or sizes (one variant each). param names the option:
A variant name that uses a character other than letters, digits, _, - and ., that is longer than 64 characters, that contains .., or that is original. param names the option:
A key the options don’t take (also a key of another mode). error names the object holding it, param the key itself:
files.options takes only pathParts; any other key gets the same code:
The uploaded files would take the project past its plan’s file-storage limit. Nothing is created or stored.
Returned when a service key names an actingUserId that isn’t a user in this project.
A file was refused as the body was read: event/unsupported-file-type or event/unexpected-file-field (a file in another field, the old cover and gallery included, or a second file in coverFile), with param naming the field when there is one, or 413 event/too-many-files for more than 20 files in the request. A body over 250 MB gets 413 request/body-too-large; one that can’t be read at all gets request/invalid-multipart or request/field-too-large. See Upload errors.
See also: useCreateEvent · node-sdk · js-sdk