Account

GetAccount

GET https://api.opentact.org/rest/account

Get current user account

Headers

Name
Type
Description

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": {}
  }
}

Code Example

curl -X GET "https://api.opentact.org/rest/account" -H  "accept: application/json" -H  "Authorization: BEARER_TOKEN"

AddUserToAccount

POST 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

(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

email

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": {}
  }
}

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\"}}"

GetUsersByAccount

GET https://api.opentact.org/rest/account/user

Get account users

Headers

Name
Type
Description

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": {}
    }
  ]
}

Code Example

curl -X GET "https://api.opentact.org/rest/account/user" -H  "accept: application/json" -H  "X-Auth-Token: JWT_TOKEN"

GetAccountByUUID

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

{
  "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": {}
      }
    ]
  }
}

Code Example

curl -X GET "https://api.opentact.org/rest/account/{uuid}" -H  "accept: application/json" -H  "Authorization: BEARER_TOKEN"

DeactivateUserAccountByUUID

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

{
  "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": {}
    }
  ]
}

Code Example

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

ReactivateUserAccountByUUID

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

{
  "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": {}
    }
  ]
}

Code Example

curl -X PUT "https://api.opentact.org/rest/account/user/{uuid}" -H  "accept: application/json" -H  "X-Auth-Token: JWT_TOKEN"

Last updated

Was this helpful?