Custom events endpoint integration

  • Example Post request

If you are using the custom events endpoint, you will want to make a request like the following:

POST /events/custom HTTP/1.1
Authorization: Api-Key iAnL3k5o3Sp41xin9J0ps0DM48swWFYpyuUvLUBI
Accept: application/json
Content-Type: application/json
Content-Length: 107

    "externalId": "f5o3Sp41xin9J0gsd4354",
    "slackId": "U01T54ZD8CD",
    "event": "your_event_name"

Here’s a loom clip showing how to test.

You can use the method pasted here and simply change [YOUR FIELD]

 async findByCustomId(account: Account, slackId: string): Promise<CustomerDocument> {
    const customers = await this.CustomerModel.find({ ownerId: (<Account>account).id, [YOUR FIELD]: [YOUR FIELD] }).exec()
    return customers[0];
    //return found;

this.customersService.findByCustomId(account, ev.[YOUR FIELD])