Point Groups
Note
The content for this page requires a major update. The legacy page contains outdated and potentially inaccurate information. You can still access it in the Mautic Developer Documentation archived repository.
If you’re interested in helping develop the new content for this page and others, consider joining the documentation efforts.
Please read the Contributing Guidelines and Contributing to Mautic’s documentation to get started.
Use this endpoint to manage Contact Point Groups in Mautic.
<?php
use Mautic\MauticApi;
use Mautic\Auth\ApiAuth;
// ...
$initAuth = new ApiAuth();
$auth = $initAuth->newAuth($settings);
$apiUrl = "https://your-mautic.com";
$api = new MauticApi();
$pointGroupApi = $api->newApi("pointGroups", $auth, $apiUrl);
Get Point Group
<?php
//...
$pointGroup = $pointGroupApi->get($id);
"pointGroup": {
"id": 47,
"name": "Group A",
"description": "This is my first Point Group created via API.",
"isPublished": true,
"dateAdded": "2024-02-29T12:17:52+00:00",
"dateModified": null,
"createdBy": 2,
"createdByUser": "Admin User",
"modifiedBy": null,
"modifiedByUser": null,
}
Get an individual Point Group by ID.
HTTP Request
GET /points/groups/ID
Response
Expected Response Code: 200
See JSON code example.
Point Group Properties
Name |
Type |
Description |
|---|---|---|
|
int |
ID of the Point Group |
|
|
Point Group name |
|
|
Point Group description |
|
|
Whether the Point Group is published |
|
|
Date/time Point Group was created |
|
|
ID of the User that created the Point Group |
|
|
Name of the User that created the Point Group |
|
|
Date/time Point Group was last modified |
|
|
ID of the User that last modified the Point Group |
|
|
Name of the User that last modified the Point Group |
List Contact Point Groups
<?php
//...
$pointGroups = $pointGroupApi->getList($searchFilter, $start, $limit, $orderBy, $orderByDir, $publishedOnly, $minimal);
{
"total": 4,
"pointGroups": [
{
"id": 47,
"name": "Group A",
"description": "This is my first Point Group created via API.",
"isPublished": true,
"dateAdded": "2024-02-29T12:17:52+00:00",
"dateModified": null,
"createdBy": 2,
"createdByUser": "Admin User",
"modifiedBy": null,
"modifiedByUser": null
},
...
]
}
HTTP Request
GET /points/groups
Response
Expected Response Code: 200
See JSON code example.
Point Group Properties
Name |
Type |
Description |
|---|---|---|
|
|
Count of all Point Groups |
|
|
ID of the Point Group |
|
|
Point Group name |
|
|
Point Group description |
|
|
Whether the Point Group is published |
|
|
Date/time Point Group was created |
|
|
ID of the User that created the Point Group |
|
|
Name of the User that created the Point Group |
|
|
Date/time Point Group was last modified |
|
|
ID of the User that last modified the Point Group |
|
|
Name of the User that last modified the Point Group |
Create Point Group
<?php
$data = [
'name' => 'Group A',
'description' => 'This is my first Point Group created via API.'
];
$pointGroup = $pointGroupApi->create($data);
HTTP Request
POST /points/groups/new
Post Parameters
Name |
Description |
|---|---|
name |
Point Group name is the only required field |
description |
A description of the Point Group. |
Response
Expected Response Code: 201
Properties
Same as Get Point Group.
Edit Point Group
<?php
$id = 1;
$data = [
'name' => 'New Point Group name',
'description' => 'Updated description of the Point Group.'
];
$pointGroup = $pointGroupApi->edit($id, $data);
HTTP Request
PATCH /points/groups/ID/edit
Post Parameters
Name |
Description |
|---|---|
name |
Point Group name is the only required field |
description |
A description of the Point Group. |
Response
Expected Response Code: 200
Properties
Same as Get Point Group.
Delete Point Group
<?php
$pointGroup = $pointGroupApi->delete($id);
Delete a Point Group.
HTTP Request
DELETE /points/groups/ID/delete
Response
Expected Response Code: 200
Properties
Same as Get Point Group.