Accounts

The following endpoints can be used to get, add, update and delete Oktopost accounts.

List Accounts

Example Request

curl -i https://reseller.oktopost.com/account?query=Acme

Example Result

{
    "Result": true,
    "Items": [
        {
            "Id": "001000000000001",
            "Name": "Acme",
            "Created": "2017-06-01 00:00:00",
            "Status": "active",
            "LicenseId": "017_SUB_XXXXX_V7",
            "LastLogin": "2017-06-1 12:00:00",
            "Timezone": "America/New_York",
            "CredentialCount": 0,
            "CampaignCount": 0,
            "OwnerName": "John Doe",
            "TotalUsers": 1,
            "ActiveUsers": "1",
            "ActiveBoardUsers": "0",
            "ExternalID": null
        }
    ],
    "Total": 1
}

Get Account

Example Request

curl -i https://reseller.oktopost.com/account/001000000000001

Example Result

{
    "Result": true,
    "Items": [
        {
            "Id": "001000000000001",
            "Name": "Acme",
            "Created": "2017-06-01 00:00:00",
            "Status": "active",
            "LicenseId": "017_SUB_XXXXX_V7",
            "LastLogin": "2017-06-1 12:00:00",
            "Timezone": "America/New_York",
            "CredentialCount": 0,
            "CampaignCount": 0,
            "OwnerName": "John Doe",
            "TotalUsers": 1,
            "ActiveUsers": "1",
            "ActiveBoardUsers": "0",
            "ExternalID": null
        }
    ],
    "Total": 1
}	

Create Account

Example Request

curl -i https://reseller.oktopost.com/account -X POST \
-d firstName="John"
-d lastName="Doe"
-d company="Acme Inc"
-d email="john.doe@acme.com"
-d password="123456"
-d licenseId="017_SUB_XXXX_V7"
-d eid="EXTERNAL_ID"

The eid represents your internal system identifier. If left empty, this field will simply be ignored. If used, you will not be able to use it again for account creation but, you will be able to search, get and update accounts using it instead of the standard Oktopost account id.

Example Result

{
	"Result": true,
	"data": {
		"NewAccountId": "001000000000001",
		"NewAccountName": "Acme",
		"LicenseId": "017_SUB_XXXX_V7",
		"OwnerFirstName": "John",
		"OwnerLastName": "Doe",
		"OwnerEmail": "john.doe@acme.com",
		"OwnerUserId": "00A000000000001",
		"OwnerApiKey": "2c51539e18e1f54ef0520b8529688ca757ac56dc01cd39.XXXXXXX"
	}
}

Update Account

Example Request

curl -i https://reseller.oktopost.com/account/001000000000001 -X POST \
-d status="active|inactive"
-d company="Acme"
-d licenseId="017_SUB_XXXX_V7"	

Example Result

{
	"Result": true
}

Feedback and Knowledge Base