# SIP User

## ListSIPUsersBySIPConnectionUUID

<mark style="color:blue;">`GET`</mark> `https://api.opentact.org/rest/sip/connection/{uuid}/users`

Get SIP users by SIP connection

#### Path Parameters

| Name | Type   | Description                                                      |
| ---- | ------ | ---------------------------------------------------------------- |
| uuid | string | `^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$` |

#### Headers

| Name         | Type   | Description |
| ------------ | ------ | ----------- |
| X.Auth-Token | string | JWT\_TOKEN  |

{% tabs %}
{% tab title="200 " %}

```javascript
{
  "success": true,
  "payload": [
    {
      "created_on": "2019-08-24T14:15:22Z",
      "modified_on": "2019-08-24T14:15:22Z",
      "uuid": "string",
      "login": "string",
      "ha1": "string",
      "ha1b": "string",
      "remote_ip": "string",
      "first_name": "string",
      "last_name": "string",
      "email": "string",
      "phone_number": "string",
      "avatar": "string",
      "dob": "2019-08-24T14:15:22Z",
      "gender": "Agender",
      "groups": [
        {}
      ],
      "sip_connection": {
        "created_on": "2019-08-24T14:15:22Z",
        "modified_on": "2019-08-24T14:15:22Z",
        "uuid": "string",
        "name": "string",
        "is_active": true,
        "tech_prefix": 0,
        "product": {},
        "subdomain": "string",
        "ip": "string",
        "port": 0,
        "class4_ingress_trunk_id": 0,
        "class4_ingress_trunk_settings": {},
        "class4_ingress_resource_ip_id": 0,
        "class4_egress_trunk_id": 0,
        "class4_egress_trunk_settings": {},
        "class4_egress_resource_ip_id": 0,
        "class4_trunk_prefix_id": 0,
        "tnleases": [],
        "sipusers": [],
        "sip_user_invites": [],
        "account": {},
        "created_by": {},
        "modified_by": {},
        "outbound_voice_profile": {}
      },
      "account": {
        "created_on": "2019-08-24T14:15:22Z",
        "modified_on": "2019-08-24T14:15:22Z",
        "uuid": "string",
        "name": "string",
        "email": "string",
        "level": "ServiceAccount",
        "balance": 0,
        "class4_id": 0,
        "deleted_on": "2019-08-24T14:15:22Z",
        "time_zone": {},
        "users": [],
        "admin": {},
        "messaging_profile_default": {},
        "messaging_profiles": [],
        "addresses": []
      },
      "created_by": {
        "created_on": "2019-08-24T14:15:22Z",
        "modified_on": "2019-08-24T14:15:22Z",
        "uuid": "string",
        "email": "string",
        "password": "string",
        "phone_number": "string",
        "first_name": "string",
        "last_name": "string",
        "avatar": "string",
        "gender": "Agender",
        "dob": "2019-08-24T14:15:22Z",
        "role": "Admin",
        "gmail_user_id": "string",
        "facebook_user_id": "string",
        "apple_user_id": "string",
        "wechat_user_id": "string",
        "deleted_on": "2019-08-24T14:15:22Z",
        "token": "string",
        "account": {}
      },
      "modified_by": {
        "created_on": "2019-08-24T14:15:22Z",
        "modified_on": "2019-08-24T14:15:22Z",
        "uuid": "string",
        "email": "string",
        "password": "string",
        "phone_number": "string",
        "first_name": "string",
        "last_name": "string",
        "avatar": "string",
        "gender": "Agender",
        "dob": "2019-08-24T14:15:22Z",
        "role": "Admin",
        "gmail_user_id": "string",
        "facebook_user_id": "string",
        "apple_user_id": "string",
        "wechat_user_id": "string",
        "deleted_on": "2019-08-24T14:15:22Z",
        "token": "string",
        "account": {}
      }
    }
  ]
}
```

{% endtab %}

{% tab title="401 Forbidden" %}

```javascript
{
  "success": false,
  "message": "string",
  "status": 401
}
```

{% endtab %}

{% tab title="404 " %}

```javascript
{
  "success": false,
  "message": "string",
  "status": 404
}
```

{% endtab %}
{% endtabs %}

### Code Example

{% tabs %}
{% tab title="cURL" %}

```bash
curl -X GET "https://api.opentact.org/rest/sip/connection/66eb0a8a-571e-41b1-8f50-4d97275cfab7/users" \
-H  "accept: application/json" \
-H  "X-Auth-Token: JWT_TOKEN"
```

{% endtab %}

{% tab title="PHP" %}

```php
<?php
include('vendor/rmccue/requests/library/Requests.php');
Requests::register_autoloader();
$headers = array(
    'accept' => 'application/json',
    'X-Auth-Token' => 'JWT_TOKEN'
);
$response = Requests::get('https://api.opentact.org/rest/sip/connection/66eb0a8a-571e-41b1-8f50-4d97275cfab7/users', $headers);

```

{% endtab %}

{% tab title="Python" %}

```python
import requests

headers = {
    'accept': 'application/json',
    'X-Auth-Token': 'JWT_TOKEN',
}

response = requests.get('https://api.opentact.org/rest/sip/connection/66eb0a8a-571e-41b1-8f50-4d97275cfab7/users', headers=headers)

```

{% endtab %}

{% tab title="Javascript" %}

```javascript
var fetch = require('node-fetch');

fetch('https://api.opentact.org/rest/sip/connection/66eb0a8a-571e-41b1-8f50-4d97275cfab7/users', {
    headers: {
        'accept': 'application/json',
        'X-Auth-Token': 'JWT_TOKEN'
    }
});

```

{% endtab %}

{% tab title="Go" %}

```go
package main

import (
	"fmt"
	"io/ioutil"
	"log"
	"net/http"
)

func main() {
	client := &http.Client{}
	req, err := http.NewRequest("GET", "https://api.opentact.org/rest/sip/connection/66eb0a8a-571e-41b1-8f50-4d97275cfab7/users", nil)
	if err != nil {
		log.Fatal(err)
	}
	req.Header.Set("accept", "application/json")
	req.Header.Set("X-Auth-Token", "JWT_TOKEN")
	resp, err := client.Do(req)
	if err != nil {
		log.Fatal(err)
	}
	bodyText, err := ioutil.ReadAll(resp.Body)
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%s\n", bodyText)
}

```

{% endtab %}
{% endtabs %}

## CreateSIPUser

<mark style="color:green;">`POST`</mark> `https://api.opentact.org/rest/sip/connection/{uuid}/Users`

Create a new SIPUser

#### Headers

| Name         | Type   | Description      |
| ------------ | ------ | ---------------- |
| X.Auth-Token | string | JWT\_TOKEN       |
| Content-Type | string | application/json |

#### Request Body

| Name                  | Type   | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| --------------------- | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| login                 | string | `[ 7 .. 15 ] characters`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| password              | string | <p><code>^\[0-9a-f]{8}-\[0-9a-f]{4}-\[0-9a-f]{4}-\[0-9a-f]{4}-\[0-9a-f]{12}$</code><br>SIP connection uuid</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| first\_name           | string | `[ 1 .. 24 ] characters`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| last\_name            | string | `[ 1 .. 24 ] characters`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| email                 | string | <p><code>\[ 6 .. 80 ] characters</code><br>Remote SIP service IP</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| phone\_number         | number | `[ 3 .. 16 ]`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| avatar                | string | `[ 10 .. 255 ] characters`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| dob                   | string | <p>\<date-time><br>Date of birth</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| gender                | string | <p>Enum: <code>"Agender"</code> <code>"Androgyne"</code> <code>"Androgynous"</code> <code>"Bigender"</code> <code>"Cis"</code> <code>"Cisgender"</code> <code>"Cis Female"</code> <code>"Cis Male"</code> <code>"Cis Man"</code> <code>"Cis Woman"</code> <code>"Cisgender Female"</code> <code>"Cisgender Male"</code> <code>"Cisgender Man"</code> <code>"Cisgender Woman"</code> <code>"Female to Male"</code> <code>"FTM"</code> <code>"Gender Fluid"</code> <code>"Gender Nonconforming"</code> <code>"Gender Questioning"</code> <code>"Gender Variant"</code> <code>"Genderqueer"</code> <code>"Intersex"</code> <code>"Male to Female"</code> <code>"MTF"</code> <code>"Neither"</code> <code>"Neutrois"</code> <code>"Non-binary"</code> <code>"Other"</code> <code>"Pangender"</code> <code>"Trans"</code> <code>"Trans Female"</code> <code>"Trans Male"</code> <code>"Trans Man"</code> <code>"Trans Person"</code> <code>"Trans Woman"</code> <code>"Transfeminine"</code> <code>"Transgender"</code> <code>"Transgender Female"</code> <code>"Transgender Male"</code> <code>"Transgender Man"</code> <code>"Transgender Person"</code> <code>"Transgender Woman"</code> <code>"Transmasculine"</code> <code>"Transsexual"</code> <code>"Transsexual Female"</code> <code>"Transsexual Male"</code> <code>"Transsexual Man"</code> <code>"Transsexual Person"</code> <code>"Transsexual Woman"</code> <code>"Two-Spirit"</code><br></p> |
| remote\_ip            | string | `[ 7 .. 15 ] characters`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| sip\_connection\_uuid | string | <p><code>^\[0-9a-f]{8}-\[0-9a-f]{4}-\[0-9a-f]{4}-\[0-9a-f]{4}-\[0-9a-f]{12}$</code><br>SIP Connection uuid</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |

{% tabs %}
{% tab title="200 " %}

```javascript
{
  "success": true,
  "payload": {
    "created_on": "2019-08-24T14:15:22Z",
    "modified_on": "2019-08-24T14:15:22Z",
    "uuid": "string",
    "login": "string",
    "ha1": "string",
    "ha1b": "string",
    "remote_ip": "string",
    "first_name": "string",
    "last_name": "string",
    "email": "string",
    "phone_number": "string",
    "avatar": "string",
    "dob": "2019-08-24T14:15:22Z",
    "gender": "Agender",
    "groups": [],
    "sip_connection": {},
    "account": {},
    "created_by": {},
    "modified_by": {}
  }
}
```

{% endtab %}

{% tab title="201 " %}

```javascript
{
  "success": true,
  "payload": {
    "created_on": "2019-08-24T14:15:22Z",
    "modified_on": "2019-08-24T14:15:22Z",
    "uuid": "string",
    "login": "string",
    "ha1": "string",
    "ha1b": "string",
    "remote_ip": "string",
    "first_name": "string",
    "last_name": "string",
    "email": "string",
    "phone_number": "string",
    "avatar": "string",
    "dob": "2019-08-24T14:15:22Z",
    "gender": "Agender",
    "groups": [
      {}
    ],
    "sip_connection": {
      "created_on": "2019-08-24T14:15:22Z",
      "modified_on": "2019-08-24T14:15:22Z",
      "uuid": "string",
      "name": "string",
      "is_active": true,
      "tech_prefix": 0,
      "product": {},
      "subdomain": "string",
      "ip": "string",
      "port": 0,
      "class4_ingress_trunk_id": 0,
      "class4_ingress_trunk_settings": {},
      "class4_ingress_resource_ip_id": 0,
      "class4_egress_trunk_id": 0,
      "class4_egress_trunk_settings": {},
      "class4_egress_resource_ip_id": 0,
      "class4_trunk_prefix_id": 0,
      "tnleases": [],
      "sipusers": [],
      "sip_user_invites": [],
      "account": {},
      "created_by": {},
      "modified_by": {},
      "outbound_voice_profile": {}
    },
    "account": {
      "created_on": "2019-08-24T14:15:22Z",
      "modified_on": "2019-08-24T14:15:22Z",
      "uuid": "string",
      "name": "string",
      "email": "string",
      "level": "ServiceAccount",
      "balance": 0,
      "class4_id": 0,
      "deleted_on": "2019-08-24T14:15:22Z",
      "time_zone": {},
      "users": [],
      "admin": {},
      "messaging_profile_default": {},
      "messaging_profiles": [],
      "addresses": []
    },
    "created_by": {
      "created_on": "2019-08-24T14:15:22Z",
      "modified_on": "2019-08-24T14:15:22Z",
      "uuid": "string",
      "email": "string",
      "password": "string",
      "phone_number": "string",
      "first_name": "string",
      "last_name": "string",
      "avatar": "string",
      "gender": "Agender",
      "dob": "2019-08-24T14:15:22Z",
      "role": "Admin",
      "gmail_user_id": "string",
      "facebook_user_id": "string",
      "apple_user_id": "string",
      "wechat_user_id": "string",
      "deleted_on": "2019-08-24T14:15:22Z",
      "token": "string",
      "account": {}
    },
    "modified_by": {
      "created_on": "2019-08-24T14:15:22Z",
      "modified_on": "2019-08-24T14:15:22Z",
      "uuid": "string",
      "email": "string",
      "password": "string",
      "phone_number": "string",
      "first_name": "string",
      "last_name": "string",
      "avatar": "string",
      "gender": "Agender",
      "dob": "2019-08-24T14:15:22Z",
      "role": "Admin",
      "gmail_user_id": "string",
      "facebook_user_id": "string",
      "apple_user_id": "string",
      "wechat_user_id": "string",
      "deleted_on": "2019-08-24T14:15:22Z",
      "token": "string",
      "account": {}
    }
  }
}
```

{% endtab %}

{% tab title="401 Forbidden" %}

```javascript
{
  "success": false,
  "message": "string",
  "status": 0
}
```

{% endtab %}

{% tab title="404 SIP connection not found" %}

```javascript
{
  "success": false,
  "message": "string",
  "status": 0
}
```

{% endtab %}
{% endtabs %}

### Code Example

{% tabs %}
{% tab title="cURL" %}

```bash
curl -X POST "https://api.opentact.org/rest/sip/connection/user" -H  "accept: application/json" -H  "X-Auth-Token: JWT_TOKEN" -H  "Content-Type: application/json" -d "{\"login\":\"string\",\"password\":\"string\",\"first_name\":\"string\",\"last_name\":\"string\",\"email\":\"string\",\"phone_number\":\"string\",\"avatar\":\"string\",\"dob\":\"2020-10-29T14:01:11.604Z\",\"gender\":\"Agender\",\"remote_ip\":\"string\",\"sip_connection_uuid\":\"string\"}"
```

{% endtab %}

{% tab title="PHP" %}

```php
<?php
include('vendor/rmccue/requests/library/Requests.php');
Requests::register_autoloader();
$headers = array(
    'accept' => 'application/json',
    'X-Auth-Token' => 'JWT_TOKEN',
    'Content-Type' => 'application/json'
);
$data = '{"login":"string","password":"string","first_name":"string","last_name":"string","email":"string","phone_number":"string","avatar":"string","dob":"2020-10-29T14:01:11.604Z","gender":"Agender","remote_ip":"string","sip_connection_uuid":"string"}';
$response = Requests::post('https://api.opentact.org/rest/sip/connection/user', $headers, $data);

```

{% endtab %}

{% tab title="Python" %}

```python
import requests

headers = {
    'accept': 'application/json',
    'X-Auth-Token': 'JWT_TOKEN',
    'Content-Type': 'application/json',
}

data = '{"login":"string","password":"string","first_name":"string","last_name":"string","email":"string","phone_number":"string","avatar":"string","dob":"2020-10-29T14:01:11.604Z","gender":"Agender","remote_ip":"string","sip_connection_uuid":"string"}'

response = requests.post('https://api.opentact.org/rest/sip/connection/user', headers=headers, data=data)

```

{% endtab %}

{% tab title="Javascript" %}

```javascript
var fetch = require('node-fetch');

fetch('https://api.opentact.org/rest/sip/connection/user', {
    method: 'POST',
    headers: {
        'accept': 'application/json',
        'X-Auth-Token': 'JWT_TOKEN',
        'Content-Type': 'application/json'
    },
    body: JSON.stringify({"login":"string","password":"string","first_name":"string","last_name":"string","email":"string","phone_number":"string","avatar":"string","dob":"2020-10-29T14:01:11.604Z","gender":"Agender","remote_ip":"string","sip_connection_uuid":"string"})
});

```

{% endtab %}

{% tab title="Go" %}

```go
package main

import (
	"fmt"
	"io/ioutil"
	"log"
	"net/http"
	"strings"
)

func main() {
	client := &http.Client{}
	var data = strings.NewReader(`{"login":"string","password":"string","first_name":"string","last_name":"string","email":"string","phone_number":"string","avatar":"string","dob":"2020-10-29T14:01:11.604Z","gender":"Agender","remote_ip":"string","sip_connection_uuid":"string"}`)
	req, err := http.NewRequest("POST", "https://api.opentact.org/rest/sip/connection/user", data)
	if err != nil {
		log.Fatal(err)
	}
	req.Header.Set("accept", "application/json")
	req.Header.Set("X-Auth-Token", "JWT_TOKEN")
	req.Header.Set("Content-Type", "application/json")
	resp, err := client.Do(req)
	if err != nil {
		log.Fatal(err)
	}
	bodyText, err := ioutil.ReadAll(resp.Body)
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%s\n", bodyText)
}

```

{% endtab %}
{% endtabs %}

## ModifySIPUser

<mark style="color:purple;">`PATCH`</mark> `https://api.opentact.org/rest/sip/connection/user/{uuid}`

Modify SIPUser

#### Headers

| Name         | Type   | Description      |
| ------------ | ------ | ---------------- |
| X.Auth-Token | string | JWT\_TOKEN       |
| Content-Type | string | application/json |

#### Request Body

| Name                  | Type   | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| --------------------- | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| login                 | string | `[ 3 .. 60 ] characters`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| password              | string | <p><code>^\[0-9a-f]{8}-\[0-9a-f]{4}-\[0-9a-f]{4}-\[0-9a-f]{4}-\[0-9a-f]{12}$</code><br>SIP connection uuid</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| first\_name           | string | `[ 1 .. 24 ] characters`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| last\_name            | string | `[ 1 .. 24 ] characters`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| email                 | string | <p><code>\[ 6 .. 80 ] characters</code><br>Remote SIP service IP</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| phone\_number         | number | `[ 3 .. 16 ]`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| avatar                | string | `[ 10 .. 255 ] characters`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| dob                   | string | <p>\<date-time><br>Date of birth</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| gender                | string | <p>Enum: <code>"Agender"</code> <code>"Androgyne"</code> <code>"Androgynous"</code> <code>"Bigender"</code> <code>"Cis"</code> <code>"Cisgender"</code> <code>"Cis Female"</code> <code>"Cis Male"</code> <code>"Cis Man"</code> <code>"Cis Woman"</code> <code>"Cisgender Female"</code> <code>"Cisgender Male"</code> <code>"Cisgender Man"</code> <code>"Cisgender Woman"</code> <code>"Female to Male"</code> <code>"FTM"</code> <code>"Gender Fluid"</code> <code>"Gender Nonconforming"</code> <code>"Gender Questioning"</code> <code>"Gender Variant"</code> <code>"Genderqueer"</code> <code>"Intersex"</code> <code>"Male to Female"</code> <code>"MTF"</code> <code>"Neither"</code> <code>"Neutrois"</code> <code>"Non-binary"</code> <code>"Other"</code> <code>"Pangender"</code> <code>"Trans"</code> <code>"Trans Female"</code> <code>"Trans Male"</code> <code>"Trans Man"</code> <code>"Trans Person"</code> <code>"Trans Woman"</code> <code>"Transfeminine"</code> <code>"Transgender"</code> <code>"Transgender Female"</code> <code>"Transgender Male"</code> <code>"Transgender Man"</code> <code>"Transgender Person"</code> <code>"Transgender Woman"</code> <code>"Transmasculine"</code> <code>"Transsexual"</code> <code>"Transsexual Female"</code> <code>"Transsexual Male"</code> <code>"Transsexual Man"</code> <code>"Transsexual Person"</code> <code>"Transsexual Woman"</code> <code>"Two-Spirit"</code><br></p> |
| remote\_ip            | string | `[ 7 .. 15 ] characters`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| sip\_connection\_uuid | string | <p><code>^\[0-9a-f]{8}-\[0-9a-f]{4}-\[0-9a-f]{4}-\[0-9a-f]{4}-\[0-9a-f]{12}$</code><br>SIP Connection uuid</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |

{% tabs %}
{% tab title="200 " %}

```javascript
{
  "success": true,
  "payload": {
    "created_on": "2019-08-24T14:15:22Z",
    "modified_on": "2019-08-24T14:15:22Z",
    "uuid": "string",
    "login": "string",
    "ha1": "string",
    "ha1b": "string",
    "remote_ip": "string",
    "first_name": "string",
    "last_name": "string",
    "email": "string",
    "phone_number": "string",
    "avatar": "string",
    "dob": "2019-08-24T14:15:22Z",
    "gender": "Agender",
    "groups": [],
    "sip_connection": {},
    "account": {},
    "created_by": {},
    "modified_by": {}
  }
}
```

{% endtab %}

{% tab title="201 " %}

```javascript
{
  "success": true,
  "payload": {
    "created_on": "2019-08-24T14:15:22Z",
    "modified_on": "2019-08-24T14:15:22Z",
    "uuid": "string",
    "login": "string",
    "ha1": "string",
    "ha1b": "string",
    "remote_ip": "string",
    "first_name": "string",
    "last_name": "string",
    "email": "string",
    "phone_number": "string",
    "avatar": "string",
    "dob": "2019-08-24T14:15:22Z",
    "gender": "Agender",
    "groups": [
      {}
    ],
    "sip_connection": {
      "created_on": "2019-08-24T14:15:22Z",
      "modified_on": "2019-08-24T14:15:22Z",
      "uuid": "string",
      "name": "string",
      "is_active": true,
      "tech_prefix": 0,
      "product": {},
      "subdomain": "string",
      "ip": "string",
      "port": 0,
      "class4_ingress_trunk_id": 0,
      "class4_ingress_trunk_settings": {},
      "class4_ingress_resource_ip_id": 0,
      "class4_egress_trunk_id": 0,
      "class4_egress_trunk_settings": {},
      "class4_egress_resource_ip_id": 0,
      "class4_trunk_prefix_id": 0,
      "tnleases": [],
      "sipusers": [],
      "sip_user_invites": [],
      "account": {},
      "created_by": {},
      "modified_by": {},
      "outbound_voice_profile": {}
    },
    "account": {
      "created_on": "2019-08-24T14:15:22Z",
      "modified_on": "2019-08-24T14:15:22Z",
      "uuid": "string",
      "name": "string",
      "email": "string",
      "level": "ServiceAccount",
      "balance": 0,
      "class4_id": 0,
      "deleted_on": "2019-08-24T14:15:22Z",
      "time_zone": {},
      "users": [],
      "admin": {},
      "messaging_profile_default": {},
      "messaging_profiles": [],
      "addresses": []
    },
    "created_by": {
      "created_on": "2019-08-24T14:15:22Z",
      "modified_on": "2019-08-24T14:15:22Z",
      "uuid": "string",
      "email": "string",
      "password": "string",
      "phone_number": "string",
      "first_name": "string",
      "last_name": "string",
      "avatar": "string",
      "gender": "Agender",
      "dob": "2019-08-24T14:15:22Z",
      "role": "Admin",
      "gmail_user_id": "string",
      "facebook_user_id": "string",
      "apple_user_id": "string",
      "wechat_user_id": "string",
      "deleted_on": "2019-08-24T14:15:22Z",
      "token": "string",
      "account": {}
    },
    "modified_by": {
      "created_on": "2019-08-24T14:15:22Z",
      "modified_on": "2019-08-24T14:15:22Z",
      "uuid": "string",
      "email": "string",
      "password": "string",
      "phone_number": "string",
      "first_name": "string",
      "last_name": "string",
      "avatar": "string",
      "gender": "Agender",
      "dob": "2019-08-24T14:15:22Z",
      "role": "Admin",
      "gmail_user_id": "string",
      "facebook_user_id": "string",
      "apple_user_id": "string",
      "wechat_user_id": "string",
      "deleted_on": "2019-08-24T14:15:22Z",
      "token": "string",
      "account": {}
    }
  }
}
```

{% endtab %}

{% tab title="401 Forbidden" %}

```javascript
{
  "success": false,
  "message": "string",
  "status": 0
}
```

{% endtab %}

{% tab title="404 SIP connection not found" %}

```javascript
{
  "success": false,
  "message": "string",
  "status": 0
}
```

{% endtab %}
{% endtabs %}

### Code Example

{% tabs %}
{% tab title="cURL" %}

```bash
curl -X PATCH "https://api.opentact.org/rest/sip/connection/user/{uuid}" -H  "accept: application/json" -H  "X-Auth-Token: JWT_TOKEN" -H  "Content-Type: application/json" \
-d "{\"login\":\"string\",\"password\":\"string\",\"first_name\":\"string\",\"last_name\":\"string\",\"email\":\"string\",\"phone_number\":\"string\",\"avatar\":\"string\",\"dob\":\"2020-10-29T15:43:03.274Z\",\"gender\":\"Agender\",\"remote_ip\":\"string\",\"sip_connection_uuid\":\"string\"}"
```

{% endtab %}

{% tab title="PHP" %}

```php
<?php
include('vendor/rmccue/requests/library/Requests.php');
Requests::register_autoloader();
$headers = array(
    'accept' => 'application/json',
    'X-Auth-Token' => 'JWT_TOKEN',
    'Content-Type' => 'application/json'
);
$data = '{"login":"string","password":"string","first_name":"string","last_name":"string","email":"string","phone_number":"string","avatar":"string","dob":"2020-10-29T15:43:03.274Z","gender":"Agender","remote_ip":"string","sip_connection_uuid":"string"}';
$response = Requests::patch('https://api.opentact.org/rest/sip/connection/user/{uuid}', $headers, $data);

```

{% endtab %}

{% tab title="Python" %}

```python
import requests

headers = {
    'accept': 'application/json',
    'X-Auth-Token': 'JWT_TOKEN',
    'Content-Type': 'application/json',
}

data = '{"login":"string","password":"string","first_name":"string","last_name":"string","email":"string","phone_number":"string","avatar":"string","dob":"2020-10-29T15:43:03.274Z","gender":"Agender","remote_ip":"string","sip_connection_uuid":"string"}'

response = requests.patch('https://api.opentact.org/rest/sip/connection/user/%7Buuid%7D', headers=headers, data=data)

```

{% endtab %}

{% tab title="Javascript" %}

```javascript
var fetch = require('node-fetch');

fetch('https://api.opentact.org/rest/sip/connection/user/{uuid}', {
    method: 'PATCH',
    headers: {
        'accept': 'application/json',
        'X-Auth-Token': 'JWT_TOKEN',
        'Content-Type': 'application/json'
    },
    body: JSON.stringify({"login":"string","password":"string","first_name":"string","last_name":"string","email":"string","phone_number":"string","avatar":"string","dob":"2020-10-29T15:43:03.274Z","gender":"Agender","remote_ip":"string","sip_connection_uuid":"string"})
});

```

{% endtab %}

{% tab title="Go" %}

```go
package main

import (
	"fmt"
	"io/ioutil"
	"log"
	"net/http"
	"strings"
)

func main() {
	client := &http.Client{}
	var data = strings.NewReader(`{"login":"string","password":"string","first_name":"string","last_name":"string","email":"string","phone_number":"string","avatar":"string","dob":"2020-10-29T15:43:03.274Z","gender":"Agender","remote_ip":"string","sip_connection_uuid":"string"}`)
	req, err := http.NewRequest("PATCH", "https://api.opentact.org/rest/sip/connection/user/{uuid}", data)
	if err != nil {
		log.Fatal(err)
	}
	req.Header.Set("accept", "application/json")
	req.Header.Set("X-Auth-Token", "JWT_TOKEN")
	req.Header.Set("Content-Type", "application/json")
	resp, err := client.Do(req)
	if err != nil {
		log.Fatal(err)
	}
	bodyText, err := ioutil.ReadAll(resp.Body)
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%s\n", bodyText)
}

```

{% endtab %}
{% endtabs %}

## GetSIPUserByUUID

<mark style="color:blue;">`GET`</mark> `https://api.opentact.org/rest/sip/connection/user/{uuid}`

Get SIP user by UUID

#### Path Parameters

| Name | Type   | Description                                                      |
| ---- | ------ | ---------------------------------------------------------------- |
| uuid | string | `^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$` |

#### Headers

| Name         | Type   | Description |
| ------------ | ------ | ----------- |
| X.Auth-Token | string | JWT\_TOKEN  |

{% tabs %}
{% tab title="200 " %}

```javascript
{
  "success": true,
  "payload": {
    "created_on": "2019-08-24T14:15:22Z",
    "modified_on": "2019-08-24T14:15:22Z",
    "uuid": "string",
    "login": "string",
    "ha1": "string",
    "ha1b": "string",
    "remote_ip": "string",
    "first_name": "string",
    "last_name": "string",
    "email": "string",
    "phone_number": "string",
    "avatar": "string",
    "dob": "2019-08-24T14:15:22Z",
    "gender": "Agender",
    "groups": [],
    "sip_connection": {},
    "account": {},
    "created_by": {},
    "modified_by": {}
  }
}
```

{% endtab %}

{% tab title="401 Forbidden" %}

```javascript
{
  "success": false,
  "message": "string",
  "status": 401
}
```

{% endtab %}

{% tab title="404 " %}

```javascript
{
  "success": false,
  "message": "string",
  "status": 404
}
```

{% endtab %}
{% endtabs %}

### Code Example

{% tabs %}
{% tab title="cURL" %}

```bash
curl -X GET "https://api.opentact.org/rest/sip/connection/user/{uuid}" -H  "accept: application/json" -H  "X-Auth-Token: JWT_TOKEN"
```

{% endtab %}

{% tab title="PHP" %}

```php
<?php
include('vendor/rmccue/requests/library/Requests.php');
Requests::register_autoloader();
$headers = array(
    'accept' => 'application/json',
    'X-Auth-Token' => 'JWT_TOKEN'
);
$response = Requests::get('https://api.opentact.org/rest/sip/connection/user/{uuid}', $headers);

```

{% endtab %}

{% tab title="Python" %}

```python
import requests

headers = {
    'accept': 'application/json',
    'X-Auth-Token': 'JWT_TOKEN',
}

response = requests.get('https://api.opentact.org/rest/sip/connection/user/%7Buuid%7D', headers=headers)

```

{% endtab %}

{% tab title="Javascript" %}

```javascript
var fetch = require('node-fetch');

fetch('https://api.opentact.org/rest/sip/connection/user/{uuid}', {
    headers: {
        'accept': 'application/json',
        'X-Auth-Token': 'JWT_TOKEN'
    }
});

```

{% endtab %}

{% tab title="Go" %}

```go
package main

import (
	"fmt"
	"io/ioutil"
	"log"
	"net/http"
)

func main() {
	client := &http.Client{}
	req, err := http.NewRequest("GET", "https://api.opentact.org/rest/sip/connection/user/{uuid}", nil)
	if err != nil {
		log.Fatal(err)
	}
	req.Header.Set("accept", "application/json")
	req.Header.Set("X-Auth-Token", "JWT_TOKEN")
	resp, err := client.Do(req)
	if err != nil {
		log.Fatal(err)
	}
	bodyText, err := ioutil.ReadAll(resp.Body)
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%s\n", bodyText)
}

```

{% endtab %}
{% endtabs %}

## RemoveSIPUserByUUID

<mark style="color:red;">`DELETE`</mark> `https://api.opentact.org/rest/sip/connection/user/{uuid}`

Get SIP user by UUID

#### Path Parameters

| Name | Type   | Description                                                      |
| ---- | ------ | ---------------------------------------------------------------- |
| uuid | string | `^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$` |

#### Headers

| Name         | Type   | Description |
| ------------ | ------ | ----------- |
| X.Auth-Token | string | JWT\_TOKEN  |

{% tabs %}
{% tab title="200 " %}

```javascript
{
  "success": true,
  "payload": {
    "created_on": "2019-08-24T14:15:22Z",
    "modified_on": "2019-08-24T14:15:22Z",
    "uuid": "string",
    "login": "string",
    "ha1": "string",
    "ha1b": "string",
    "remote_ip": "string",
    "first_name": "string",
    "last_name": "string",
    "email": "string",
    "phone_number": "string",
    "avatar": "string",
    "dob": "2019-08-24T14:15:22Z",
    "gender": "Agender",
    "groups": [],
    "sip_connection": {},
    "account": {},
    "created_by": {},
    "modified_by": {}
  }
}
```

{% endtab %}

{% tab title="404 SIP user not found" %}

```javascript
{
  "success": false,
  "message": "string",
  "status": 404
}
```

{% endtab %}
{% endtabs %}

### Code Example

{% tabs %}
{% tab title="cURL" %}

```bash
curl -X DELETE "https://api.opentact.org/rest/sip/connection/user/{uuid}" \
-H  "accept: application/json" -H  "X-Auth-Token: JWT_TOKEN"
```

{% endtab %}

{% tab title="PHP" %}

```php
<?php
include('vendor/rmccue/requests/library/Requests.php');
Requests::register_autoloader();
$headers = array(
    'accept' => 'application/json',
    'X-Auth-Token' => 'JWT_TOKEN'
);
$response = Requests::delete('https://api.opentact.org/rest/sip/connection/user/{uuid}', $headers);

```

{% endtab %}

{% tab title="Python" %}

```python
import requests

headers = {
    'accept': 'application/json',
    'X-Auth-Token': 'JWT_TOKEN',
}

response = requests.delete('https://api.opentact.org/rest/sip/connection/user/%7Buuid%7D', headers=headers)

```

{% endtab %}

{% tab title="Javascript" %}

```javascript
var fetch = require('node-fetch');

fetch('https://api.opentact.org/rest/sip/connection/user/{uuid}', {
    method: 'DELETE',
    headers: {
        'accept': 'application/json',
        'X-Auth-Token': 'JWT_TOKEN'
    }
});
```

{% endtab %}

{% tab title="Go" %}

```go
package main

import (
	"fmt"
	"io/ioutil"
	"log"
	"net/http"
)

func main() {
	client := &http.Client{}
	req, err := http.NewRequest("DELETE", "https://api.opentact.org/rest/sip/connection/user/{uuid}", nil)
	if err != nil {
		log.Fatal(err)
	}
	req.Header.Set("accept", "application/json")
	req.Header.Set("X-Auth-Token", "JWT_TOKEN")
	resp, err := client.Do(req)
	if err != nil {
		log.Fatal(err)
	}
	bodyText, err := ioutil.ReadAll(resp.Body)
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%s\n", bodyText)
}

```

{% endtab %}
{% endtabs %}
