Getting the data

To get your meeting data, listen for POST requests to the webhook URL you set up in your account. There you'll get two types of data:

  • live meeting events, as the bot interacts with the meeting. Right now, the events supported share bot status updates.

  • post-meeting data: the video-recording, speech time events, ...

1. Live Meeting Events

The events we send you during the meeting are in the following format:

POST /your-endpoint HTTP/1.1
Host: your-company.com
Content-Type: application/json
x-spoke-api-key: YOUR-API-KEY

{
  "event": "bot.status_change",
  "data": {
    "bot_id": "asfdgfdewsrtiuydsfgklafsd",
    "status": {
      "code": "joining_call",
      "created_at": "2024-01-01T12:00:00.000Z"
    }
  }
}

Here we have:

  • event: The key-value pair for bot status events. Always bot.status_change.

  • data.bot_id: The identifier of the bot.

  • data.status.code: The code of the event. One of:

    • joining_call: The bot has acknowledged the request to join the call.

    • in_waiting_room: The bot is in the "waiting room" of the meeting.

    • in_call_not_recording: The bot has joined the meeting, however it is not recording yet.

    • in_call_recording: The bot is in the meeting and recording the audio and video.

    • call_ended: The bot has left the call.

  • data.status.created_at: An ISO string of the datetime of the event.

2. Success webhook

To get the final meeting data, listen for POST requests to the webhook URL you set up in your account.

You either get:

  • "event": "complete",

or

  • "event": "failed".

Here's an example for a complete event, assuming `https://your-company.com/your-endpoint` is your webhook URL:

POST /your-endpoint HTTP/1.1
Host: your-company.com
Content-Type: application/json
x-spoke-api-key: YOUR-API-KEY

{
  "event": "complete",
  "data": {
    "bot_id": "asfdgfdewsrtiuydsfgklafsd",
    "mp4": "https://bots-videos.s3.eu-west-3.amazonaws.com/path/to/video.mp4?X-Amz-Signature=...",
    "speakers": ["Alice", "Bob"],
    "transcript": [{
      "speaker": "Alice",
      "words": [{
        "start": 1.3348110430839002,
        "end": 1.4549110430839003,
        "word": "Hi"
      }, {
        "start": 1.4549110430839003,
        "end": 1.5750110430839004,
        "word": "Bob!"
      }]
    }, {
      "speaker": "Bob",
      "words": [{
        "start": 2.6583010430839,
        "end": 2.778401043083901,
        "word": "Hello"
      }, {
        "start": 2.778401043083901,
        "end": 2.9185110430839005,
        "word": "Alice!"
      }]
    }]
  }
}

Let's break this down:

  • bot_id: the identifier of the bot.

  • mp4: A private AWS S3 URL of the mp4 recording of the meeting. Valid for one hour only.

  • transcript | optional: The meeting transcript. Only given when speech_to_text is set when asking for a bot. An array of:

    • transcript.speaker: The speaker name.

    • transcript.words: The list of words. An array of:

      • transcript.words.start: The start time of the word.

        • transcript.words.end: The end time of the word.

        • transcript.words.word: The word itself.

3. Failed webhook

Here's an example of a failed recording:

POST /your-endpoint HTTP/1.1
Host: your-company.com
Content-Type: application/json
x-spoke-api-key: YOUR-API-KEY

{
  "event": "failed",
  "data": {
    "bot_id": bot_id,
    "error": "CannotJoinMeeting"
  }
}

The failure types can be:

Last updated