Subscribe to Events

Subscribe to the desired events, Yeastar Workplace would proactively send notifications to the third-party application when the subscribed event occurs.

Prerequisites

You have set up a webhook on Yeastar Workplace.

Request URL

POST {base_url}/services/openapi/v1.0/integration/subscribe

Request parameters

Body parameters
Parameter Required Type Description
eventTypes No Array <String> The event(s) that you want to be notified.

Valid value:

  • ALL
  • MEETING_CREATED
  • MEETING_UPDATED
  • MEETING_DELETED
  • MEETING_REACHED_START_TIME
  • MEETING_CHECKED_IN
  • MEETING_CHECKED_OUT
  • MEETING_EXTENDED
  • MEETING_REACHED_END_TIME
Note:
  • Use a comma to separate multiple event types. For example, "MEETING_CREATED","MEETING_UPDATED".

  • If you want to receive notifications for all events, set the eventTypes to ALL or leave it empty (null).

  • For detailed information about the events, see Webhook event types.

Response parameters

Parameter Type Description
status String The result of the request.
  • Success
  • Failed
requestId String The ID of the request, which can be used to quickly locate the request.

Example

Request example

Subscribe to MEETING_CREATED and MEETING_UPDATED events.
POST /services/openapi/v1.0/integration/subscribe HTTP/1.1
Host: test.smartoffice.yeastar.com
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJncmFudF90eXBlIjoiY2xpZW50X2NyZWRlbnRpYWxzIiwic2NvcGUiOlsiL29wZW5hcGkvIl0sImVudGVycHJpc2VfaWQiOjEwMDQzMywicmVnaW9uIjoiR0wiLCJhdXRob3JpdGllcyI6WyJST0xFX0NMSUVOVCJdLCJqdGkiOiJkMjI1NWZlZi1mYmFhLTQ3NmEtYjhiNi1jYzI0ZTI2MjM2ZmUiLCJjbGllbnRfaWQiOiI3OTU2OGFhMC0wYjBkLTQyZjYtOGRiNC03OWExNmQ3MzQ3MmEiLCJ0cyI6MTY4OTk5MTY4NywiZXhwX2luIjo4NjQwMH0.n89H7wMZQL9PA3-LFXoSr75D0EvsDwgcznA55FPCZxU
Content-Type: application/json

{
    "eventTypes": [
      "MEETING_CREATED","MEETING_UPDATED"
    ]
}
Response example
HTTP/1.1 200 OK
{
    "status": "Success",
    "requestId": "c136d042add437079270c12f625bceab"
}