# Invite member

`opensend members invite`

Invites a person to the workspace by email, with the role they will hold.

Needs the scope: `workspace:write`

## Flags

- `--email` (string, required): The address to invite.
- `--name` (string): The name of the person, shown until they sign in.
- `--role` (string): What they may do: `admin`, `member` or `viewer`. Without it they join as a member. One of: `admin`, `member`, `viewer`.

## 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` ("member"): Always `member`.
- `id` (string): The id of the member.
- `name` (string): The name of the person.
- `email` (string): The address of the person.
- `role` (string): What the member may do: `owner`, `admin`, `member` or `viewer`. One of: `owner`, `admin`, `member`, `viewer`.
- `status` (string): `invited` until the person signs in, `active` after that. One of: `active`, `invited`.
- `invitedBy` (string): The name of who invited them.
- `invitedAt` (string | null): When the invitation was sent, or `null` for the person who made the workspace.
- `lastActiveAt` (string | null): When the member last used the workspace, or `null`.
- `invitationUrl` (string | null): A link that lets an invited person choose a password and join without an emailed code, or `null`. Only the owner of a server a team hosts itself is given it, signed in, while the invitation is waiting.
- `createdAt` (string): When the member was added.

## Example

CLI:

```bash
opensend members invite --email joan@example.com --role admin
```

Answer:

```json
{
  "object": "member",
  "id": "mem_01",
  "name": "joan@example.com",
  "email": "joan@example.com",
  "role": "admin",
  "status": "invited",
  "invitedBy": "Backend",
  "invitedAt": "2026-11-27T09:30:00.000Z",
  "lastActiveAt": null,
  "invitationUrl": null,
  "createdAt": "2026-11-27T09:30:00.000Z"
}
```
