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

# Get Auth Context

> Retrieve the authenticated user's profile and business context.

## Overview

Returns the authenticated user's profile, their associated business (workspace), whether onboarding is complete, and their role within the business. Use this endpoint to bootstrap your application after login.

## Request

**Method**: `GET`
**URL**: `/api/v1/auth/me`

### Headers

| Header        | Value          |
| ------------- | -------------- |
| Authorization | Bearer {token} |

No request body is required.

## Response

<ResponseField name="user" type="object">
  The authenticated user's profile.

  <Expandable title="user fields">
    <ResponseField name="user.id" type="string (UUID)">
      Unique identifier for the user.
    </ResponseField>

    <ResponseField name="user.email" type="string">
      The user's email address.
    </ResponseField>

    <ResponseField name="user.full_name" type="string">
      The user's full name.
    </ResponseField>

    <ResponseField name="user.is_verified" type="boolean">
      Whether the user's email has been verified.
    </ResponseField>

    <ResponseField name="user.is_google_account" type="boolean">
      Whether this account was created via Google OAuth.
    </ResponseField>

    <ResponseField name="user.avatar_url" type="string | null">
      URL of the user's avatar image, or `null` if not set.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="business" type="object | null">
  The business (workspace) associated with this user. `null` if onboarding is not complete.

  <Expandable title="business fields">
    <ResponseField name="business.id" type="string (UUID)">
      Unique identifier for the business.
    </ResponseField>

    <ResponseField name="business.name" type="string">
      The business name.
    </ResponseField>

    <ResponseField name="business.website" type="string | null">
      The business website URL.
    </ResponseField>

    <ResponseField name="business.goal" type="string | null">
      The business's support goal.
    </ResponseField>

    <ResponseField name="business.industry" type="string | null">
      The business's industry.
    </ResponseField>

    <ResponseField name="business.team_size" type="string | null">
      The team size descriptor (e.g. `"1-10"`).
    </ResponseField>

    <ResponseField name="business.created_at" type="string (ISO 8601)">
      Timestamp when the business was created.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="onboarding_complete" type="boolean">
  `true` if the user has completed onboarding (i.e. a business record exists).
</ResponseField>

<ResponseField name="team_role" type="string | null">
  The user's role within the business. One of `"owner"`, `"admin"`, `"agent"`, or `null` if no business is associated.
</ResponseField>

## Example

<CodeGroup>
  ```bash curl theme={null}
  curl https://api.pingback.live/api/v1/auth/me \
    -H "Authorization: Bearer YOUR_TOKEN"
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://api.pingback.live/api/v1/auth/me', {
    headers: {
      'Authorization': `Bearer ${token}`,
    },
  });
  const data = await response.json();
  ```
</CodeGroup>

### Response example

```json theme={null}
{
  "user": {
    "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "email": "jane@example.com",
    "full_name": "Jane Smith",
    "is_verified": true,
    "is_google_account": false,
    "avatar_url": null
  },
  "business": {
    "id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
    "name": "Acme Support",
    "website": "https://acme.com",
    "goal": "Reduce response time",
    "industry": "SaaS",
    "team_size": "1-10",
    "created_at": "2024-01-15T10:30:00Z"
  },
  "onboarding_complete": true,
  "team_role": "owner"
}
```

## Errors

| Status | Meaning                                        |
| ------ | ---------------------------------------------- |
| 401    | Unauthorized — missing or invalid Bearer token |
