Create Event
Creates an Event in a named Channel, creating the Channel when necessary. When notify is true (the default), Organization members who turned on notifications for the Channel receive a web push notification. Events are retained for 90 days. Add actions with an id (buttons) or fields to ask a person something: the event waits for an answer (data.answer), which you read with GET /v1/events/{id}.
/v1/eventsAuthorizationBearer token (EmitKit API key) · headerrequiredEmitKit API key in the Authorization header as Bearer emitkit_…
X-API-KeyAPI key · headerrequiredEmitKit API key beginning with emitkit_.
Idempotency-KeystringA caller-generated command identifier, scoped to the API key and kept for 24 hours. Reusing it with the same request replays the first response; reusing it with a different request, or while the first request is still running, returns 409.
application/jsonactionsobject[]Up to 4. A button { id, label, style?, requires? } is an answer: the event then waits for someone to press one. A link { label, url } only opens a page.
Show propertiesHide properties
objectidstringlabelstringrequiredrequiresstring[]Ids of text or multiple-choice fields that must be filled in before this button can be pressed.
stylestringprimarydestructiveurlstringA link: the page it opens
callbackUrlstringWhere EmitKit POSTs the answer (event.answered) or the expiry (event.expired), signed with the project's callback secret (Standard Webhooks). https only.
channelNamestringrequiredChannel name. The Channel is created automatically when it does not exist.
descriptionstringdisplayAsstringmessagenotificationexpiresInintegerSeconds an event with buttons or fields waits for an answer: 10 to 604800, default 86400 (24 hours). After that, answer.status is expired.
fieldsobject[]Up to 5 inputs the person fills in: a choice (one or several options), text, a number or a yes/no. The answer reports them in answer.values by field id. Fields without buttons get a Send button.
Show propertiesHide properties
objectdefaultstring | string[]An option id (an array of ids when multiple). A single choice without one starts on its first option.
Show propertiesHide properties
stringstringstringidstringrequiredlabelstringrequiredmultiplebooleanLet the person pick several options (checkboxes).
optionsobject[]requiredShow propertiesHide properties
objectidstringrequiredlabelstringrequiredWhat the person sees
typestringrequiredchoicedefaultstringidstringrequiredlabelstringrequiredmaxLengthintegermultilinebooleanplaceholderstringtypestringrequiredtextdefaultnumberidstringrequiredlabelstringrequiredmaxnumberminnumberstepnumbertypestringrequirednumberunitstringShown next to the value, e.g. $ or %
defaultbooleanidstringrequiredlabelstringrequiredtypestringrequiredbooleaniconstringmetadataobjectnotifybooleanSend a web push notification to devices subscribed to the Channel.
resumestringYour own state, sent back as is in the callback and GET /v1/events/{id}, so a serverless handler can carry on without a database. Never shown to people.
sourcestringtagsstring[]titlestringrequireduserIdstring | nullThe Event was created or an earlier response was replayed.
dataEventrequiredAn event, as createEvent, getEvent and cancelEvent return it: the event with its fields, actions (both [] when none) and answer (null when it doesn't wait). Events are kept for 90 days; after that getEvent returns 404.
Show propertiesHide properties
actionsobject[]requiredThe event's buttons and links ([] when none).
Show propertiesHide properties
objectidstringA button: what the answer reports, e.g. approve
labelstringrequiredrequiresstring[]Field ids that must be filled in before this button can be pressed.
stylestringprimarydestructiveurlstringA link: the page it opens
answerAnswer | anyrequirednull when the event doesn't wait for an answer.
Show propertiesHide properties
actionstring | nullrequiredThe id of the pressed button (submit when fields had no buttons).
atstring<date-time> | anyrequiredWhen it was answered.
Show propertiesHide properties
string<date-time>anybyobject | anyrequiredWho answered (an organization member).
Show propertiesHide properties
emailstringrequiredidstringrequirednamestringrequiredanyexpiresAtstring<date-time>requiredWhen a pending event stops waiting.
statusstringrequiredpendingansweredexpiredcanceledurlstring<uri>requiredThe answer page (needs a signed-in member). Pushes for this event open it.
valuesobject | anyrequiredField values by field id: an option id (an array for multiple), text, a number or a boolean. Empty text fields are left out.
Show propertiesHide properties
objectanyanycallbackobject | anyrequiredHow delivery to callbackUrl went; null without one.
Show propertiesHide properties
attemptsintegerrequireddeliveredAtstring<date-time> | anyrequiredWhen a 2xx was received.
Show propertiesHide properties
string<date-time>anylastStatusinteger | nullrequiredThe receiver's last HTTP status; null when it couldn't be reached.
urlstringrequiredanychannelIdstringrequiredchannelNamestringrequiredcreatedAtstring<date-time>requireddescriptionstring | nullrequireddisplayAsstringrequiredmessagenotificationfieldsobject[]requiredThe event's fields ([] when none).
Show propertiesHide properties
objectdefaultstring | string[]An option id (an array of ids when multiple). A single choice without one starts on its first option.
Show propertiesHide properties
stringstringstringidstringrequiredlabelstringrequiredmultiplebooleanLet the person pick several options (checkboxes).
optionsobject[]requiredShow propertiesHide properties
objectidstringrequiredWhat the answer reports, e.g. partial
labelstringrequiredWhat the person sees
typestringrequiredchoicedefaultstringidstringrequiredlabelstringrequiredmaxLengthintegermultilinebooleanplaceholderstringtypestringrequiredtextdefaultnumberidstringrequiredlabelstringrequiredmaxnumberminnumberstepnumbertypestringrequirednumberunitstringShown next to the value, e.g. $ or %
defaultbooleanidstringrequiredlabelstringrequiredtypestringrequiredbooleaniconstring | nullrequiredidstringrequiredmetadataobjectrequirednotifybooleanrequiredresumestring | nullrequiredThe resume you sent, as is (null without one).
sourcestringrequiredtagsstring[]requiredtitlestringrequireduserIdstring | nullrequiredrequestIdstring<uuid>requiredsuccessbooleanrequiredThe request does not match the operation contract.
codestringrequiredStable: switch on this, not on error or message.
detailsobject[]requiredShow propertiesHide properties
objectcodestringmessagestringrequiredpathstring | integer[]requiredShow propertiesHide properties
string | integerstringintegererrorstringrequiredrequestIdstring<uuid>requiredsuccessbooleanrequiredAuthentication credentials are missing or invalid.
codestringrequiredStable: switch on this, not on error or message.
errorstringrequiredmessagestringrequiredrequestIdstring<uuid>requiredsuccessbooleanrequiredThe API key lacks this operation's scope (a read-only key can only read), isn't bound to a Project, or its Project was deleted.
codestringrequiredStable: switch on this, not on error or message.
errorstringrequiredmessagestringrequiredWhat's missing, e.g. the scope the operation needs.
requestIdstring<uuid>requiredsuccessbooleanrequiredThe Idempotency-Key belongs to a different event request.
codestringrequiredStable: switch on this, not on error or message.
errorstringrequiredmessagestringrequiredrequestIdstring<uuid>requiredsuccessbooleanrequiredThe request body exceeds 1 MiB, or the stored Event would exceed the 16 KB limit (all of its stored fields, including metadata, combined).
codestringrequiredStable: switch on this, not on error or message.
errorstringrequiredmessagestringrequiredRequest body exceeds the 1 MiB limitEvent exceeds the 16 KB storage limitrequestIdstring<uuid>requiredsuccessbooleanrequiredThe authenticated principal exceeded its rate limit.
codestringrequiredStable: switch on this, not on error or message.
errorstringrequiredmessagestringrequiredrequestIdstring<uuid>requiredsuccessbooleanrequiredThe Event could not be created.
codestringrequiredStable: switch on this, not on error or message.
errorstringrequiredrequestIdstring<uuid>requiredsuccessbooleanrequired