Request Structure

This topic explains the structure of Yeastar Workplace API request, including HTTP request method, request URL, and request authentication.

Request example

The following example shows a request of Query Multiple Meeting Rooms.

GET /services/openapi/v1.0/room/room_list HTTP/1.1
Host: workplace.yeastar.com
Authorization: Bearer {access_token}

Request methods

Yeastar Workplace API supports the following HTTP methods:

HTTP method Usage
GET Query data from Yeastar Workplace.
POST Send data to Yeastar Workplace to create a new resource or perform a specific operation.
PUT Update an existing resource on Yeastar Workplace.
DELETE Delete a specific resource on Yeastar Workplace.

Request URL

The request URL format of Yeastar Workplace API is shown as follows:
{base_url}/{endpoint}
base_url
Base URL is the domain name of the server where the API is hosted, namely the domain name of Yeastar Workplace:
https://{Yeastar Workplace domain name}
All request URLs referenced in the documentation have the base URL https://workplace.yeastar.com.
Note: If your account is signed up in Europe, you should use the base URL https://eu.workplace.yeastar.com.
endpoint
Endpoints represent different resources or functionalities that can be accessed and interacted with through the API. Yeastar Workplace API endpoints are constructed in the following format:
/services/openapi/{version}/**
For all the available endpoints of Yeastar Workplace API, see API Interface List.

Request authentication

After the third-party application obtains an access token, it can use the token to make API calls. There are two ways to pass the access token to Yeastar Workplace API.
Note: The use of HTTP headers is generally preferred over query strings as the query string parameter appearing in URLs might be exposed. Therefore, this documentation will provide API examples based on the Authorization Bearer authentication method.
Using the Authorization Bearer HTTP Header (Preferred)
Send the access token in the Authorization:Bearer HTTP header, as the following code shows.
GET /services/openapi/v1.0/room/room_list
Host: workplace.yeastar.com
Authorization: Bearer {access_token}
Using the access token querying string parameter
You can also send the access token via a querying string parameter access_token, as the following code shows.
GET https://workplace.yeastar.com/services/openapi/v1.0/room/room_list?access_token={access_token}