Setting up an Account
All messages in mplus are sent via Accounts. When accounts are created we provide you with an Account API key, which you then use to authenticate against Message endpoints.
If you're sending on behalf of other businesses, or need a way of splitting traffic into seperate streams, create accounts for each stream and send via that API key. Messaging Plus can differentiate and report on traffic sent via individual accounts.
Create the account
Accounts can be created by making a request to the create-account endpoint.
To test your implementation, you may want to setup a test account. You can make a POST request to the create-account endpoint to do this.
POST
https://mplus.instagiv.com/account{
"name": "test-account"
}response body
{
"identifier": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"apiKey": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
}The identifier provided here is your Account UUID. Keep this stored against your API key, as this will be how we identify your account in reports or future API requests.
Add credit to your account
If your organization is configured to utilize the account credit system, you will need to add credits to the account you've created in order for it to send messages.
The account credit system has no interaction with how you're billed for using the Message Plus API - it's a purely optional system to allow you to manage how many messages each of your accounts are allowed to send.
To add credits to your account, you need to make a PATCH request to the topup-account endpoint to do this.
PATCH
https://mplus.instagiv.com/topup{
"accountUuid": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"topup": 100,
}Response 200 OK
// Response body
{}Now that your account has credits, you can begin sending messages.