# Account

## GetAccount

<mark style="color:blue;">`GET`</mark> `https://api.opentact.org/rest/account`

Get current user account

#### Headers

| Name          | Type   | Description      |
| ------------- | ------ | ---------------- |
| Authorization | string | Bearer           |
| Content-Type  | string | application/json |

{% 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": {},
    "account": {},
    "created_by": {},
    "modified_by": {}
  }
}
```

{% 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 GET "https://api.opentact.org/rest/account" -H  "accept: application/json" -H  "Authorization: BEARER_TOKEN"

```

{% endtab %}

{% tab title="PHP" %}

```php
<?php
include('vendor/rmccue/requests/library/Requests.php');
Requests::register_autoloader();
$headers = array(
    'accept' => 'application/json',
    'Authorization' => 'BEARER_TOKEN'
);
$response = Requests::get('https://api.opentact.org/rest/account', $headers);

```

{% endtab %}

{% tab title="Python" %}

```python
import requests

headers = {
    'accept': 'application/json',
    'Authorization': 'BEARER_TOKEN',
}

response = requests.get('https://api.opentact.org/rest/account', headers=headers)

```

{% endtab %}

{% tab title="Javascript" %}

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

fetch('https://api.opentact.org/rest/account', {
    headers: {
        'accept': 'application/json',
        'Authorization': 'BEARER_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/account", nil)
	if err != nil {
		log.Fatal(err)
	}
	req.Header.Set("accept", "application/json")
	req.Header.Set("Authorization", "BEARER_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 %}

## AddUserToAccount

<mark style="color:green;">`POST`</mark> `https://api.opentact.org/rest/account/user`

Add user to account

#### Headers

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

#### Request Body

| Name          | Type   | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| ------------- | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| account       | object | (IAccountNewParams)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| role          | string | <p>(EUserRole)<br>Enum: <code>"Admin"</code> <code>"User"</code> <code>"Provider"</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| avatar        | string | `[ 10 .. 255 ] characters`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| dob           | string | `<date-time>`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| password      | string | `[ 3 .. 255 ] characters`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| first\_name   | string | `[ 1 .. 24 ] characters`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| last\_name    | string | `[ 1 .. 24 ] characters`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| email         | string | <p><code>\[ 5 .. 80 ] characters</code><br></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| phone\_number | number | `[ 3 .. 16 ]`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| 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> |

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

```javascript
{
  "success": true,
  "payload": {
    "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="201 " %}

```javascript
{
  "success": true,
  "payload": {
    "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 " %}

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

{% endtab %}

{% tab title="409 User already exists." %}

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

{% endtab %}
{% endtabs %}

### Code Example

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

```bash
curl -X POST "https://api.opentact.org/rest/account/user" -H  "accept: application/json" -H  "X-Auth-Token: JWT_TOKEN" -H  "Content-Type: application/json" -d "{\"email\":\"string\",\"password\":\"string\",\"phone_number\":\"string\",\"first_name\":\"string\",\"last_name\":\"string\",\"gender\":\"Agender\",\"dob\":\"2020-11-05T15:04:08.993Z\",\"avatar\":\"string\",\"role\":\"Admin\",\"account\":{\"name\":\"string\",\"email\":\"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 = '{"email":"string","password":"string","phone_number":"string","first_name":"string","last_name":"string","gender":"Agender","dob":"2020-11-05T15:04:08.993Z","avatar":"string","role":"Admin","account":{"name":"string","email":"string"}}';
$response = Requests::post('https://api.opentact.org/rest/account/user', $headers, $data);

```

{% endtab %}

{% tab title="Python" %}

```python
import requests

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

data = '{"email":"string","password":"string","phone_number":"string","first_name":"string","last_name":"string","gender":"Agender","dob":"2020-11-05T15:04:08.993Z","avatar":"string","role":"Admin","account":{"name":"string","email":"string"}}'

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

```

{% endtab %}

{% tab title="Javascript" %}

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

fetch('https://api.opentact.org/rest/account/user', {
    method: 'POST',
    headers: {
        'accept': 'application/json',
        'X-Auth-Token': 'JWT_TOKEN',
        'Content-Type': 'application/json'
    },
    body: JSON.stringify({"email":"string","password":"string","phone_number":"string","first_name":"string","last_name":"string","gender":"Agender","dob":"2020-11-05T15:04:08.993Z","avatar":"string","role":"Admin","account":{"name":"string","email":"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(`{"email":"string","password":"string","phone_number":"string","first_name":"string","last_name":"string","gender":"Agender","dob":"2020-11-05T15:04:08.993Z","avatar":"string","role":"Admin","account":{"name":"string","email":"string"}}`)
	req, err := http.NewRequest("POST", "https://api.opentact.org/rest/account/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 %}

## GetUsersByAccount

<mark style="color:blue;">`GET`</mark> `https://api.opentact.org/rest/account/user`

Get account users

#### Headers

| Name         | Type   | Description |
| ------------ | ------ | ----------- |
| X-Auth-Token | string | JWT         |

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

```javascript
{
  "success": true,
  "payload": [
    {
      "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="400 " %}

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

{% endtab %}
{% endtabs %}

### Code Example

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

```bash
curl -X GET "https://api.opentact.org/rest/account/user" -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/account/user', $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/account/user', headers=headers)

```

{% endtab %}

{% tab title="Javascript" %}

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

fetch('https://api.opentact.org/rest/account/user', {
    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/account/user", 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 %}

## GetAccountByUUID

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

Get user account by uuid

#### Headers

| Name          | Type   | Description |
| ------------- | ------ | ----------- |
| Authorisation | string | Bearer      |

#### Request Body

| 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}$` |

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

```javascript
{
  "success": true,
  "payload": {
    "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": {
      "created_on": "2019-08-24T14:15:22Z",
      "modified_on": "2019-08-24T14:15:22Z",
      "country_code": "st",
      "name": "string",
      "utc_offset": -1024,
      "utc_dst_offset": -1024,
      "latitude": "string",
      "longitude": "string",
      "note": "string"
    },
    "users": [
      {}
    ],
    "admin": {
      "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": {}
    },
    "messaging_profile_default": {
      "created_on": "2019-08-24T14:15:22Z",
      "modified_on": "2019-08-24T14:15:22Z",
      "uuid": "string",
      "name": "string",
      "callback_url": "string",
      "callback_url2": "string",
      "number_pool_enable": true,
      "long_code_weight": 0,
      "tollfree_weight": 0,
      "skip_unhealthy_tns": true,
      "sticky_sender": true,
      "account": {},
      "created_by": {},
      "modified_by": {},
      "leases": []
    },
    "messaging_profiles": [
      {
        "created_on": "2019-08-24T14:15:22Z",
        "modified_on": "2019-08-24T14:15:22Z",
        "uuid": "string",
        "name": "string",
        "callback_url": "string",
        "callback_url2": "string",
        "number_pool_enable": true,
        "long_code_weight": 0,
        "tollfree_weight": 0,
        "skip_unhealthy_tns": true,
        "sticky_sender": true,
        "account": {},
        "created_by": {},
        "modified_by": {},
        "leases": []
      }
    ],
    "addresses": [
      {
        "created_on": "2019-08-24T14:15:22Z",
        "modified_on": "2019-08-24T14:15:22Z",
        "uuid": "string",
        "name": "string",
        "is_physical": true,
        "is_billing": true,
        "is_shipping": true,
        "address1": "string",
        "address2": "string",
        "zip_code": "string",
        "city": "string",
        "country": {},
        "user": {},
        "account": {},
        "created_by": {},
        "modified_by": {}
      }
    ]
  }
}
```

{% endtab %}

{% tab title="401 " %}

```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/account/{uuid}" -H  "accept: application/json" -H  "Authorization: BEARER_TOKEN"

```

{% endtab %}

{% tab title="PHP" %}

```php
<?php
include('vendor/rmccue/requests/library/Requests.php');
Requests::register_autoloader();
$headers = array(
    'accept' => 'application/json',
    'Authorization' => 'BEARER_TOKEN'
);
$response = Requests::get('https://api.opentact.org/rest/account/{uuid}', $headers);

```

{% endtab %}

{% tab title="Python" %}

```python
import requests

headers = {
    'accept': 'application/json',
    'Authorization': 'BEARER_TOKEN',
}

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

```

{% endtab %}

{% tab title="Javascript" %}

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

fetch('https://api.opentact.org/rest/account/{uuid}', {
    headers: {
        'accept': 'application/json',
        'Authorization': 'BEARER_TOKEN'
    }
});

```

{% endtab %}

{% tab title="Go" %}

```go
var request = require('request');

var headers = {
    'accept': 'application/json',
    'Authorization': 'BEARER_TOKEN'
};

var options = {
    url: 'https://api.opentact.org/rest/account/{uuid}',
    headers: headers
};

function callback(error, response, body) {
    if (!error && response.statusCode == 200) {
        console.log(body);
    }
}

request(options, callback);

```

{% endtab %}
{% endtabs %}

## DeactivateUserAccountByUUID

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

Deactivate user account

#### Headers

| Name         | Type   | Description      |
| ------------ | ------ | ---------------- |
| Content-Type | string | application/json |
| X-Auth-Type  | string | JWT              |

#### Request Body

| 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}$` |

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

```javascript
{
  "success": true,
  "payload": [
    {
      "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 " %}

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

{% endtab %}

{% tab title="404 " %}

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

{% endtab %}
{% endtabs %}

### Code Example

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

```bash
curl -X DELETE "https://api.opentact.org/rest/account/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/account/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/account/user/%7Buuid%7D', headers=headers)

```

{% endtab %}

{% tab title="Javascript" %}

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

fetch('https://api.opentact.org/rest/account/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/account/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 %}

## ReactivateUserAccountByUUID

<mark style="color:orange;">`PUT`</mark> `https://api.opentact.org/rest/account/user/{uuid}`

Reactivate user account

#### Headers

| Name         | Type   | Description      |
| ------------ | ------ | ---------------- |
| Content-Type | string | application/json |
| X-Auth-Type  | string | JWT              |

#### Request Body

| 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}$` |

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

```javascript
{
  "success": true,
  "payload": [
    {
      "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 " %}

```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 PUT "https://api.opentact.org/rest/account/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::put('https://api.opentact.org/rest/account/user/{uuid}', $headers);

```

{% endtab %}

{% tab title="Python" %}

```python
import requests

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

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

```

{% endtab %}

{% tab title="Javascript" %}

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

fetch('https://api.opentact.org/rest/account/user/{uuid}', {
    method: 'PUT',
    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("PUT", "https://api.opentact.org/rest/account/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 %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://dantonia.gitbook.io/test/account.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
