# Invite member

`POST /v1/members`

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

Needs the scope: `workspace:write`

## Body parameters

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

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

cURL:

```bash
curl -X POST "$OPENSEND_API_URL/v1/members" \
  -H "Authorization: Bearer $OPENSEND_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "email": "joan@example.com",
  "role": "admin"
}'
```

TypeScript:

```ts
await opensend.members.invite({
  email: 'joan@example.com',
  role: 'admin',
})
```

CLI:

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

MCP:

```json
{
  "name": "members_invite",
  "arguments": {
    "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"
}
```
