Oktopost

Accounts

Provision Oktopost instances for your customers and manage account information and usage metrics.

Partner Access Only

These endpoints are built exclusively for partners who can provision Oktopost accounts for their customers. If you want more details about becoming a partner, please contact us.

List Accounts

Retrieve a list of all accounts you manage. Supports optional search filtering.

Example Request

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

Example Response

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

Retrieve details for a specific account by ID.

Example Request

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

Example Response

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

Provision a new Oktopost account for a customer.

Parameters

ParameterTypeRequiredDescription
firstNameStringYesAccount owner's first name.
lastNameStringYesAccount owner's last name.
companyStringYesCompany name.
emailStringYesAccount owner's email address.
passwordStringYesInitial password for the account owner.
licenseIdStringYesLicense identifier for this account.
eidStringNoExternal ID from your system. Once set, this value is unique and can be used to reference the account instead of the Oktopost account ID.

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 parameter represents your internal system identifier. If left empty, this field will be ignored. If used, the value must be unique and cannot be reused for other accounts. Once set, you can use it to search, retrieve, and update accounts instead of the standard Oktopost account ID.

Example Response

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

Update account status, company name, or license information.

Parameters

ParameterTypeRequiredDescription
statusStringNoAccount status. Accepted values: active, inactive
companyStringNoUpdated company name.
licenseIdStringNoUpdated license identifier.

Example Request

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

Example Response

{
    "Result": true
}

Get Account Metrics

Retrieve usage metrics for an account including user logins and posting activity.

Parameters

ParameterTypeRequiredDescription
idStringYesAccount ID. Accepts both Oktopost and external reference ID.
sinceIntegerNoNumber of days to retrieve metrics for (1-90). Default is 1.

Example Request

curl -i https://reseller.oktopost.com/account-metrics/00100000000000x?since=7

Example Response

{
    "Result": true,
    "AdvocateLogins": 34,
    "UserLogins": 3,
    "BoardMessages": 19,
    "PostsScheduled": 15,
    "PostsSent": 23
}

Response Fields

FieldDescription
AdvocateLoginsNumber of advocate user logins during the specified period.
UserLoginsNumber of regular user logins during the specified period.
BoardMessagesNumber of messages shared on advocacy boards.
PostsScheduledNumber of posts scheduled for future publication.
PostsSentNumber of posts published to social networks.