Contents

Outgoing Webhooks

Outgoing Webhooks allow messages posted to specific topics on Typetalk to be sent to an external server.

Integrating an Outgoing Webhook

  1. Select [•••] in the upper right corner of the topic where you want to post a message via Webhook, and open “Topic Settings”.
  2. Open the “BOTS” tab, and select “Add new”.
  3. Enter any bot ID and bot name, and select “Use Outgoing Webhook”.
  4. Enter the URL of the server to be sent, and select “Create”.

Request body

Upon integration, Typetalk sends the following request body to the specified server, which receives and processes the data.

{
  "topic": {
    "id": 208,
    "name": "IT Peeps",
    "suggestion": "IT Peeps",
    "lastPostedAt": "2014-12-10T09:00:29Z",
    "createdAt": "2014-06-10T02:32:29Z",
    "updatedAt": "2014-06-10T02:32:29Z"
  },
  "post": {
    "id": 333,
    "topicId": 208,
    "replyTo": null,
    "message": "Let's party like it's 1999!",
    "account": {
      "id": 100,
      "name": "jessica",
      "fullName": "Jessica Fitzherbert",
      "suggestion": "Jessica Fitzherbert",
      "imageUrl": "https://typetalk.com/accounts/100/profile_image.png?t=1403577149000",
      "createdAt": "2014-06-24T02:32:29Z",
      "updatedAt": "2014-06-24T02:32:29Z"
    },
    "mention": null,
    "attachments": [],
    "likes": [],
    "talks": [],
    "links": [],
    "createdAt": "2014-12-10T09:00:29Z",
    "updatedAt": "2014-12-10T09:00:29Z"
  }
}

Return response to Typetalk

The server can reply to Typetalk messages using the following, with ‘replyTo’ being the message ID:

{ "message": "Hello!", "replyTo": 333 }

Get API details about posting.

Deleting an Outgoing Webhook

  1. Select [•••] in the upper right corner of the topic where you want to delete a Webhook, and open “Topic Settings”.
  2. Open the “BOTS” tab, and select the bot.
  3. Uncheck “Use Outgoing Webhook,” and select “Update”.