Edit Account
Edit the configuration of an account under your organization. Configure credit, schedule, and MO settings.
Request
Endpoint
Messaging Plus expects a PATCH request
https://mplus.instagiv.com/account/{account-uuid}| Key | Description | Example |
|---|---|---|
account-uuid | Account UUID to update | 16e7c990-3a03-4b4b-b98f-732aae5bf8d1 |
Query strings
| Key | Required | Description | Example |
|---|---|---|---|
key | true | Organization API key | ?key=aaaabbbbcccc111222333 |
Body
json
{
"paid_credits": {
"allow_negative": true,
"negative_limit": null,
"schedule_reset_to_zero": false
}
}json
{
"packaged_credits": {
"schedule_refill_amount": 200,
"schedule_refill": true
}
}json
{
"schedule": "0 0 1 * *"
}json
{
"mo": {
"mo_webhook_url": "https://my.website/mo-webhook",
"mo_wehook_secret": "aaaaaaaaaaaaaAAAAAAAAAAAA1111111111111"
}
}json
{
"paid_credits": {
"allow_negative": true,
"negative_limit": 1500,
"schedule_reset_to_zero": true
},
"packaged_credits": {
"schedule_refill_amount": 100,
"schedule_refill": true
},
"mo": {
"mo_webhook_url": "https://my.website/mo-webhook",
"mo_webhook_secret": "aaaaaaaaaaaaaAAAAAAAAAAAA1111111111111"
},
"schedule": "0 0 1 * *",
}Body parameters
| Key | Expected value | Description |
|---|---|---|
paid_credits | PaidCreditUpdate | Parameters to update paid credit config with |
packaged_credits | PackagedCreditUpdate | Parameters to update packaged credit config with |
mo | MoConfigUpdate | Parameters to update MO (inbound messaging) config with |
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 |
PaidCreditUpdate Object
| Key | Expected value | Description |
|---|---|---|
allow_negative | boolean | Whether this account is allowed to go into negative paid credits |
negative_limit | integer/null | The negative limit for paid credits. Can be null to enforce no limit |
schedule_reset_to_zero | boolean | Whether this accounts paid credits should reset to zero, at a period defined by schedule |
PackagedCreditUpdate Object
| Key | Expected value | Description |
|---|---|---|
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 |
MoConfigUpdate Object
| Key | Expected value | Description |
|---|---|---|
mo_webhook_url | string | The URL that MO wehook requests should be made to |
mo_webhook_secret | string | Secret key to sign MO webhook requests with, made to your specified endpoint |
Response
Success
Supplies a 200 response upon successful account topup with an empty JSON body.
Body
json
{
"status": "success"
}Error responses
400 Bad Request– invalid or missingkey, invalid account UUID, or missing/invalidtopupvalue404 Not Found– account not found or already deleted