Account
GetAccount
GET
https://api.opentact.org/rest/account
Get current user account
Headers
Authorization
string
Bearer
Content-Type
string
application/json
{
"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": {}
}
}
{
"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": {}
}
}
{
"success": false,
"message": "string",
"status": 0
}
{
"success": false,
"message": "string",
"status": 0
}
Code Example
curl -X GET "https://api.opentact.org/rest/account" -H "accept: application/json" -H "Authorization: BEARER_TOKEN"
<?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);
import requests
headers = {
'accept': 'application/json',
'Authorization': 'BEARER_TOKEN',
}
response = requests.get('https://api.opentact.org/rest/account', headers=headers)
var fetch = require('node-fetch');
fetch('https://api.opentact.org/rest/account', {
headers: {
'accept': 'application/json',
'Authorization': 'BEARER_TOKEN'
}
});
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)
}
AddUserToAccount
POST
https://api.opentact.org/rest/account/user
Add user to account
Headers
X-Auth-Token
string
JWT
Content-Type
string
application/json
Request Body
account
object
(IAccountNewParams)
role
string
(EUserRole)
Enum: "Admin"
"User"
"Provider"
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
string
[ 5 .. 80 ] characters
phone_number
number
[ 3 .. 16 ]
gender
string
Enum: "Agender"
"Androgyne"
"Androgynous"
"Bigender"
"Cis"
"Cisgender"
"Cis Female"
"Cis Male"
"Cis Man"
"Cis Woman"
"Cisgender Female"
"Cisgender Male"
"Cisgender Man"
"Cisgender Woman"
"Female to Male"
"FTM"
"Gender Fluid"
"Gender Nonconforming"
"Gender Questioning"
"Gender Variant"
"Genderqueer"
"Intersex"
"Male to Female"
"MTF"
"Neither"
"Neutrois"
"Non-binary"
"Other"
"Pangender"
"Trans"
"Trans Female"
"Trans Male"
"Trans Man"
"Trans Person"
"Trans Woman"
"Transfeminine"
"Transgender"
"Transgender Female"
"Transgender Male"
"Transgender Man"
"Transgender Person"
"Transgender Woman"
"Transmasculine"
"Transsexual"
"Transsexual Female"
"Transsexual Male"
"Transsexual Man"
"Transsexual Person"
"Transsexual Woman"
"Two-Spirit"
{
"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": {}
}
}
{
"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": {}
}
}
{
"success": false,
"message": "string",
"status": 0
}
{
"success": false,
"message": "string",
"status": 0
}
Code Example
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\"}}"
<?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);
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)
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"}})
});
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)
}
GetUsersByAccount
GET
https://api.opentact.org/rest/account/user
Get account users
Headers
X-Auth-Token
string
JWT
{
"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": {}
}
]
}
{
"success": false,
"message": "string",
"status": 400
}
Code Example
curl -X GET "https://api.opentact.org/rest/account/user" -H "accept: application/json" -H "X-Auth-Token: JWT_TOKEN"
<?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);
import requests
headers = {
'accept': 'application/json',
'X-Auth-Token': 'JWT_TOKEN',
}
response = requests.get('https://api.opentact.org/rest/account/user', headers=headers)
var fetch = require('node-fetch');
fetch('https://api.opentact.org/rest/account/user', {
headers: {
'accept': 'application/json',
'X-Auth-Token': 'JWT_TOKEN'
}
});
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)
}
GetAccountByUUID
GET
https://api.opentact.org/rest/account/{uuid}
Get user account by uuid
Headers
Authorisation
string
Bearer
Request Body
uuid
string
^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
{
"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": {}
}
]
}
}
{
"success": false,
"message": "string",
"status": 401
}
{
"success": false,
"message": "string",
"status": 404
}
Code Example
curl -X GET "https://api.opentact.org/rest/account/{uuid}" -H "accept: application/json" -H "Authorization: BEARER_TOKEN"
<?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);
import requests
headers = {
'accept': 'application/json',
'Authorization': 'BEARER_TOKEN',
}
response = requests.get('https://api.opentact.org/rest/account/%7Buuid%7D', headers=headers)
var fetch = require('node-fetch');
fetch('https://api.opentact.org/rest/account/{uuid}', {
headers: {
'accept': 'application/json',
'Authorization': 'BEARER_TOKEN'
}
});
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);
DeactivateUserAccountByUUID
DELETE
https://api.opentact.org/rest/account/user/{uuid}
Deactivate user account
Headers
Content-Type
string
application/json
X-Auth-Type
string
JWT
Request Body
uuid
string
^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
{
"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": {}
}
]
}
{
"success": false,
"message": "string",
"status": 400
}
{
"success": false,
"message": "string",
"status": 404
}
Code Example
curl -X DELETE "https://api.opentact.org/rest/account/user/{uuid}" -H "accept: application/json" -H "X-Auth-Token: JWT_TOKEN"
<?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);
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)
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'
}
});
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)
}
ReactivateUserAccountByUUID
PUT
https://api.opentact.org/rest/account/user/{uuid}
Reactivate user account
Headers
Content-Type
string
application/json
X-Auth-Type
string
JWT
Request Body
uuid
string
^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
{
"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": {}
}
]
}
{
"success": false,
"message": "string",
"status": 401
}
{
"success": false,
"message": "string",
"status": 404
}
Code Example
curl -X PUT "https://api.opentact.org/rest/account/user/{uuid}" -H "accept: application/json" -H "X-Auth-Token: JWT_TOKEN"
<?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);
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)
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'
}
});
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)
}
Last updated
Was this helpful?