Skip to content

List Accounts

Create an account under your organization, and generate a new Account key. Account keys are used to authenticate when sending Messages

Request

Endpoint

Messaging Plus expects a GET request

GET https://mplus.instagiv.com/account

Query strings

KeyRequiredDescriptionExample
keytrueOrganization API key?key=aaaabbbbcccc111222333

Response

Body

json
{
    "accounts": [
        {
            "identifier": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
            "name": "ACME Client",
            "credits": 880,
            "held_credits": 20,
            "paid_credits": {
                "remaining": 800,
                "allow_negative": true,
                "negative_limit": 1500,
                "schedule_reset_to_zero": true
            },
            "packaged_credits": {
                "remaining": 100,
                "schedule_refill_amount": 100,
                "schedule_refill": true
            },
            "mo": {
                "mo_webhook_url": "https://my.website/mo-webhook"
            },
            "schedule": "0 0 1 * *",
            "deleted": false
        }
    ]
}
json
{
    "accounts": [
        {
            "identifier": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
            "name": "ACME Client",
            "credits": 880,
            "held_credits": 20,
            "paid_credits": {
                "remaining": 800,
                "allow_negative": true,
                "negative_limit": 1500,
                "schedule_reset_to_zero": true
            },
            "packaged_credits": {
                "remaining": 100,
                "schedule_refill_amount": 100,
                "schedule_refill": true
            },
            "mo": {
                "mo_webhook_url": "https://my.website/mo-webhook"
            },
            "schedule": "0 0 1 * *",
            "deleted": false
        },
        {
            "identifier": "2180ad64-f9e7-4e7a-a96b-9f71caefbb9b",
            "name": "Dev",
            "credits": -308,
            "held_credits": 8,
            "paid_credits": {
                "remaining": -300,
                "allow_negative": true,
                "negative_limit": 500,
                "schedule_reset_to_zero": true
            },
            "packaged_credits": {
                "remaining": 0,
                "schedule_refill_amount": 0,
                "schedule_refill": false
            },
            "mo": {
                "mo_webhook_url": "https://my.other.website/mo-webhook"
            },
            "schedule": "0 0 10 * *",
            "deleted": false
        },
        {
            "identifier": "c4ec02a8-6c8f-4895-9d3b-49670728cfc3",
            "name": "Legacy Client",
            "credits": 0,
            "held_credits": 0,
            "paid_credits": {
                "remaining": 0,
                "allow_negative": false,
                "negative_limit": 0,
                "schedule_reset_to_zero": false
            },
            "packaged_credits": {
                "remaining": 0,
                "schedule_refill_amount": 0,
                "schedule_refill": false
            },
            "mo": {
                "mo_webhook_url": ""
            },
            "schedule": null,
            "deleted": true
        }
    ]
}

Body parameters

KeyExpected valueDescription
identifierstringUUID assigned to the account (account-uuid)
namestringThe name you assigned to this account
creditsintegerCalculated credit balance for this account. Calculated as paid + packaged - held
held_creditsintegerHeld credit balance for this account. Held credits are the sum of credits required to send all messages scheduled to be sent in the future
paid_creditsPaidCreditsData relating to Paid credit balance and config
packaged_creditsPackagedCreditsData relating to Packaged credit balance and config
moMoConfigData relating to MO (inbound) messaging config
deletedbooleanWhether this account has been deleted
schedulestringCron expression that defines when to run scheduled actions for this account. We do not accept extended cron syntax or predefined special strings (* * L * * & @hourly). Further reading of cron expressions

PaidCredits Object

KeyExpected valueDescription
remainingintegerRemaining paid credits on this account. Can be a negative integer
allow_negativebooleanWhether this account is allowed to go into negative paid credits
negative_limitintegerThe negative limit for paid credits
schedule_reset_to_zerobooleanWhether this accounts paid credits should reset to zero, at a period defined by schedule

PackagedCredits Object

KeyExpected valueDescription
remainingintegerRemaining packaged credits on this account. Cannot be a negative integer
schedule_refill_amountintegerThe numeric value that packaged credits should get reset to
schedule_reset_to_zerobooleanWhether this accounts packaged credits should reset to equal the schedule_refill_amount, at a period defined by schedule

MoConfig Object

KeyExpected valueDescription
mo_webhook_urlstringThe URL that MO wehook requests should be made to

Messaging Plus is a Cymba API