# Retrieve account

`GET /v1/account`

Who is asking and every workspace they can open. For a person it also joins any workspace they were invited to.

Needs the scope: `account:read`

## Returns

- `object` ("account"): Always `account`.
- `kind` (string): How the request was signed: `session` for a signed-in person, `key` for an API key. One of: `session`, `key`, `demo`.
- `user` (object | null): The signed-in person, or `null` when an API key is asking.
- `user.id` (string): The id of the person.
- `user.name` (string): The name of the person.
- `user.email` (string): The address of the person.
- `user.image` (string | null): The address of their picture, or `null`.
- `workspaces` (object[]): The workspaces this credential can act in.
- `workspaces[].id` (string): The id of the workspace.
- `workspaces[].name` (string): The name of the workspace.
- `workspaces[].role` (string | null): The role of the person there, or `null` for an API key. One of: `owner`, `admin`, `member`, `viewer`.
- `workspaces[].current` (boolean): Whether this is the workspace the request acts in.

## Example

cURL:

```bash
curl "$OPENSEND_API_URL/v1/account" \
  -H "Authorization: Bearer $OPENSEND_API_KEY"
```

TypeScript:

```ts
await opensend.account.get()
```

CLI:

```bash
opensend account get
```

MCP:

```json
{
  "name": "account_get",
  "arguments": {}
}
```

Answer:

```json
{
  "object": "account",
  "kind": "key",
  "user": null,
  "workspaces": [
    {
      "id": "ws_demo",
      "name": "Acme Mail",
      "role": null,
      "current": true
    }
  ]
}
```
