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:
Note:
|
Response parameters
Parameter | Type | Description |
---|---|---|
status | String | The result of the request.
|
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
exampleHTTP/1.1 200 OK
{
"status": "Success",
"requestId": "c136d042add437079270c12f625bceab"
}