Documentation / Group service API

Developers

Group service API

Last updated Dec 1, 2026

Use the tenant key from Group service. Every mutating call needs group_uuid (copy it from the group profile in Second Life). The group row must be live: assigned avatar invited, with Invite / Send Notices / Eject as needed, then synced.

Replace fb_PASTE_KEY_HERE and the sample UUID. Each LSL block is a full script.

GET /group/status

Lists every Group service row on the account, powers, online flag, and the shared message budget.

curl
curl -s https://fluxbots.net/api/v1/group/status ^
  -H "X-Api-Key: fb_YOUR_KEY" ^
  -H "Accept: application/json"
Example response
{
  "ok": true,
  "budget": { "used": 12, "remaining": 4988, "limit": 5000 },
  "groups": [{ "id": 18, "group_uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "group_name": "Club Example", "pending": false, "can_invite": true, "bot_online": true }]
}
LSL (drop in a prim)
// Owner touch -> GET /group/status
string  API_BASE = "https://fluxbots.net/api/v1";
string  API_KEY  = "fb_PASTE_KEY_HERE";

key gHttp;

default
{
    state_entry()
    {
        llSetText("Owner touch: group status", <0.8, 0.8, 0.8>, 1.0);
    }

    touch_start(integer n)
    {
        if (llDetectedKey(0) != llGetOwner())
        {
            llInstantMessage(llDetectedKey(0), "Owner only.");
            return;
        }
        gHttp = llHTTPRequest(API_BASE + "/group/status", [
            HTTP_METHOD, "GET",
            HTTP_CUSTOM_HEADER, "X-Api-Key", API_KEY
        ], "");
    }

    http_response(key id, integer status, list meta, string body)
    {
        if (id != gHttp) return;
        llOwnerSay("Status (" + (string)status + "): " + body);
    }
}

POST /group/invite

Queue a group invite. Send avatar_uuid or avatar_name (or both). Optional role_uuid; otherwise the row's default invite role, or Everyone.

For a public inviter, pair the official script instead of putting this key in the prim.

curl
curl -s https://fluxbots.net/api/v1/group/invite ^
  -H "X-Api-Key: fb_YOUR_KEY" ^
  -H "Content-Type: application/json" ^
  -d "{\"group_uuid\":\"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\"avatar_uuid\":\"11111111-2222-3333-4444-555555555555\",\"avatar_name\":\"Jane Resident\"}"

Success: {"ok":true,"job_id":1842}. Typical 422: group still pending, missing avatar, no Invite power, 30/hour cap, or blacklisted.

LSL (drop in a prim)
// Touch -> POST /group/invite for the toucher
string  API_BASE   = "https://fluxbots.net/api/v1";
string  API_KEY    = "fb_PASTE_KEY_HERE";
string  GROUP_UUID = "00000000-0000-0000-0000-000000000000";

key gHttp;

default
{
    state_entry()
    {
        llSetText("Touch to invite", <0.2, 0.95, 0.75>, 1.0);
    }

    touch_start(integer n)
    {
        key who = llDetectedKey(0);
        string body = llList2Json(JSON_OBJECT, [
            "group_uuid", GROUP_UUID,
            "avatar_uuid", (string)who,
            "avatar_name", llDetectedName(0)
        ]);
        gHttp = llHTTPRequest(API_BASE + "/group/invite", [
            HTTP_METHOD, "POST",
            HTTP_MIMETYPE, "application/json",
            HTTP_CUSTOM_HEADER, "X-Api-Key", API_KEY
        ], body);
        llInstantMessage(who, "Sending group invite...");
    }

    http_response(key id, integer status, list meta, string body)
    {
        if (id != gHttp) return;
        if (status >= 200 && status < 300) llOwnerSay("Invite OK: " + body);
        else llOwnerSay("Invite failed (" + (string)status + "): " + body);
    }
}

POST /group/eject

Needs group_uuid and avatar_uuid. Name is not enough. Keep this owner-only.

curl
curl -s https://fluxbots.net/api/v1/group/eject ^
  -H "X-Api-Key: fb_YOUR_KEY" ^
  -H "Content-Type: application/json" ^
  -d "{\"group_uuid\":\"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\"avatar_uuid\":\"11111111-2222-3333-4444-555555555555\"}"
LSL (drop in a prim)
// Owner touch -> eject that avatar from the group
string  API_BASE   = "https://fluxbots.net/api/v1";
string  API_KEY    = "fb_PASTE_KEY_HERE";
string  GROUP_UUID = "00000000-0000-0000-0000-000000000000";

key gHttp;

default
{
    state_entry()
    {
        llSetText("Owner touch: eject toucher", <1.0, 0.4, 0.4>, 1.0);
    }

    touch_start(integer n)
    {
        if (llDetectedKey(0) != llGetOwner())
        {
            llInstantMessage(llDetectedKey(0), "Owner only.");
            return;
        }
        // Owner must sit this on a staff HUD, or change who to a sensor target.
        key who = llDetectedKey(0);
        string body = llList2Json(JSON_OBJECT, [
            "group_uuid", GROUP_UUID,
            "avatar_uuid", (string)who
        ]);
        gHttp = llHTTPRequest(API_BASE + "/group/eject", [
            HTTP_METHOD, "POST",
            HTTP_MIMETYPE, "application/json",
            HTTP_CUSTOM_HEADER, "X-Api-Key", API_KEY
        ], body);
    }

    http_response(key id, integer status, list meta, string body)
    {
        if (id != gHttp) return;
        llOwnerSay("Eject (" + (string)status + "): " + body);
    }
}

POST /group/notice

subject max 255 characters. body max 4096. Counts as one message per current member against the daily pool.

curl
curl -s https://fluxbots.net/api/v1/group/notice ^
  -H "X-Api-Key: fb_YOUR_KEY" ^
  -H "Content-Type: application/json" ^
  -d "{\"group_uuid\":\"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\"subject\":\"Tonight\",\"body\":\"Doors at 7pm SLT.\"}"
LSL (drop in a prim)
// Owner touch -> group notice
string  API_BASE   = "https://fluxbots.net/api/v1";
string  API_KEY    = "fb_PASTE_KEY_HERE";
string  GROUP_UUID = "00000000-0000-0000-0000-000000000000";
string  SUBJECT    = "Tonight";
string  BODY       = "Doors at 7pm SLT.";

key gHttp;

default
{
    state_entry()
    {
        llSetText("Owner touch: send notice", <1.0, 0.6, 0.2>, 1.0);
    }

    touch_start(integer n)
    {
        if (llDetectedKey(0) != llGetOwner())
        {
            llInstantMessage(llDetectedKey(0), "Owner only.");
            return;
        }
        string body = llList2Json(JSON_OBJECT, [
            "group_uuid", GROUP_UUID,
            "subject", SUBJECT,
            "body", BODY
        ]);
        gHttp = llHTTPRequest(API_BASE + "/group/notice", [
            HTTP_METHOD, "POST",
            HTTP_MIMETYPE, "application/json",
            HTTP_CUSTOM_HEADER, "X-Api-Key", API_KEY
        ], body);
    }

    http_response(key id, integer status, list meta, string body)
    {
        if (id != gHttp) return;
        if (status >= 200 && status < 300) llOwnerSay("Notice queued: " + body);
        else llOwnerSay("Notice failed (" + (string)status + "): " + body);
    }
}

POST /group/group-chat

Send one line into group chat as the shared avatar. Max 1023 characters.

curl
curl -s https://fluxbots.net/api/v1/group/group-chat ^
  -H "X-Api-Key: fb_YOUR_KEY" ^
  -H "Content-Type: application/json" ^
  -d "{\"group_uuid\":\"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\"message\":\"Club is open.\"}"
LSL (drop in a prim)
// Owner says on channel 7 -> group chat
string  API_BASE   = "https://fluxbots.net/api/v1";
string  API_KEY    = "fb_PASTE_KEY_HERE";
string  GROUP_UUID = "00000000-0000-0000-0000-000000000000";
integer CHAN       = 7;

key gHttp;

default
{
    state_entry()
    {
        llListen(CHAN, "", llGetOwner(), "");
        llOwnerSay("Say /" + (string)CHAN + " your message");
    }

    listen(integer c, string name, key id, string msg)
    {
        if (id != llGetOwner()) return;
        string body = llList2Json(JSON_OBJECT, [
            "group_uuid", GROUP_UUID,
            "message", msg
        ]);
        gHttp = llHTTPRequest(API_BASE + "/group/group-chat", [
            HTTP_METHOD, "POST",
            HTTP_MIMETYPE, "application/json",
            HTTP_CUSTOM_HEADER, "X-Api-Key", API_KEY
        ], body);
    }

    http_response(key id, integer status, list meta, string body)
    {
        if (id != gHttp) return;
        llOwnerSay("Group chat (" + (string)status + "): " + body);
    }
}

Paired inviter (no API key in the prim)

Use the official group-service-inviter.lsl on a live product. The two calls below are only if you write your own device.

POST /group/devices/pair has no API key. Body: code, owner_uuid, object_key, optional owner_name and region. Success returns device_token. Store it in linkset data. 20 tries per IP per 10 minutes.

curl
curl -s https://fluxbots.net/api/v1/group/devices/pair ^
  -H "Content-Type: application/json" ^
  -d "{\"code\":\"AB12CD\",\"owner_uuid\":\"aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee\",\"object_key\":\"ffffffff-1111-2222-3333-444444444444\"}"
LSL (drop in a prim)
// Owner types pairing code in chat on channel 9
string  API_BASE = "https://fluxbots.net/api/v1";
integer CHAN     = 9;
key     gHttp;

default
{
    state_entry()
    {
        llListen(CHAN, "", llGetOwner(), "");
        llOwnerSay("Say /9 YOURCODE to pair this prim.");
    }

    listen(integer c, string name, key id, string msg)
    {
        string body = llList2Json(JSON_OBJECT, [
            "code", llToUpper(llStringTrim(msg, STRING_TRIM)),
            "owner_uuid", (string)llGetOwner(),
            "owner_name", llKey2Name(llGetOwner()),
            "object_key", (string)llGetKey(),
            "region", llGetRegionName()
        ]);
        gHttp = llHTTPRequest(API_BASE + "/group/devices/pair", [
            HTTP_METHOD, "POST",
            HTTP_MIMETYPE, "application/json"
        ], body);
    }

    http_response(key id, integer status, list meta, string body)
    {
        if (id != gHttp) return;
        llOwnerSay("Pair (" + (string)status + "): " + body);
        if (status >= 200 && status < 300)
        {
            string tok = llJsonGetValue(body, ["device_token"]);
            if (tok != JSON_INVALID) llLinksetDataWrite("fb_token", tok);
        }
    }
}

POST /group/devices/invite uses header X-Device-Token. Body: avatar_uuid required, avatar_name optional. Limit/cooldown returns 200 with skipped. Unpaid groups return 402.

curl
curl -s https://fluxbots.net/api/v1/group/devices/invite ^
  -H "X-Device-Token: DEVICE_TOKEN" ^
  -H "Content-Type: application/json" ^
  -d "{\"avatar_uuid\":\"11111111-2222-3333-4444-555555555555\",\"avatar_name\":\"Jane Resident\"}"
LSL (drop in a prim)
// Touch -> invite using the paired device token (no API key)
string  API_BASE = "https://fluxbots.net/api/v1";
key     gHttp;

default
{
    touch_start(integer n)
    {
        string tok = llLinksetDataRead("fb_token");
        if (tok == "")
        {
            llOwnerSay("Pair this prim first.");
            return;
        }
        key who = llDetectedKey(0);
        string body = llList2Json(JSON_OBJECT, [
            "avatar_uuid", (string)who,
            "avatar_name", llDetectedName(0)
        ]);
        gHttp = llHTTPRequest(API_BASE + "/group/devices/invite", [
            HTTP_METHOD, "POST",
            HTTP_MIMETYPE, "application/json",
            HTTP_CUSTOM_HEADER, "X-Device-Token", tok
        ], body);
        llInstantMessage(who, "Sending group invite...");
    }

    http_response(key id, integer status, list meta, string body)
    {
        if (id != gHttp) return;
        llOwnerSay("Invite (" + (string)status + "): " + body);
    }
}