POST /real-time

(Ignored)

Servers

Request headers

Name Type Required Description
Content-Type String Yes The media type of the request body.

Default value: "application/x-www-form-urlencoded"

Request body fields

Name Type Required Description
narrow[] Array No

A JSON-encoded array of arrays of length 2 indicating the narrow filter(s) for which you'd like to receive events for.

For example, to receive events for direct messages (including group direct messages) received by the user, one can use "narrow": [["is", "dm"]].

Unlike the API for fetching messages, this narrow parameter is simply a filter on messages that the user receives through their channel subscriptions (or because they are a recipient of a direct message).

This means that a client that requests a narrow filter of [["channel", "Denmark"]] will receive events for new messages sent to that channel while the user is subscribed to that channel. The client will not receive any message events at all if the user is not subscribed to "Denmark".

Newly created bot users are not usually subscribed to any channels, so bots using this API need to be subscribed to any channels whose messages you'd like them to process using this endpoint.

See the all_public_streams parameter for how to process all public channel messages in an organization.

Changes: See changes section of search/narrow filter documentation.

all_public_streams Boolean No

Whether you would like to request message events from all public channels. Useful for workflow bots that you'd like to see all new messages sent to public channels. (You can also subscribe the user to private channels).

Default value: false

event_types[] Array No

A JSON-encoded array indicating which types of events you're interested in. Values that you might find useful include:

  • message (messages)
  • subscription (changes in your subscriptions)
  • realm_user (changes to users in the organization and their properties, such as their name).

If you do not specify this parameter, you will receive all events, and have to filter out the events not relevant to your client in your client code. For most applications, one is only interested in messages, so one specifies: "event_types": ["message"]

Event types not supported by the server are ignored, in order to simplify the implementation of client apps that support multiple server versions.

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.