# group_invite

Sends a group invitation to a specific resident.


:::info
This API command applies only for **Standard bots**.

:::

```csharp
// See "LSL Helper Functions" page for this function
smartbotsAPI("group_invite", [
  "avatar", "417732f0-a100-4e2d-a9bf-e381cfd12c3a",
  "groupuuid", "0b65a122-8f77-64fe-5b2a-225d4c490d9c",
  "roleuuid", "00000000-0000-0000-0000-000000000000"
]);
```

```snippet http-api-variables-OmJyUigTgO
```

```snippet http-api-input-basic-parameters-5FcVlaJbq0 action="group_invite"
```

```snippet http-api-input-q5yvAagqsZ
avatar           | yes      | The UUID of the resident to invite
groupuuid        | yes      | The UUID of the group to invite the resident to
roleuuid         | yes      | The UUID of the group role (use `NULL_KEY` for “Everyone”)
check_membership | optional | Set to `1` to ignore existing group members (see **Comments** below)
nosafehub        | optional | Set to `1` to ignore the command if the bot is currently in a Linden Safe Hub (Welcome Area). Recommended for greeters and inviters.
```

```snippet http-api-output-JAwUcmg7i7
```

# Comments

### Ignoring existing group members

To skip inviting users who are already group members, set `check_membership` to `1`.


:::warning
The bot reloads the list of group members every **10 minutes**.  
If a resident leaves a group and tries to rejoin immediately, the bot may still think the resident is a member, causing the invitation to be discarded.

:::

# Usage examples

A detailed example of group invitation usage is available [here](/doc/http-api-examples-group_invite).