Suggestions

close search

Sip phone management

Note: Register sip phone to domain v2.stringee.com:15060

Create an sip phone

URL: https://api.stringee.com/v1/sipphone

HTTP method: POST

Content-Type: application/json

Custom HTTP header: Name: X-STRINGEE-AUTH Value: JSON web token (JWT), see Authentication

POST data (body):

{
  "username" : "USERNAME",
  "password" : "PASSWORD"
}
Field Type Require Description
USERNAME String Yes Username
PASSWORD String Yes SIP PASSWORD

Response:

{
    "r": RESULT_CODE,
    "sipusername": "projectId_USERNAME",
    "message": "RESULT_MESSAGE"
}
Field Type Require Description
r Int Yes Result code
sipusername String Yes Sip username is used for registration
message String No Result message

Sample request

POST /v1/sipphone HTTP/1.1
Host: https://api.stringee.com/
X-STRINGEE-AUTH: json_web_token
Accept: application/json

{
  "username" : "100",
  "password" : "password123456"
}

Sample response

{
    "r": 0,
    "sipusername": "1_100",
    "message": "Success"
}

Sip phone list

URL: https://api.stringee.com/v1/sipphone

HTTP method: GET

Content-Type: application/json

Custom HTTP header: Name: X-STRINGEE-AUTH Value: JSON web token (JWT), see Authentication

GET parameters:

N/A

Response:

{
    "r": 0,
    "message": "Success",
    "data":{
        "sipphones":[
            {
                "username": "1_test",
                "extension": null,
                "email_address": null
            }
        ],
        "total": "1"
    }
}
Field Type Require Description
r Int Yes Result code
message String Yes Result message
data JSON Yes Sip phone list

Sample request

GET /v1/sippphone HTTP/1.1
Host: https://api.stringee.com
X-STRINGEE-AUTH: json_web_token
Accept: application/json

Sample response

{
    "r": 0,
    "message": "Success",
    "data":{
        "sipphones":[
            {
                "username": "1_test",
                "email_address": ""
            }
        ],
        "total": "1"
    }
}

Delete an sip phone

URL: https://api.stringee.com/v1/sipphone/{username}

HTTP method: DELETE

Content-Type: application/json

Custom HTTP header: Name: X-STRINGEE-AUTH Value: JSON web token (JWT), see Authentication

URI Parameters:

Field Type Require Description
{username} String Yes The sip username

Response:

{
    "r": RESULT_CODE,
    "message": "RESULT_MESSAGE"
}
Field Type Require Description
r Int Yes Result code
message String No Result message

Sample request

DELETE /v1/sipphone/test HTTP/1.1
Host: https://api.stringee.com
X-STRINGEE-AUTH: json_web_token
Accept: application/json

Sample response

{
    "r": 0,
    "message": "Success"
}

Update sipphone

URL: https://api.stringee.com/v1/sipphone/{username}

HTTP method: PUT

Content-Type: application/json

Custom HTTP header: Name: X-STRINGEE-AUTH Value: JSON web token (JWT), see Authentication

PUT data (body):

{
  "password" : "password123456",
  "extension" : 100
}
Field Type Require Description
password String Yes The password update
extension Int No The extension of sipphone

URI Parameters:

Field Type Require Description
{username} String Yes The sip username

Response:

{
    "r": RESULT_CODE,
    "message": "RESULT_MESSAGE"
}
Field Type Require Description
r Int Yes Result code
message String Yes Result message

Sample request

PUT /v1/sipphone/test HTTP/1.1
Host: https://api.stringee.com
X-STRINGEE-AUTH: json_web_token
Accept: application/json

{
    "password" : "testpasswd122"
}

Sample response

{
    "r": 0,
    "message": "Success"
}