Query SMTP Server Status

Query the connection status of Microsoft SMTP server.

Request URL

GET {base_url}/dm/open_api/v1/emails/status

Request parameters

Headers
Parameter Required Type Description
Authorization Yes String Pass the access token in the header.

Format: Bearer {access_token}.

Query parameters
Parameter Required Type Description
emailServerProvider Yes String The email service provider.

Valid value: Microsoft

tenantId Yes String The Microsoft Tenant ID.
applicationClientId Yes String The Microsoft Application Client ID.

Response parameters

Parameter Type Description
data Object <Details> The detailed information.
requestId String The unique ID of the request, which can be used to quickly locate the request.
status String Request result:
  • Success
  • Failed
time Long The response time.
Note: The YCM API response returns a timestamp, you can convert the timestamp to detailed date and time as needed. For more information, see Convert Timestamp to Local Date and Time.
Details
Parameter Type Description
microsoftStatus String The connection status with the Microsoft SMTP server.
  • connected
  • disconnected
  • unknown

Example

Request example

GET /dm/open_api/v1/emails/status HTTP/1.1
Host: ycm.yeastar.com
Authorization: Bearer eyJjdXN0b21Kd3RQYXlsb2FkSW5mbyI6eyJncmFudFR5cGUiOiJjbGllbnRfY3JlZGVudGlhbHMiLCJ5c0lkIjoxNzg5NjM2MDM5MDg1MDI1NjY0NSwidmVyc2lvbiI6MTY2Mzc0MTEyNSwicmVmcmVzaFZlcnNpb24iOjE2NjQyNjgyNjV9LCJzY29wZSI6WyJhbGwiXSwiZXhwIjoxNjY0MjcwMDY1LCJhdXRob3JpdGllcyI6WyJST0xFX0NMSUVOVCJdLCJqdGkiOiJjMzM3ZmM5ZS1iZGE0LTQ1NjItOGI5NS1hZTc1NzAxYmIwZjIiLCJjbGllbnRfaWQiOiJ5QXN4ZzdITkRFczNxSHprQk1aUU5Pblo2NTBPRUNNWSJ9.gPhOXaLMqZMZ57fcaF5hTAOrt65ABaW8ZEtHaFRfPw8
{
   "emailServerProvider":"Microsoft",
   "tenantId":"50340596-5889-4512-b5d3-ade78a123456",
   "applicationClientId":"08c59eaf-c124-41f1-b998-ff1234567890"
}
Response example
HTTP/1.1 200 OK
{
  "data": {
    "microsoftStatus": "connected"
  },
  "requestId": "9482a20c695e81f5e9c60a0b360ed5f6",
  "status": "Success",
  "time": 1665561298
}