What is it?
The MC Professional API Group resource allows a 3rd party client to get the list of groups. Every profile is assigned to one or more groups.
Get a List of Groups
This resource returns the complete list of groups.
Scope
To access this resource, the access token must have the read scope.
Permissions
This resource is available to administrators.
Request
The request to get a list of groups is an HTTP GET to the /api/v1/group endpoint. The following is the format of the request:
GET /api/v1/group HTTP/1.1
Host: <orgId>.memberclicks.net
Accept: application/json
Authorization: Bearer <accessToken>
Cache-Control: no-cache
- orgId: the MC Professional organization ID
- accessToken: the access token issued by the authorization server
Example
Using the example values below, the following is the resulting request:
- orgId: apiexample
- accessToken: eyJhbGciOiJIUzI1NiJ9.eyJleHAiOjE0NjczMDA4NTEsInVzZXJfbmFtZSI6IjEwMDEzNDU2MzAiLCJzY29wZSI6WyJyZWFkIl0sInNlcnZpY2VJZCI6NzM0MCwiYXV0aG9yaXRpZXMiOlsiUk9MRV9BRE1JTiIsIlJPTEVfRklOQU5DSUFMX0FETUlOIiwiUk9MRV9VU0VSIiwiUk9MRV9DTVNfQURNSU4iLCJST0xFX1BST0ZJTEVfSU1QT1JUX0FETUlOIiwiUk9MRV9QUk9GSUxFX0FETUlOIiwiUk9MRV9DT01NVU5JVFlfQURNSU4iLCJST0xFX01FTUJFUlNISVBfQURNSU4iLCJST0xFX0ZPUk1TX0FETUlOIiwiUk9MRV9SRVBPUlRJTkdfQURNSU4iXSwidXNlcklkIjoxMDAxMzQ1NjMwLCJqdGkiOiJkYjE4NDk4Zi1iMWQ5LTRkN2UtYWJlYy0wOGNlMDI4NzlmODAiLCJjbGllbnRfaWQiOiI4WmdaeFY5QjhyZHdWWEo4bHp1aCJ9.ZVp3T_Ee4bsuIiT0r_yw3LzeSYDxtzo2bFwi_xNVa9E
GET /api/v1/group HTTP/1.1
Host: apiexample.memberclicks.net
Accept: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJleHAiOjE0NjczMDA4NTEsInVzZXJfbmFtZSI6IjEwMDEzNDU2MzAiLCJzY29wZSI6WyJyZWFkIl0sInNlcnZpY2VJZCI6NzM0MCwiYXV0aG9yaXRpZXMiOlsiUk9MRV9BRE1JTiIsIlJPTEVfRklOQU5DSUFMX0FETUlOIiwiUk9MRV9VU0VSIiwiUk9MRV9DTVNfQURNSU4iLCJST0xFX1BST0ZJTEVfSU1QT1JUX0FETUlOIiwiUk9MRV9QUk9GSUxFX0FETUlOIiwiUk9MRV9DT01NVU5JVFlfQURNSU4iLCJST0xFX01FTUJFUlNISVBfQURNSU4iLCJST0xFX0ZPUk1TX0FETUlOIiwiUk9MRV9SRVBPUlRJTkdfQURNSU4iXSwidXNlcklkIjoxMDAxMzQ1NjMwLCJqdGkiOiJkYjE4NDk4Zi1iMWQ5LTRkN2UtYWJlYy0wOGNlMDI4NzlmODAiLCJjbGllbnRfaWQiOiI4WmdaeFY5QjhyZHdWWEo4bHp1aCJ9.ZVp3T_Ee4bsuIiT0r_yw3LzeSYDxtzo2bFwi_xNVa9E
Cache-Control: no-cache
Response
A successful request will return an HTTP status 200 OK with the response in the following format:
HTTP/1.1 200 OK
{
"totalCount": <totalCount>,
"groups": <groups>
}
- totalCount: the total count of groups
- groups: the array of groups. Each object in the array contains the group name.
Example
The following is the response for the example request above:
HTTP/1.1 200 OK
{
"totalCount": 12,
"groups": [
{
"name": "Admin"
},
{
"name": "Associate"
},
{
"name": "Board Member"
},
{
"name": "Chair Admin"
},
{
"name": "Community Admin"
},
{
"name": "Company"
},
{
"name": "Contacts"
},
{
"name": "Employee"
},
{
"name": "Member"
},
{
"name": "Organization"
},
{
"name": "Prospect"
},
{
"name": "Student"
}
]
}