Skip to content

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

PATCH https://mplus.instagiv.com/account/{account-uuid}
KeyDescriptionExample
account-uuidAccount UUID to update16e7c990-3a03-4b4b-b98f-732aae5bf8d1

Query strings ​

KeyRequiredDescriptionExample
keytrueOrganization 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 ​

KeyExpected valueDescription
paid_creditsPaidCreditUpdateParameters to update paid credit config with
packaged_creditsPackagedCreditUpdateParameters to update packaged credit config with
moMoConfigUpdateParameters to update MO (inbound messaging) config with
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

PaidCreditUpdate Object ​

KeyExpected valueDescription
allow_negativebooleanWhether this account is allowed to go into negative paid credits
negative_limitinteger/nullThe negative limit for paid credits. Can be null to enforce no limit
schedule_reset_to_zerobooleanWhether this accounts paid credits should reset to zero, at a period defined by schedule

PackagedCreditUpdate Object ​

KeyExpected valueDescription
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

MoConfigUpdate Object ​

KeyExpected valueDescription
mo_webhook_urlstringThe URL that MO wehook requests should be made to
mo_webhook_secretstringSecret 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 missing key, invalid account UUID, or missing/invalid topup value
  • 404 Not Found – account not found or already deleted

Messaging Plus is a Cymba API