---
title: "Get account details"
description: "Returns details of the user the API key belongs to. Also a simple way to check that your\ncredentials work without sending a message.\n"
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 › Account

`GET /v2/account`

Returns details of the user the API key belongs to. Also a simple way to check that your
credentials work without sending a message.

## Authentication

- `basicAuth`, http, header `Authorization`

## Code samples

### cURL

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

### TypeScript

```typescript
const url = 'https://app.messageport.com.au/api/v2/account';
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/account"

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

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

print(response.text)
```

## Responses

### 200

Account details.

#### Example

```json
{
  "data": {
    "id": 5678,
    "firstname": "Sam",
    "surname": "Taylor",
    "full_name": "Sam Taylor",
    "email": "sam@example.com",
    "mobile": "61412345678",
    "settings": {
      "timezone": "Australia/Sydney",
      "allow_contact_duplicates": false,
      "allow_sms_duplicates": false,
      "email_reply": true,
      "email_to_sms_enabled": false
    }
  }
}
```

- `data` (`getAccount.response.200.data`; object, optional)
  - example `{"id":5678,"firstname":"Sam","surname":"Taylor","full_name":"Sam Taylor","email":"sam@example.com","mobile":"61412345678","settings":{"timezone":"Australia/Sydney","allow_contact_duplicates":false,"allow_sms_duplicates":false,"email_reply":true,"email_to_sms_enabled":false}}`
  - `id` (`getAccount.response.200.data.id`; integer, optional)
  - `firstname` (`getAccount.response.200.data.firstname`; string, optional)
  - `surname` (`getAccount.response.200.data.surname`; string, optional)
  - `full_name` (`getAccount.response.200.data.full_name`; string, optional)
  - `email` (`getAccount.response.200.data.email`; string, optional)
    - format `email`
  - `mobile` (`getAccount.response.200.data.mobile`; string | null, optional)
  - `settings` (`getAccount.response.200.data.settings`; object, optional)
    - `timezone` (`getAccount.response.200.data.settings.timezone`; string, optional)
    - `allow_contact_duplicates` (`getAccount.response.200.data.settings.allow_contact_duplicates`; boolean, optional)
    - `allow_sms_duplicates` (`getAccount.response.200.data.settings.allow_sms_duplicates`; boolean, optional)
    - `email_reply` (`getAccount.response.200.data.settings.email_reply`; boolean | integer | null, optional) — Whether replies are forwarded by email.
    - `email_to_sms_enabled` (`getAccount.response.200.data.settings.email_to_sms_enabled`; boolean | integer | null, optional)

### 401

Missing, malformed or invalid API credentials.

#### Example

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

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


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