Contact groups
Manage the contact groups your campaigns target — list them and keep memberships in sync from your own system.
List groups
GEThttps://api.mobilesasa.com/v1/groups/
curl "https://api.mobilesasa.com/v1/groups/" \
-H "Authorization: Bearer $MOBILESASA_TOKEN"Response
{
"status": true,
"responseCode": "0200",
"groups": [
{ "uuid": "6f9d1c2e-…", "name": "Members — Nairobi", "total_contacts": 4812 },
{ "uuid": "a41b7f90-…", "name": "Staff", "total_contacts": 148 }
]
}Add a contact to a group
POSThttps://api.mobilesasa.com/v1/groups/{uuid}/add-contact
Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| phone | string | Yes | The contact's number. |
| firstName | string | No | Used by campaign personalisation placeholders. |
| lastName | string | No | Ditto. |
curl -X POST https://api.mobilesasa.com/v1/groups/6f9d1c2e-…/add-contact \
-H "Authorization: Bearer $MOBILESASA_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"phone": "0712345678",
"firstName": "Amina",
"lastName": "Odhiambo"
}'Remove a contact from a group
DELETEhttps://api.mobilesasa.com/v1/groups/{uuid}/remove-contact
curl -X DELETE https://api.mobilesasa.com/v1/groups/6f9d1c2e-…/remove-contact \
-H "Authorization: Bearer $MOBILESASA_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"phone": "0712345678"
}'Typical integration
Sync group membership from your source of truth: when a member joins or leaves in your system, mirror it with add/remove calls. Campaigns sent from the portal (or by recurring reminders) then always target a current list — no CSV exports, no stale data.