This document covers the following topics - 

  1. Why should I use Webhooks?
  2. How to Register a webhook with Airmeet / How to subscribe to a Trigger?
  3. How to De-register a webhook / How to unsubscribe from a trigger?
  4. How to get sample payload data for each webhook?
  5. How to get x-access-key & x-secret-key from Airmeet?



a) Why should I use Webhooks?


Webhooks provide an easy way for Airmeet to send real-time data to an application of your choice. You can use these to integrate with your workflows to automate campaigns and alerts.


Airmeet has webhooks for the following use cases - 


Available Triggers

Trigger Description

Trigger Id (TriggerMetaInfoId)

New Airmeet Created

Triggered when a new Airmeet is created for a community

trigger.airmeet.created

Airmeet Started

Triggered when the Airmeet is scheduled to start

trigger.airmeet.started

Airmeet Finished

Triggered when the Airmeet is scheduled to finish. This does not end the event, but the organizer can use this as a reminder to end the event.

trigger.airmeet.finished

Event Start Reminder

Triggered 4 hours before an Airmeet is scheduled to start

trigger.airmeet.reminder

Recordings Available

Triggered when recordings for an Airmeet are available

trigger.airmeet.recording.available

New Registration Added

Triggered when a new registration is completed for any Airmeet in your community

trigger.airmeet.attendee.added

Attendee Joined an Airmeet

When an attendee joins an Airmeet. All data for this trigger is sent post-event completion

trigger.airmeet.attendee.joined


See Note 1

Attendee Joined a Session on Airmeet

When an attendee joins a Session on Airmeet. All data for this trigger is sent post-session completion

trigger.session.attendee.joined


See Note 1



b) How to Register a webhook with Airmeet / How to subscribe to a Trigger?


Use this endpoint to register a webhook

Request Endpoint: https://api-gateway.airmeet.com/prod/platform-integration/v1/webhook-register

Request Method: POST

Request Headers:

  1. Content-Type: application/json

  2. Accept: application/json

  3. x-access-key

  4. x-secret-key

Request Payload:

{

    "name": "Trigger Label",                // String Type

    "description": "Trigger Description",   // String Type

    "triggerMetaInfoId": "Trigger Id",      // String Type

    "url": "Webhook Url"                    // String Type

}

Field

Description

Model

Required

name

Name for your webhook

string

No

description

Description for your webhook

string

No

triggerMetaInfoId

The trigger type

string 

Select from one of the available triggers ids mentioned earlier

Yes

url

Webhook url

url

Yes

Note 1 - 

For Trigger Id trigger.airmeet.attendee.joined and trigger.session.attendee.joined the webhook request endpoint URL has an additional query param ‘airmeetId’. 

Sample format https://api-gateway.airmeet.com/prod/platform-integration/v1/webhook-register?airmeetId=<airmeetid> , where airmeetid is the uuid for an Airmeet event.


Response Headers:

  1. Content-Type: application/json

Response Payload:

{

  "statusCode": "2000",                              // String Type

  "statusMessage": "SUCCESS",                        // String Type

  "payload": {

    "id": "Webhook Registration Id",

    "triggerMetaInfoId": "TriggerId",                // String Type

    "name": "Trigger Label",                         // String Type

    "description": "Trigger Description",            // String Type

    "url": "Webhook Url",                            // String Type

    "isActive": true,                                // Boolean Type

    "createdAt": "2020-08-04T06:38:51.106+00:00",    // DateTime Type

    "updatedAt": "2020-08-04T06:38:51.106+00:00",    // DateTime Type

    "updatedBy": "Updated By Person",                // String Type

    "createdBy": "Created By Person"                 // String Type

  }

}


c) How to De-register a webhook / How to unsubscribe from a trigger?


Use this endpoint to de-register a webhook

Request Endpoint: https://api-gateway.airmeet.com/prod/platform-integration/v1/webhook-deregister

Request Method: POST

Request Headers:

  1. Content-Type: application/json

  2. Accept: application/json

  3. x-access-key

  4. x-secret-key


Request Payload:

{

    "id": "Webhook Registration Id",        // String Type

    "triggerMetaInfoId": "Trigger Id",      // String Type

    "url": "Webhook Url"                    // String Type

}


Field

Description

Model

Required

id

Webhook Registration Id

string

Yes

triggerMetaInfoId

The trigger type

string 

Select from one of the available triggers ids mentioned earlier

Yes

url

Webhook url

url

Yes


Response Payload:

{

  "statusCode": "2000",                              // String Type

  "statusMessage": "SUCCESS",                        // String Type

}


d) How to get sample payload data for each webhook?


Use this endpoint to get a sample payload for the different triggers

Request Endpoint: https://api-gateway.airmeet.com/prod/platform-integration/v1/sample-payload

Request Method: GET

Request Headers:

  1. Accept: application/json

  2. X-access-key

  3. x-secret-key

Request Params:

{

    "triggerMetaInfoId": "Trigger Id"       // String Type

}

Response Headers:

  1. Content-Type: application/json



e) To get x-access-key & x-secret-key kindly follow the following steps:


Step 1: Sign in to your airmeet account ( https://www.airmeet.com/signup )
Step 2: Click on the "Settings" tab and select the "API Access Key" section.
Step 3: Click on "Generate access key" and provide a name/label to your key (can be anything that can be remembered later)

Step 4: After providing your label name 'X-Airmeet-Access-Key' with 'X-Airmeet-Secret-Key' would be generated, which can be used in API integration.


Access Key = X-Airmeet-Access-Key
Secret Key = X-Airmeet-Secret-Key