Events

Create A Message

Event name

message.didCreate

Description

It will trigger every time a user creates a message.

Data Description

Key

Description

message

created message information

users

an array of user information of the created message user

Example Delivery

POST /youurl HTTP/1.1
Host: localhost:4567
X-EKO-Signature: sha1=7d38cdd689735b008b3c702edd92eea23791c5f6
User-Agent: node-superagent/4.0.0
Content-Type: application/json
Content-Length: 442
{
"requestId": "5c01045b8350df000fdff589",
"webhookId": "5c0103408350df000fdff588",
"event": "channel.didCreate",
"data": {
"messages": [
{
"type": "text",
"tags": [],
"data": {
"text": "test"
},
"isDeleted": false,
"createdAt": "2018-11-30T11:39:20.149Z",
"editedAt": "2018-11-30T11:39:20.148Z",
"channelSegment": 1,
"updatedAt": "2018-11-30T11:39:20.149Z",
"channelId": "testWebhook",
"userId": "global-admin",
"messageId": "92cf42892b2164461619444efef60e49",
"flagCount": 0,
"hashflag": { "bits": 0, "hashes": 0, "hash": [] }
}
],
"users": [
{
"displayName": "Global Admin",
"updatedAt": "2018-11-30T11:39:19.615Z",
"createdAt": "2018-11-01T09:33:57.811Z",
"userId": "global-admin",
"roles": [
"global-admin"
],
"metadata": {},
"flagCount": 0,
"hashflag": { "bits": 0, "hashes": 0, "hash": [] }
}
]
}
}

Create A Channel

Event name

channel.didCreate

Description

It will trigger every time a channel is created.

Data Description

Key

Description

channel

created channel information

userIds

array of user id who are members of a created channel

Example Delivery

POST /youurl HTTP/1.1
Host: localhost:4567
X-EKO-Signature: sha1=7d38cdd689735b008b3c702edd92eea23791c5f6
User-Agent: node-superagent/4.0.0
Content-Type: application/json
Content-Length: 442
{
"requestId": "5c01045b8350df000fdff589",
"webhookId": "5c0103408350df000fdff588",
"event": "channel.didCreate",
"data": {
"userIds": ['A'],
"channel": {
"isDistinct": false,
"type": "standard",
"metadata": {},
"tags": [],
"isMuted": false,
"lastActivity": "2018-11-30T09:35:23.816Z",
"updatedAt": "2018-11-30T09:35:23.815Z",
"createdAt": "2018-11-30T09:35:23.815Z",
"isRateLimited": false,
"rateLimitWindow": 1000,
"channelId": "testWebhook",
"memberCount": 0,
"messageCount": 0
},
"users": [
{
"displayName": "User A",
"updatedAt": "2018-11-30T11:39:19.615Z",
"createdAt": "2018-11-01T09:33:57.811Z",
"userId": "A",
"roles": [],
"metadata": {},
"flagCount": 0,
"hashflag": { "bits": 0, "hashes": 0, "hash": [] }
}
]
}
}

Join A Channel

Event name

channel.didJoin

Description

It will trigger every time a user joins a channel

Data Description

Key

Description

channel

created channel information

userIds

array of user id who join a channel

Example Delivery

POST /youurl HTTP/1.1
Host: localhost:4567
X-EKO-Signature: sha1=7d38cdd689735b008b3c702edd92eea23791c5f6
User-Agent: node-superagent/4.0.0
Content-Type: application/json
Content-Length: 442
{
"requestId": "5c01045b8350df000fdff589",
"webhookId": "5c0103408350df000fdff588",
"event": "channel.didJoin",
"data": {
"userIds": ['B'],
"channel": {
"isDistinct": false,
"type": "standard",
"metadata": {},
"tags": [],
"isMuted": false,
"lastActivity": "2018-11-30T09:35:23.816Z",
"updatedAt": "2018-11-30T09:35:23.815Z",
"createdAt": "2018-11-30T09:35:23.815Z",
"isRateLimited": false,
"rateLimitWindow": 1000,
"channelId": "testWebhook",
"memberCount": 0,
"messageCount": 0
},
"users": [
{
"displayName": "User B",
"updatedAt": "2018-11-30T11:39:19.615Z",
"createdAt": "2018-11-01T09:33:57.811Z",
"userId": "B",
"roles": [],
"metadata": {},
"flagCount": 0,
"hashflag": { "bits": 0, "hashes": 0, "hash": [] }
}
]
}
}

Add members to Channel

Event name

channel.didAddUsers

Description

It will trigger every time a user adds more members to a channel

Data Description

Key

Description

channel

created channel information

userIds

array of user id added to a channel

adderId

user id who added other users

Example Delivery

POST /youurl HTTP/1.1
Host: localhost:4567
X-EKO-Signature: sha1=7d38cdd689735b008b3c702edd92eea23791c5f6
User-Agent: node-superagent/4.0.0
Content-Type: application/json
Content-Length: 442
{
"requestId": "5c01045b8350df000fdff589",
"webhookId": "5c0103408350df000fdff588",
"event": "channel.didAddUsers",
"data": {
"adderId": ['B'],
"userIds": ['C'],
"channel": {
"isDistinct": false,
"type": "standard",
"metadata": {},
"tags": [],
"isMuted": false,
"lastActivity": "2018-11-30T09:35:23.816Z",
"updatedAt": "2018-11-30T09:35:23.815Z",
"createdAt": "2018-11-30T09:35:23.815Z",
"isRateLimited": false,
"rateLimitWindow": 1000,
"channelId": "testWebhook",
"memberCount": 0,
"messageCount": 0
},
"users": [
{
"displayName": "User C",
"updatedAt": "2018-11-30T11:39:19.615Z",
"createdAt": "2018-11-01T09:33:57.811Z",
"userId": "C",
"roles": [],
"metadata": {},
"flagCount": 0,
"hashflag": { "bits": 0, "hashes": 0, "hash": [] }
}, {
"displayName": "User B",
"updatedAt": "2018-11-30T11:39:19.615Z",
"createdAt": "2018-11-01T09:33:57.811Z",
"userId": "B",
"roles": [],
"metadata": {},
"flagCount": 0,
"hashflag": { "bits": 0, "hashes": 0, "hash": [] }
}
]
}
}