URL: https://api.stringee.com/v1/number
HTTP method: GET
Content-Type: application/json
Custom HTTP header: Name: X-STRINGEE-AUTH Value: JSON web token (JWT), see Account Authentication
GET parameters:
Field | Type | Require | Description |
---|---|---|---|
page | Int | NO | Page |
limit | Int | NO | Max = 100; default = 10 |
project_id | Int | NO | The project that number belongs to |
Response:
{
"r": RESULT_CODE,
"account_sid": "YOUR_ACCOUNT_SID",
"message": "RESULT_MESSAGE",
"data": {YOUR_DATA_NUMBER}
}
Field | Type | Require | Description |
---|---|---|---|
r | Int | Yes | Result code |
account_sid | String | Yes | Your account sid |
message | String | Yes | Result message |
data | JSON | Yes | Your data number |
Sample request
GET /v1/number HTTP/1.1
Host: https://api.stringee.com
X-STRINGEE-AUTH: json_web_token
Accept: application/json
Sample response
{
"r": 0,
"message": "Load number success",
"account_sid": "AC59e79ea09224c5656be437a0f3dafd2f",
"data": {
"numbers": [
{
"id": 487,
"account": 6,
"country_code": "84",
"phone_number_no_country_code": "929760786",
"phone_number": "84929760786",
"callout_to_prefix": "",
"voice_enabled": 1,
"sms_enabled": 0,
"sip_trunk": 10,
"project_id": 24,
"answer_url": null,
"event_url": null,
"monthly_price": "2.50",
"country_iso_code": "vn",
"country_name": "Vietnam",
"telco_name": "Vietnamobile (mobile number)",
"project_name": "Test SDK Stringee"
}
],
"totalPages": 1,
"totalCount": 1,
"activePage": 1
}
}
URL: https://api.stringee.com/v1/number/{NUMBER_ID}
HTTP method: PUT
Content-Type: application/json
Custom HTTP header: Name: X-STRINGEE-AUTH Value: JSON web token (JWT), see Account Authentication
PUT data (body):
{
"project_id": 100,
"answer_url": "https://your_answer_url.com",
"event_url": "https://your_event_url.com",
}
Field | Type | Require | Description |
---|---|---|---|
project_id | String | No | The project you want move number to |
answer_url | String | No | The answer url number |
event_url | String | No | The event url number |
URI Parameters:
Field | Type | Require | Description |
---|---|---|---|
{NUMBER_ID} | String | Yes | The number ID |
Response:
{
"r": RESULT_CODE,
"account_sid": "YOUR ACCOUNT SID",
"message": "RESULT_MESSAGE"
}
Field | Type | Require | Description |
---|---|---|---|
r | Int | Yes | Result code |
account_sid | String | Yes | Your account sid |
message | String | Yes | Result message |
Sample request
PUT /v1/number/340 HTTP/1.1
Host: https://api.stringee.com
X-STRINGEE-AUTH: json_web_token
Accept: application/json
{
"project_id": "325",
"answer_url":"https://your_answer_url.com",
"event_url":"https://your_event_url.com"
}
Sample response
{
"message": "Update number success",
"r": 0,
"account_sid": "ACdedf2d11f882c2d333a1a429508fe4c8"
}