DocsCore APIs
Groups & Audiences API
Create segmented customer groups and manage contact memberships for broadcast campaigns.
4 min read•API v1
Audience Groups Overview
Groups allow organizing contacts into reusable audience segments (e.g. "VIP Customers", "September Invoices"). Groups can be directly targeted in broadcast campaigns.
Group Operations
* `GET /api/v1/groups` — List all groups with dynamic contact counts.
* `POST /api/v1/groups` — Create a new group (`name`, `description`).
* `GET /api/v1/groups/{id}` — Get group details.
* `PATCH /api/v1/groups/{id}` — Update group name/description.
* `DELETE /api/v1/groups/{id}` — Delete group and memberships.
Managing Group Memberships
Add or remove contact IDs from groups dynamically:
# Add Contacts
curl -X POST https://app.pingstack.in/api/v1/groups/GROUP_UUID/contacts \
-H "Authorization: Bearer ps_secret_live_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"contact_ids": ["CONTACT_UUID_1", "CONTACT_UUID_2"]}'
# Remove Contacts
curl -X DELETE https://app.pingstack.in/api/v1/groups/GROUP_UUID/contacts \
-H "Authorization: Bearer ps_secret_live_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"contact_ids": ["CONTACT_UUID_1"]}'