Skip to content
EmitKitDocs
Esc
↑↓navigate↵open⌘Jpreview

List events

The Project’s events, newest first, each with its fields, actions and answer (as getEvent returns it). Page with before: pass the previous page’s nextCursor (an opaque position; a time works too). Times are ISO 8601 with their zone. Unknown parameters are refused. Deleted events and events in deleted channels are left out.

GET/v1/events
Authorization
AuthorizationBearer token (EmitKit API key) · headerrequired

EmitKit API key in the Authorization header as Bearer emitkit_…

or
X-API-KeyAPI key · headerrequired

EmitKit API key beginning with emitkit_.

Query parameters
beforestring

Only events before this point: the previous page's nextCursor, or a time

channelstring

Only this channel (its name)

min length 1 · max length 255
limitinteger

Events per page: 1 to 100, default 50

min 1 · max 100
sincestring

Only events at or after this time

Responses
200

A page of events.

dataobjectrequired
Show properties
eventsEvent[]required

Newest first.

Show properties
Array of Event
actionsobject[]required

The event's buttons and links ([] when none).

max items 4
Show properties
Array of object
idstring

A button: what the answer reports, e.g. approve

matches ^[A-Za-z0-9_-]{1,64}$
labelstringrequired
min length 1 · max length 40
requiresstring[]

Field ids that must be filled in before this button can be pressed.

stylestring
Allowed:primarydestructive
urlstring

A link: the page it opens

max length 2000 · matches ^(?:https:\/\/|http:\/\/localhost[:/])\S+$
answerAnswer | anyrequired

null when the event doesn't wait for an answer.

Show properties
Any of:
Answer
actionstring | nullrequired

The id of the pressed button (submit when fields had no buttons).

atstring<date-time> | anyrequired

When it was answered.

Show properties
Any of:
string<date-time>
string<date-time>
any
any
byobject | anyrequired

Who answered (an organization member).

Show properties
Any of:
object
emailstringrequired
idstringrequired
namestringrequired
any
any
expiresAtstring<date-time>required

When a pending event stops waiting.

matches ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
statusstringrequired
Allowed:pendingansweredexpiredcanceled
urlstring<uri>required

The answer page (needs a signed-in member). Pushes for this event open it.

valuesobject | anyrequired

Field values by field id: an option id (an array for multiple), text, a number or a boolean. Empty text fields are left out.

Show properties
Any of:
object
object
any
any
any
any
callbackobject | anyrequired

How delivery to callbackUrl went; null without one.

Show properties
Any of:
object
attemptsintegerrequired
deliveredAtstring<date-time> | anyrequired

When a 2xx was received.

Show properties
Any of:
string<date-time>
string<date-time>
any
any
lastStatusinteger | nullrequired

The receiver's last HTTP status; null when it couldn't be reached.

urlstringrequired
any
any
channelIdstringrequired
channelNamestringrequired
createdAtstring<date-time>required
matches ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
descriptionstring | nullrequired
displayAsstringrequired
Allowed:messagenotification
fieldsobject[]required

The event's fields ([] when none).

max items 5
Show properties
Array of object
Any of:
object
defaultstring | string[]

An option id (an array of ids when multiple). A single choice without one starts on its first option.

Show properties
Any of:
string
string
string[]
Array of string
string
idstringrequired
matches ^[A-Za-z0-9_-]{1,64}$
labelstringrequired
min length 1 · max length 100
multipleboolean

Let the person pick several options (checkboxes).

optionsobject[]required
min items 2 · max items 10
Show properties
Array of object
idstringrequired

What the answer reports, e.g. partial

matches ^[A-Za-z0-9_-]{1,64}$
labelstringrequired

What the person sees

min length 1 · max length 100
typestringrequired
Allowed:choice
object
defaultstring
min length 0 · max length 2000
idstringrequired
matches ^[A-Za-z0-9_-]{1,64}$
labelstringrequired
min length 1 · max length 100
maxLengthinteger
min 1 · max 2000
multilineboolean
placeholderstring
min length 1 · max length 100
typestringrequired
Allowed:text
object
defaultnumber
idstringrequired
matches ^[A-Za-z0-9_-]{1,64}$
labelstringrequired
min length 1 · max length 100
maxnumber
minnumber
stepnumber
typestringrequired
Allowed:number
unitstring

Shown next to the value, e.g. $ or %

min length 1 · max length 8
object
defaultboolean
idstringrequired
matches ^[A-Za-z0-9_-]{1,64}$
labelstringrequired
min length 1 · max length 100
typestringrequired
Allowed:boolean
iconstring | nullrequired
idstringrequired
metadataobjectrequired
notifybooleanrequired
resumestring | nullrequired

The resume you sent, as is (null without one).

sourcestringrequired
tagsstring[]required
titlestringrequired
userIdstring | nullrequired
nextCursorstring | nullrequired

Pass as before for the next page; null on the last page. Opaque: don't parse it.

requestIdstring<uuid>required
matches ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
successbooleanrequired
400

The request does not match the operation contract.

codestringrequired

Stable: switch on this, not on error or message.

detailsobject[]required
Show properties
Array of object
codestring
min length 1
messagestringrequired
min length 1
pathstring | integer[]required
Show properties
Array of string | integer
Any of:
string
string
integer
integer
errorstringrequired
requestIdstring<uuid>required
matches ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
successbooleanrequired
401

Authentication credentials are missing or invalid.

codestringrequired

Stable: switch on this, not on error or message.

errorstringrequired
messagestringrequired
requestIdstring<uuid>required
matches ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
successbooleanrequired
403

The 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.

codestringrequired

Stable: switch on this, not on error or message.

errorstringrequired
messagestringrequired

What's missing, e.g. the scope the operation needs.

requestIdstring<uuid>required
matches ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
successbooleanrequired
429

The authenticated principal exceeded its rate limit.

codestringrequired

Stable: switch on this, not on error or message.

errorstringrequired
messagestringrequired
requestIdstring<uuid>required
matches ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
successbooleanrequired
500

Unexpected server error.

codestringrequired
errorstringrequired
requestIdstring<uuid>required
matches ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
successbooleanrequired
Try it
Server
Authorization
Parameters
Request
curl -X GET "https://api.emitkit.com/v1/events" \
  -H "Authorization: Bearer YOUR_TOKEN"
Response
{
  "data": {
    "events": [
      {
        "actions": [
          {
            "id": "string",
            "label": "string",
            "requires": [
              "string"
            ],
            "style": "primary",
            "url": "string"
          }
        ],
        "answer": {
          "action": "string",
          "at": "2019-08-24T14:15:22Z",
          "by": {
            "email": "string",
            "id": "string",
            "name": "string"
          },
          "expiresAt": "2019-08-24T14:15:22Z",
          "status": "pending",
          "url": "http://example.com",
          "values": {
            "property1": "string",
            "property2": "string"
          }
        },
        "callback": {
          "attempts": 0,
          "deliveredAt": "2019-08-24T14:15:22Z",
          "lastStatus": 0,
          "url": "string"
        },
        "channelId": "string",
        "channelName": "string",
        "createdAt": "2019-08-24T14:15:22Z",
        "description": "string",
        "displayAs": "message",
        "fields": [
          {
            "default": "string",
            "id": "string",
            "label": "string",
            "multiple": true,
            "options": [
              {
                "id": "string",
                "label": "string"
              },
              {
                "id": "string",
                "label": "string"
              }
            ],
            "type": "choice"
          }
        ],
        "icon": "string",
        "id": "string",
        "metadata": {},
        "notify": true,
        "resume": "string",
        "source": "string",
        "tags": [
          "string"
        ],
        "title": "string",
        "userId": "string"
      }
    ],
    "nextCursor": "string"
  },
  "requestId": "d385ab22-0f51-4b97-9ecd-b8ff3fd4fcb6",
  "success": true
}