> For a complete documentation index, fetch https://docs.voximplant.ai/llms.txt # GetSipRegistrations POST https://api.voximplant.com/platform_api/GetSipRegistrations Get active SIP registrations. Allowed roles: `Owner`, `Admin`, `Developer`, `Supervisor`, `Accountant`, `Support`. **Example request:** Get all active sip registrations. Reference: https://docs.voximplant.ai/api-reference/management-api/reference/sip-registration/get-sip-registrations ## Authentication - `Authorization` header (bearer token, required) — Voximplant Management API uses signed JWT tokens generated from your service-account private key. Pass the token in the `Authorization` header as a Bearer value: ``` Authorization: Bearer $VOXIMPLANT_TOKEN ``` See [Authorization](/api-reference/management-api/authorization) for ready-to-copy snippets in bash, Python, Node.js and Go that turn your `credentials.json` into a token. ## Request ### Query parameters - `sip_registration_id` (integer, optional) — The SIP registration ID - `sip_username` (string, optional) — The SIP user name to filter - `deactivated` (boolean, optional) — Whether to show the frozen SIP registrations only - `successful` (boolean, optional) — Whether to show the successful SIP registrations only - `is_persistent` (boolean, optional) — Whether the SIP registration is persistent to filter - `application_id` (list of integer, optional) — The application ID list separated by semicolons (;) to filter. Can be used instead of **application_name** - `application_name` (list of string, optional) — The application name list separated by semicolons (;) to filter. Can be used instead of **application_id** - `is_bound_to_application` (boolean, optional) — Whether SIP registration bound to an application - `rule_id` (list of integer, optional) — The rule ID list separated by semicolons (;) to filter. **Required** unless **rule_name** is provided. - `rule_name` (list of string, optional) — The rule name list separated by semicolons (;) to filter. **Required** unless **rule_id** is provided. - `user_id` (list of integer, optional) — The user ID list separated by semicolons (;) to filter. **Required** unless **user_name** is provided. - `proxy` (list of string, optional) — The list of proxy servers to use, divided by semicolon (;) - `in_progress` (boolean, optional) — Whether SIP registration is still in progress - `status_code` (string, optional) — The list of SIP response codes. The __code1:code2__ means a range from __code1__ to __code2__ including; the __code1;code2__ meanse either __code1__ or __code2__. You can combine ranges, e.g., __code1;code2:code3__ - `count` (integer, optional) — The max returning record count - `offset` (integer, optional) — The first **N** records are skipped in the output ## Response ### 200 Successful response - `result` (list of SIPRegistrationType, optional) — Active SIP registrations - `count` (integer, optional) — Count rows ## Types ### SIPRegistrationType Detailing SIP registration. - `sip_registration_id` (integer, optional) — The SIP registration ID - `sip_username` (string, optional) — The user name from sip proxy - `proxy` (string, optional) — The sip proxy - `last_updated` (SipRegistrationTypeLastUpdated, optional) — The last time updated - `auth_user` (string, optional) — The SIP authentications user - `outbound_proxy` (string, optional) — The outgoing proxy - `successful` (boolean, optional) — Whether the SIP registration is successful - `status_code` (integer, optional) — The status code from a SIP registration - `error_message` (string, optional) — The error message from a SIP registration - `deactivated` (boolean, optional) — Whether the subscription is deactivation. The SIP registration is frozen if true - `next_subscription_renewal` (string, optional) — Date string as returned by the Management API. The next subscription renewal date in the following format: YYYY-MM-DD - `purchase_date` (string, optional) — Timestamp in YYYY-MM-DD HH:mm:ss format. The purchase date in 24-h format: YYYY-MM-DD HH:mm:ss - `subscription_price` (SipRegistrationTypeSubscriptionPrice, optional) — The subscription monthly charge - `is_persistent` (boolean, optional) — Whether the SIP registration is persistent. Set false to activate it only on the user login - `user_id` (integer, optional) — ID of the bound user - `user_name` (string, optional) — Name of the bound user - `application_id` (integer, optional) — ID of the bound application - `application_name` (string, optional) — Name of the bound application - `rule_id` (integer, optional) — ID of the bound rule - `rule_name` (string, optional) — Name of the bound rule ### SipRegistrationTypeLastUpdated The last time updated ### SipRegistrationTypeSubscriptionPrice The subscription monthly charge ## Examples **Response** ```json { "result": [ { "sip_registration_id": 1, "sip_username": "test", "proxy": "localhost", "last_updated": "2014-09-01 12:00:00", "outbound_proxy": "127.0.0.1", "successful": true, "status_code": 200, "deactivated": false, "next_subscription_renewal": "2014-10-01", "purchase_date": "2014-09-01 11:00:01", "subscription_price": 0.5, "is_persistent": true, "user_id": 2, "application_id": 123 } ], "count": 1 } ``` **SDK Code** ```python Success import requests url = "https://api.voximplant.com/platform_api/GetSipRegistrations" headers = {"Authorization": "Bearer "} response = requests.post(url, headers=headers) print(response.json()) ``` ```javascript Success const url = 'https://api.voximplant.com/platform_api/GetSipRegistrations'; const options = {method: 'POST', headers: {Authorization: 'Bearer '}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go Success package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.voximplant.com/platform_api/GetSipRegistrations" req, _ := http.NewRequest("POST", url, nil) req.Header.Add("Authorization", "Bearer ") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby Success require 'uri' require 'net/http' url = URI("https://api.voximplant.com/platform_api/GetSipRegistrations") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' response = http.request(request) puts response.read_body ``` ```java Success import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://api.voximplant.com/platform_api/GetSipRegistrations") .header("Authorization", "Bearer ") .asString(); ``` ```php Success request('POST', 'https://api.voximplant.com/platform_api/GetSipRegistrations', [ 'headers' => [ 'Authorization' => 'Bearer ', ], ]); echo $response->getBody(); ``` ```csharp Success using RestSharp; var client = new RestClient("https://api.voximplant.com/platform_api/GetSipRegistrations"); var request = new RestRequest(Method.POST); request.AddHeader("Authorization", "Bearer "); IRestResponse response = client.Execute(request); ``` ```swift Success import Foundation let headers = ["Authorization": "Bearer "] let request = NSMutableURLRequest(url: NSURL(string: "https://api.voximplant.com/platform_api/GetSipRegistrations")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```