> 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

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: management-api
  version: 1.0.0
paths:
  /GetSipRegistrations:
    post:
      operationId: get-sip-registrations
      summary: GetSipRegistrations
      description: >-
        Get active SIP registrations.


        Allowed roles: `Owner`, `Admin`, `Developer`, `Supervisor`,
        `Accountant`, `Support`.


        **Example request:** Get all active sip registrations.
      tags:
        - subpackage_sipRegistration
      parameters:
        - name: sip_registration_id
          in: query
          description: The SIP registration ID
          required: false
          schema:
            type: integer
        - name: sip_username
          in: query
          description: The SIP user name to filter
          required: false
          schema:
            type: string
        - name: deactivated
          in: query
          description: Whether to show the frozen SIP registrations only
          required: false
          schema:
            type: boolean
        - name: successful
          in: query
          description: Whether to show the successful SIP registrations only
          required: false
          schema:
            type: boolean
        - name: is_persistent
          in: query
          description: Whether the SIP registration is persistent to filter
          required: false
          schema:
            type: boolean
        - name: application_id
          in: query
          description: >-
            The application ID list separated by semicolons (;) to filter. Can
            be used instead of **application_name**
          required: false
          schema:
            type: array
            items:
              type: integer
        - name: application_name
          in: query
          description: >-
            The application name list separated by semicolons (;) to filter. Can
            be used instead of **application_id**
          required: false
          schema:
            type: array
            items:
              type: string
        - name: is_bound_to_application
          in: query
          description: Whether SIP registration bound to an application
          required: false
          schema:
            type: boolean
        - name: rule_id
          in: query
          description: >-
            The rule ID list separated by semicolons (;) to filter. **Required**
            unless **rule_name** is provided.
          required: false
          schema:
            type: array
            items:
              type: integer
        - name: rule_name
          in: query
          description: >-
            The rule name list separated by semicolons (;) to filter.
            **Required** unless **rule_id** is provided.
          required: false
          schema:
            type: array
            items:
              type: string
        - name: user_id
          in: query
          description: >-
            The user ID list separated by semicolons (;) to filter. **Required**
            unless **user_name** is provided.
          required: false
          schema:
            type: array
            items:
              type: integer
        - name: proxy
          in: query
          description: The list of proxy servers to use, divided by semicolon (;)
          required: false
          schema:
            type: array
            items:
              type: string
        - name: in_progress
          in: query
          description: Whether SIP registration is still in progress
          required: false
          schema:
            type: boolean
        - name: status_code
          in: query
          description: >-
            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__
          required: false
          schema:
            type: string
        - name: count
          in: query
          description: The max returning record count
          required: false
          schema:
            type: integer
        - name: offset
          in: query
          description: The first **N** records are skipped in the output
          required: false
          schema:
            type: integer
        - name: Authorization
          in: header
          description: >-
            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.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/sip-registration_GetSipRegistrations_Response_200
servers:
  - url: https://api.voximplant.com/platform_api
components:
  schemas:
    SipRegistrationTypeLastUpdated:
      oneOf:
        - type: integer
        - type: string
      description: The last time updated
      title: SipRegistrationTypeLastUpdated
    SipRegistrationTypeSubscriptionPrice:
      oneOf:
        - type: string
        - type: number
          format: double
      description: The subscription monthly charge
      title: SipRegistrationTypeSubscriptionPrice
    SIPRegistrationType:
      type: object
      properties:
        sip_registration_id:
          type: integer
          description: The SIP registration ID
        sip_username:
          type: string
          description: The user name from sip proxy
        proxy:
          type: string
          description: The sip proxy
        last_updated:
          $ref: '#/components/schemas/SipRegistrationTypeLastUpdated'
          description: The last time updated
        auth_user:
          type: string
          description: The SIP authentications user
        outbound_proxy:
          type: string
          description: The outgoing proxy
        successful:
          type: boolean
          description: Whether the SIP registration is successful
        status_code:
          type: integer
          description: The status code from a SIP registration
        error_message:
          type: string
          description: The error message from a SIP registration
        deactivated:
          type: boolean
          description: >-
            Whether the subscription is deactivation. The SIP registration is
            frozen if true
        next_subscription_renewal:
          type: string
          description: >-
            Date string as returned by the Management API.


            The next subscription renewal date in the following format:
            YYYY-MM-DD
        purchase_date:
          type: string
          description: |-
            Timestamp in YYYY-MM-DD HH:mm:ss format.

            The purchase date in 24-h format: YYYY-MM-DD HH:mm:ss
        subscription_price:
          $ref: '#/components/schemas/SipRegistrationTypeSubscriptionPrice'
          description: The subscription monthly charge
        is_persistent:
          type: boolean
          description: >-
            Whether the SIP registration is persistent. Set false to activate it
            only on the user login
        user_id:
          type: integer
          description: ID of the bound user
        user_name:
          type: string
          description: Name of the bound user
        application_id:
          type: integer
          description: ID of the bound application
        application_name:
          type: string
          description: Name of the bound application
        rule_id:
          type: integer
          description: ID of the bound rule
        rule_name:
          type: string
          description: Name of the bound rule
      description: Detailing SIP registration.
      title: SIPRegistrationType
    sip-registration_GetSipRegistrations_Response_200:
      type: object
      properties:
        result:
          type: array
          items:
            $ref: '#/components/schemas/SIPRegistrationType'
          description: Active SIP registrations
        count:
          type: integer
          description: Count rows
      title: sip-registration_GetSipRegistrations_Response_200
  securitySchemes:
    JwtAuth:
      type: http
      scheme: bearer
      description: >-
        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.

```

## SDK Code Examples

```python Success
import requests

url = "https://api.voximplant.com/platform_api/GetSipRegistrations"

headers = {"Authorization": "Bearer <token>"}

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 <token>'}};

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 <token>")

	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 <token>'

response = http.request(request)
puts response.read_body
```

```java Success
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.voximplant.com/platform_api/GetSipRegistrations")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php Success
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.voximplant.com/platform_api/GetSipRegistrations', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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 <token>");
IRestResponse response = client.Execute(request);
```

```swift Success
import Foundation

let headers = ["Authorization": "Bearer <token>"]

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()
```