> ## Documentation Index
> Fetch the complete documentation index at: https://bundleup.io/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Account

> Find out who a connection is authenticated as, with one endpoint that every integration supports.

`GET /v1/me` returns the account a connection acts as. It’s the one Unified API endpoint **every** integration implements, which makes it the simplest way to check a connection works and to show users which account they connected.

**Use it to:**

* Show “Connected as [octocat@github.com](mailto:octocat@github.com)” in your settings page.
* Check a connection after the authorization flow, before you rely on it.
* Detect revoked access: if `/v1/me` starts failing with the provider’s `401`, the user needs to reconnect.

## Request

<CodeGroup>
  ```bash cURL theme={null}
  curl https://unify.bundleup.io/v1/me \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "BU-Connection-Id: conn_abc123"
  ```

  ```typescript JavaScript theme={null}
  const response = await fetch('https://unify.bundleup.io/v1/me', {
    headers: {
      Authorization: `Bearer ${process.env.BUNDLEUP_API_KEY}`,
      'BU-Connection-Id': connectionId,
    },
  });
  const { data } = await response.json();
  ```
</CodeGroup>

## Response

```json theme={null}
{
  "data": {
    "id": "583231",
    "name": "The Octocat",
    "email": "octocat@github.com",
    "avatar_url": "https://avatars.githubusercontent.com/u/583231"
  }
}
```

| Field | Description |
| - | - |
| `id` | The account’s ID at the provider. |
| `name` | Display name. |
| `email` | Email address. |
| `avatar_url` | Profile image URL. |

Any field the provider doesn’t expose is `null`. The shape never changes.

## User accounts vs organization accounts

Most providers authorize a **person**, so `/v1/me` describes that person. Some authorize a **workspace, portal, organization or company** instead, and for those `/v1/me` describes that account:

| Provider | `/v1/me` describes |
| - | - |
| HubSpot | The portal |
| Stripe | The connected account |
| Xero | The organisation |
| QuickBooks | The company file |
| Attio, Gong | The workspace |
| Shopify | The store |
| Square | The merchant |
| Ramp | The business |
| Klaviyo, Constant Contact | The account |
| Copper | The company account |
| Aircall | The company |
| Supabase | The organization |

In those cases `email` and `avatar_url` are often `null`.

Full schema: [Unified API reference](/docs/api-reference/unified-api).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.