---
title: "Get a group"
description: "Returns a single contact group."
version: "v2"
---

> Documentation Index
> Fetch the complete documentation index at: https://dev.messageport.com.au/llms.txt
> Use this file to discover all available pages before exploring further.

Path: MessagePort API › Groups

`GET /v2/groups/{group}`

Returns a single contact group.

## Authentication

- `basicAuth`, http, header `Authorization`

## Path parameters

- `group` (`getGroup.path.group`; integer, required) — Group ID.

## Code samples

### cURL

```bash
curl --request GET \
  --url https://app.messageport.com.au/api/v2/groups/512 \
  --header 'Authorization: Basic <credentials>'
```

### TypeScript

```typescript
const url = 'https://app.messageport.com.au/api/v2/groups/512';
const options = {method: 'GET', headers: {Authorization: 'Basic <credentials>'}};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://app.messageport.com.au/api/v2/groups/512"

headers = {"Authorization": "Basic <credentials>"}

response = requests.get(url, headers=headers)

print(response.text)
```

## Responses

### 200

The group.

#### Example

```json
{
  "data": {
    "id": 512,
    "name": "Customers",
    "status": true,
    "group_email": "group-512@example.com",
    "is_global": false,
    "updated": "2024-03-11T02:14:07Z",
    "created": "2024-02-02T23:51:19Z"
  }
}
```

- `data` (`getGroup.response.200.data`; object, optional)
  - example `{"id":512,"name":"Customers","status":true,"group_email":"group-512@example.com","is_global":false,"updated":"2024-03-11T02:14:07Z","created":"2024-02-02T23:51:19Z"}`
  - `id` (`getGroup.response.200.data.id`; integer, optional)
  - `name` (`getGroup.response.200.data.name`; string, optional)
  - `status` (`getGroup.response.200.data.status`; boolean, optional) — Whether the group is active.
  - `group_email` (`getGroup.response.200.data.group_email`; string | null, optional) — Email-to-SMS address that sends to every contact in the group.
    - format `email`
  - `is_global` (`getGroup.response.200.data.is_global`; boolean, optional) — Whether the group is shared across the whole account.
  - `updated` (`getGroup.response.200.data.updated`; string, optional)
    - format `date-time`
  - `created` (`getGroup.response.200.data.created`; string, optional)
    - format `date-time`

### 401

Missing, malformed or invalid API credentials.

#### Example

```json
{
  "message": "Unauthenticated."
}
```

- `message` (`getGroup.response.401.message`; string, required)

### 403

The resource exists but does not belong to you, or you lack permission.

#### Example

```json
{
  "message": "This action is unauthorized."
}
```

- `message` (`getGroup.response.403.message`; string, required)

### 404

The resource does not exist.

#### Example

```json
{
  "message": "Not Found"
}
```

- `message` (`getGroup.response.404.message`; string, required)


Source: https://dev.messageport.com.au/api/groups/get/index.md
