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
https://mplus.instagiv.com/accountQuery strings
| Key | Required | Description | Example |
|---|---|---|---|
key | true | Organization 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
| Key | Expected value | Description |
|---|---|---|
identifier | string | UUID assigned to the account (account-uuid) |
name | string | The name you assigned to this account |
credits | integer | Calculated credit balance for this account. Calculated as paid + packaged - held |
held_credits | integer | Held 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_credits | PaidCredits | Data relating to Paid credit balance and config |
packaged_credits | PackagedCredits | Data relating to Packaged credit balance and config |
mo | MoConfig | Data relating to MO (inbound) messaging config |
deleted | boolean | Whether this account has been deleted |
schedule | string | Cron 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
| Key | Expected value | Description |
|---|---|---|
remaining | integer | Remaining paid credits on this account. Can be a negative integer |
allow_negative | boolean | Whether this account is allowed to go into negative paid credits |
negative_limit | integer | The negative limit for paid credits |
schedule_reset_to_zero | boolean | Whether this accounts paid credits should reset to zero, at a period defined by schedule |
PackagedCredits Object
| Key | Expected value | Description |
|---|---|---|
remaining | integer | Remaining packaged credits on this account. Cannot be a negative integer |
schedule_refill_amount | integer | The numeric value that packaged credits should get reset to |
schedule_reset_to_zero | boolean | Whether this accounts packaged credits should reset to equal the schedule_refill_amount, at a period defined by schedule |
MoConfig Object
| Key | Expected value | Description |
|---|---|---|
mo_webhook_url | string | The URL that MO wehook requests should be made to |