Top

Subaccounts

Get Subaccounts
GET /app/api/subaccounts/
Returns information about subaccounts of the API caller account.
Post Subaccount
POST /app/api/subaccounts/
Creates a new subaccount for the API caller account or one of its subaccounts.
Put Subaccount
PUT /app/api/subaccounts/
Updates information on the subaccount of the API caller account.
Delete Subaccount
DELETE /app/api/subaccounts/:account_id/
Deletes the subaccount of the API caller account.

Get Subaccount Information

GET  /app/api/subaccounts/

Returns information about the subaccounts of the API caller account.

Response: JSON array

account_id int (12)
Returns accounts by id.
name string (255)
Returns account name.
desc string (255)
Returns account description.
type string (255)
Returns account type. [public | private]
owner_id int (12)
Returns ID of the account owner.
created_date string
Returns account creation timestamp [yyyy-mm-dd hh:mm:ss].
last_updated string
Returns account data last updated timestamp [yyyy-mm-dd hh:mm:ss].
region string (255)
Returns account default geographic region.

Sample Response


Status: 200 OK
Content Type: application/json;charset=UTF-8
{
  "code": 0,
  "message": "success",
    {
      "account_id": "12345",
      "name": "PeopleKeys API",
      "desc": "The Official PeopleKeys API",
      "type": "private",
      "owner_id": "578",
      "created_date": 2015-01-15 00:09:30,
      "last_updated": 2015-01-15 00:10:37,
      "region": "en_US"
    },
    ...
}


Post Subaccount Information

POST  /app/api/subaccounts/

Creates a new subaccount for the API caller account or one of its subaccounts.

HTTP Form Parameters

account_id int (12)
Posts accounts by id.
name string (255)
Posts account name.
desc string (255)
Posts account description.
type string (255)
Posts account type. [public | private]
region string (255)
Posts account default geographic region.

Sample Response


Status: 201 OK
Content Type: application/json;charset=UTF-8
{
  "code": 0,
  "message": "success",
    {
      "account_id": "12345",
      "name": "PeopleKeys API",
      "desc": "The Official PeopleKeys API",
      "type": "private",
      "region": "en_US"
    }
}


Put Subaccount Information

PUT  /app/api/subaccounts/

Updates information on the subaccount of the API caller account.

HTTP Form Parameters

account_id int (12)
Puts accounts by id.
name string (255)
Puts account name.
desc string (255)
Puts account description.
type string (255)
Puts account type. [public | private]
region string (255)
Puts account default geographic region.

Sample Response


Status: 200 OK
Content Type: application/json;charset=UTF-8
{
  "code": 0,
  "message": "success",
    {
      "account_id": "12345",
      "name": "PeopleKeys API",
      "desc": "The Official PeopleKeys API",
      "type": "private",
      "region": "en_US"
    }
}


Delete Subaccount Information

DELETE  /app/api/subaccounts/:account_id/

Deletes the subaccount of the API caller account

HTTP GET Parameters

account_id int (12)
ID of the account to delete.

Sample Response


Status: 200 OK
Content Type: application/json;charset=UTF-8
{
  "code": 0,
  "message": "success",
    {
      "account_id": "12345"
     
    }
}