# Retrieve account

`opensend account get`

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

The command prints the answer: as JSON when its output goes to a file or another program, and as a table or a list of fields in a terminal. When the API refuses, the error goes to the error stream and the command ends with a code that names the failure. [Output and scripts](https://opensend.sh/docs/scripting) lists the codes.

- `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

CLI:

```bash
opensend account get
```

Answer:

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