Request Structure

This topic introduces the structure of API requests, including request method, request URL, and communication protocol.

All the API requests use POST method.

See the following API request of Log in a Queue as a request example.

POST /api/v1.1.0/queue/add_dynamicagent?token={token} HTTP/1.1
Content-Type:application/json; charset=utf-8
Host: api.yeastarcloud.com
{
    "queueid": "6700",
    "extid": "1000",
    "password": "6700123"
}
  • POST specifies the request method.
  • /api/v1.1.0/queue/add_dynamicagent?token={token} is the endpoint URI of Log in a Queue.
  • Content-Type:application/json; charset=utf-8 is the API contents format.
  • Host is the the domain of Yeastar Cloud PBX.
  • queueidextidpassword are the request parameters of Log in a Queue.

Request URL

The format of API request URL:

{base_url}{endpoint}
  • Base URL

    All URLs referenced in the documentation have the following base:

    https://{pbx_domain}

    Set the API base URL according to the web access settings on your PBX.

    If the web access protocol is HTTPS, use the following base URL:

    https://{pbx_ip}:{https_port}

    If the web access protocol is HTTP, use the following base URL:

    http://{pbx_ip}:{http_port}