Event polling
/api/events/pollAuthenticate with Authorization: Bearer mbk_.... Returns events after cursor at once when there are any, up to limit (default 100, at most 500); otherwise waits up to wait seconds (default 30, at most 60) for one and returns an empty list. No cursor means from now. Send the returned cursor back; more means poll again straight away. types and subjects repeat or are comma-separated. Field names in the answer are snake_case (type_raw, occurred_at, world_id); the keys inside an event's data are camelCase. See https://docs.modbot.co/api/long-polling/.
An API key, made on Settings, API keys. Every key starts with mbk_.
In: header
Query Parameters
int32int32Response Body
application/json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
curl -X GET "https://example.com/api/events/poll"{ "events": [ { "version": 0, "id": "string", "cursor": null, "type": "string", "type_raw": null, "label": "string", "category": "string", "source": "string", "occurred_at": "2019-08-24T14:15:22Z", "occurred_before": null, "observed_at": "2019-08-24T14:15:22Z", "subject": { "platform": "string", "id": "string", "kind": "string" }, "actor": null, "world_id": null, "instance_id": null, "data": null } ], "cursor": "string", "more": true, "notice": null}Event socket GET
Authenticate with `Authorization: Bearer mbk_...`, or `?ticket=` from POST /api/events/tickets. Send `{"op":"subscribe","types":[...],"subjects":[...],"cursor":"..."}` within ten seconds; events arrive as `{"kind":"event","event":{...}}`. See https://docs.modbot.co/api/events-websocket/.
List webhooks GET
Every webhook, with its delivery state. Never the secret. Needs the `ManageApiKeys` permission.