Skip to main content

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

HeaderValue
AuthorizationBearer
No request body is required.

Response

user
object
The authenticated user’s profile.
business
object | null
The business (workspace) associated with this user. null if onboarding is not complete.
onboarding_complete
boolean
true if the user has completed onboarding (i.e. a business record exists).
team_role
string | null
The user’s role within the business. One of "owner", "admin", "agent", or null if no business is associated.

Example

curl https://api.pingback.live/api/v1/auth/me \
  -H "Authorization: Bearer YOUR_TOKEN"

Response example

{
  "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

StatusMeaning
401Unauthorized — missing or invalid Bearer token