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

# Me

> Identify the authenticated caller: an account-wide user or a workspace member, depending on the token

`me` returns the identity behind the token you are calling with. It is the first
query to run after [authenticating](/guides/authentication): it confirms your
token works and tells you who and where you are.

```
https://router.apps.filed.com/graphql
```

## `Me` is a union

`me` returns the `Me` **union**, which resolves to a different type depending on
which token you send:

```graphql theme={null}
union Me = User | WorkspaceUser
```

| Token            | `me` resolves to | Identity                                        |
| ---------------- | ---------------- | ----------------------------------------------- |
| `userToken`      | `User`           | You, across your whole account (all workspaces) |
| `workspaceToken` | `WorkspaceUser`  | You, scoped to one workspace, with your role    |

Both tokens come from the same exchange call (see
[Authentication](/guides/authentication)); they represent the **same person** at
two different scopes. Because `me` is a union, always select fields with an
inline fragment (`... on User` / `... on WorkspaceUser`) and read `__typename`
to know which one you got.

```graphql theme={null}
type Query {
  me: Me
}
```

<ResponseField name="me" type="Me">
  The authenticated identity, or `null` if the token is missing or invalid.
  Resolves to `User` for a `userToken` and `WorkspaceUser` for a `workspaceToken`.
</ResponseField>

## With a `userToken`: `User`

Call with the account-wide `userToken` to get your user account and the
workspaces you belong to.

```graphql theme={null}
type User {
  id: ID!
  name: String!
  email: String!
  workspaces: [WorkspaceShortDetails!]!
}

type WorkspaceShortDetails {
  id: ID!
  name: String!
  createdAt: Date
  status: WorkspaceStatus
}
```

<ResponseField name="User.id" type="ID!">
  Your user ID, stable across every workspace.
</ResponseField>

<ResponseField name="User.name" type="String!">
  Your display name.
</ResponseField>

<ResponseField name="User.email" type="String!">
  Your email address.
</ResponseField>

<ResponseField name="User.workspaces" type="[WorkspaceShortDetails!]!">
  The workspaces you are a member of. Use a workspace `id` here to pick which
  workspace an integration should act on.
</ResponseField>

<RequestExample>
  ```graphql me (userToken) theme={null}
  query MeAsUser {
    me {
      __typename
      ... on User {
        id
        name
        email
        workspaces {
          id
          name
        }
      }
    }
  }
  ```
</RequestExample>

<ResponseExample>
  ```json theme={null}
  {
    "data": {
      "me": {
        "__typename": "User",
        "id": "019f0fb6-26e9-74b7-a842-cb43a2a41682",
        "name": "Jane Preparer",
        "email": "jane@example-firm.com",
        "workspaces": [
          {
            "id": "019f0fb6-379a-7f72-b7ec-ebd8f41ccfa1",
            "name": "Example Tax Firm"
          }
        ]
      }
    }
  }
  ```
</ResponseExample>

```bash cURL theme={null}
curl -X POST https://router.apps.filed.com/graphql \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_USER_TOKEN" \
  -d '{ "query": "query MeAsUser { me { __typename ... on User { id name email workspaces { id name } } } }" }'
```

## With a `workspaceToken`: `WorkspaceUser`

Call with the workspace-scoped `workspaceToken` to get your membership in that
workspace, including your role.

```graphql theme={null}
type WorkspaceUser {
  id: ID!
  role: WorkspaceRole!
  createdAt: Date!
  user: UserShortDetails!
  workspace: Workspace!
}

type UserShortDetails {
  id: ID!
  name: String!
  email: String!
}

enum WorkspaceRole {
  admin
  l1
  l2
  l3
}
```

<ResponseField name="WorkspaceUser.id" type="ID!">
  The membership ID linking your user to this workspace.
</ResponseField>

<ResponseField name="WorkspaceUser.role" type="WorkspaceRole!">
  Your role in the workspace: `admin`, `l1`, `l2`, or `l3`.
</ResponseField>

<ResponseField name="WorkspaceUser.createdAt" type="Date!">
  When you were added to the workspace.
</ResponseField>

<ResponseField name="WorkspaceUser.user" type="UserShortDetails!">
  Your underlying user account: `id`, `name`, `email`.
</ResponseField>

<ResponseField name="WorkspaceUser.workspace" type="Workspace!">
  The workspace this token is scoped to. It is the entry point to
  [clients](/apis/clients) and [tasks](/apis/tasks):
  `me { ... on WorkspaceUser { workspace { clients { ... } } } }`.
</ResponseField>

<RequestExample>
  ```graphql me (workspaceToken) theme={null}
  query MeAsWorkspaceUser {
    me {
      __typename
      ... on WorkspaceUser {
        id
        role
        createdAt
        user {
          id
          name
          email
        }
        workspace {
          id
          name
        }
      }
    }
  }
  ```
</RequestExample>

<ResponseExample>
  ```json theme={null}
  {
    "data": {
      "me": {
        "__typename": "WorkspaceUser",
        "id": "019f0fb6-37b1-7800-b7bc-0d11288504b1",
        "role": "admin",
        "createdAt": "2026-06-14T09:31:20.000Z",
        "user": {
          "id": "019f0fb6-26e9-74b7-a842-cb43a2a41682",
          "name": "Jane Preparer",
          "email": "jane@example-firm.com"
        },
        "workspace": {
          "id": "019f0fb6-379a-7f72-b7ec-ebd8f41ccfa1",
          "name": "Example Tax Firm"
        }
      }
    }
  }
  ```
</ResponseExample>

```bash cURL theme={null}
curl -X POST https://router.apps.filed.com/graphql \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_WORKSPACE_TOKEN" \
  -d '{ "query": "query MeAsWorkspaceUser { me { __typename ... on WorkspaceUser { id role createdAt user { id name email } workspace { id name } } } }" }'
```

<Tip>
  Query both members in one document so your client handles either token:
  `me { __typename ... on User { ... } ... on WorkspaceUser { ... } }`, then branch
  on `__typename`.
</Tip>
