Creating Accounts

The accountCreate API call will create a new SquidVault for your customer or request access if they already have one.

If successful, the customer will receive an email instructing them on how to either finish setting up their Vault or to approve your request to add folders/files to their pre-existing Vault.

If un-successful (i.e. an account exists), expired customers will receive an email instructing them on how to re-activate their Vault and automatic removal (see below) will be suspended for at least a month to allow ample time for re-activation. Live customers will remain completely unaffected by this call.

All customers created through the API (i.e. where "primary" is true - see below) are pre-approved and will automatically get 1 year's subscription and you will be charged for this.

It's important to note that all customers must have a unique ID (sometimes refered to as "contID" or "contactID"). This is how you will identify them in future API calls and it MUST be an integer value.

The same can be said for the customer's email address as this will be the customer's login user name and how the system will contact them.

If the customer does not pay to activate or renew an account, after any free or pre-paid period lapses, the account will be scheduled for automatic removal.

JSON request

Parameters:
uid: Your own unique reference for this customer (see above).
title: [optional] If missing, the user is asked for this during activation.
firstnames: [optional] If missing, the user is asked for this during activation.
surname: [optional] If missing, the user will is asked for this during activation.
{
  "action": "accountCreate",
  "uid": 1001
  "email": "test.person@gmail.com",
  "title": "mr",
  "firstnames": "john William",
  "surname": "smith",
}

JSON response

Success:

{
  "error": "",
  "status": "success",
  "data": "-- Base64 encoded AES-256-CBC encrypted JSON --",
  "action": "accountCreate",
  "version": "1.07",
  "proc_time": 1651311145,
  "proc_id": 32
}

"data" (decrypted)
{
  "uid": 1001,
  "expires": 1682847145,
  "added": 1651311145,
  "approved": 1651311145,
  "expired": 0,
  "primary": "true"
}

Failure:

{
  "error": "customer account already exists",
  "status": "failure",
  "data": "-- Base64 encoded AES-256-CBC encrypted JSON --",
  "action": "accountCreate",
  "version": "1.07",
  "proc_time": 1651311168,
  "proc_id": 33
}

"data" (decrypted)
{
    "uid":1001,
    "added":1651311145,
    "approved":1651311145,
    "expired":1672347145
}

Decrypted Data Fields

uid: Your own unique ID for this customer.

expires: The customer's subscription renewal date.

added: Unix timestamp for when the customer was created or access requested.

approved: Unix timestamp for when the customer approved your access. If a customer pre-exists (already has an account), this will be zero.

primary: True, if the customer was directly created by you and not pre-existing.

expired: If greater than zero, this is a unix timestamp for the point when the subscription lapsed for this existing account.

Common errors

email invalid or missing: The email address is invalid or missing from the API call.

uid invalid or missing: The unique ID is invalid or missing from the API call.

uid needs to be an INTEGER: The unique ID must have an integer value.

customer account already exists: You already have a customer with that email address.

uid already exists: You already a customer with that unique ID.

<?php
	print_r(
		request(
			['action'=>'accountCreate', 'uid'=>1001, 'email'=>'test.person@gmail.com', 'title'=>'mr', 'firstnames'=>'John William', 'surname'=>'Smith']
		)
	);

    /*############### OUTPUT ##################
    
	Array(
        [error] => 
        [status] => success
        [data] => {"uid":1001,"expires":1682847145,"added":1651311145,"approved":1651311145,"primary":"true"}
        [action] => accountCreate
        [version] => 1.07
        [proc_time] => 1651311145
        [proc_id] => 32
    )

    #########################################*/

?>
Copy Code