The Administration API is used to provision and manage accounts that will store your customers data. Each account is isolated from one another unless access is granted via sharing settings or setting the datashare flag when creating the account.

A Postman collection is available to use this API at the bottom of this page

This API is NOT used to access the chart of accounts of a company or any company data like a balance sheet. It is only used to manage accounts to store your customers data. See API for accessing your customers data.


Creating Accounts

You can create a new account via a POST request (using basic auth) to https://admin.myintranetapps.com/app/api.php with an "Account-Key" header set to "XXXX"  (where XXXX is your account key) that contains a JSON body that looks like:

{
  "name": "new client name",
  "package_id": "9",
  "active": "1",
  "email_admin": "newaccountadmin@email.com",
  "password": "newadminpassword",
  "subdomain": "example",
  "type": "standard",
  "domain": "www.redirect.com",
  "datashare": "1"
}
JSON

Parameter

Definition

name

The human readable name of the company you are adding an account for, typically the legal name this is displayed to the user.

package_id

Specifies an identifier for a collection of account settings called a `package` 

active

A flag that indicates you want this account to be active on creation. Either 0 or 1.

email_admin

Address that indicates the email we should use for communication to the manager of the account, reasons for sending an email might include sending system service/maintenance notices or requests to re-authorize an integration if access has been revoked for some reason

password

Used to allow the default "admin" account to login with the given password, leave this blank to disable admin login 

subdomain

Required as each new account is accessible under its own subdomain of myintranetapps.com, the text you specify here will be used to create a domain like "my-company.myintranetapps.com

type

Indicates the account type which is either "reseller" or "standard", for your purposes you should leave this as standard

domain

An optional field used when you want to add a custom (DNS CNAME) domain name to the system instead of using the myintranetapps.com domain , you shouldn't need this field and can leave blank

datashare

Indicates that you want the account setup with permissions already active to allow full sharing with the master account, this should be set to "1" for your use case

The response you get back will be in JSON and look like:

{
  "status_code":200,
  "message":"Account successfully created",
  "account_key":"<<<UNIQUE_KEY>>>"
}
JSON

You should save the unique key for future reference in your system, you will use this unique account key whenever you need to interact with this account in the future

Listing Accounts

You can list all accounts previously created via a POST request (using basic auth) to https://admin.myintranetapps.com/app/api.php with an "Account-Key" header set to "XXXX"  (where XXXX is your account key) that contains a JSON body that looks like:

{
  "action": "list_accounts"
}
JSON

The response you get back will be in JSON and look like:

{
  "status_code":200,
  "message": "Accounts list successfully generated",
  "accounts":[
    {
      "name": "General Company Ltd",
      "key": "5a70d8fcd44aa9.76285892",
      "subdomain": "generalco",
      "domain":  "",
      "package_id":  "93",
      "email_admin": "cfo@example.com"
    }
  ]
}
JSON

Updating Accounts

You can update an account previously created via a POST request (using basic auth) to https://admin.myintranetapps.com/app/api.php with an "Account-Key" header set to "XXXX"  (where XXXX is your account key) that contains a JSON body that looks like:

{
  "action": "update_account",
  "account_key": "5a70d8fcd44aa9.76285892",
  "package_id": "9",
  "active": "1",
  "email_admin": "newaccountadmin@email.com"
}
JSON

Property called "account_key" must be set to the value of the account key of the account to update. Following properties of the JSON posted are optional: "package_id", "active", "email_admin", but there must be at least one property set to perform an update.

The response you get back will be in JSON and look like:

{
  "status_code":200,
  "message":"Account successfully updated",
  "account_key": "5a70d8fcd44aa9.76285892"
}
JSON

If something goes wrong while processing your POST request ("status_code" value will differ from 200), the "message" property will contain an error description.


Postman Collection

Administration.postman_collection.json

Collection environment variables:

Variable

Value

Description

admin_subdomain

admin

Unless you have a custom domain this should be set to admin

baseurl

myintranetapps.com

myintranetapps.ca

Either myintranetapps.com or myintranetapps.ca unless you are using a custom domain

account_key

<YOUR ACCOUNT KEY>

The unique alphanumeric key assigned to your account. This will be sent in the header of each API request. e.g. 5a50d8fed44aa9.76285894

username

<YOUR USER NAME>

A user from your account that is part of the admins group

password

<YOUR PASSWORD>

The password of your user