Teams
Teams, their members and their invites.
14 operations. Errors link to their row on the overview.
Export a team’s audit loglink to Export a team’s audit log
GET /v1/org/{id}/audit
The team’s audit log, oldest first, as NDJSON (default) or CSV: who, on which device and through which agent, used which credential class for what, and the outcome. Rows are kept for a year. Owners and admins only; a member gets 403 and a caller outside the team 404. At most limit rows per request; when more remain, the x-next-cursor header carries the cursor for the next page. Columns, in CSV order: ts, org_id, actor_user_id, actor_email, device_id, agent, credential_class, credential_ref, action, target, outcome, request_id, ip, ua.
A caller key holding teams:read (Authorization: Bearer sbc_… or x-api-key: sbc_…), or a signed-in session.
Path parameters
idstring requiredThe team id (
org_…).
Query parameters
formatstring optionalAttachment format; default ndjson. One of
ndjson,csv.sincestring (date-time) optionalRows at or after this time; default a year ago.
untilstring (date-time) optionalRows before this time; default now.
cursorstring optionalThe previous page’s
x-next-cursor.limitinteger optionalRows per page; default 1000, and anything above 5000 is read as 5000.
Response 200
The rows, as an attachment.
Errors
| Status | Code | What to change |
|---|---|---|
| 400 | invalid_request | A parameter or body field is invalid; |
| 401 | unauthorized | Send a live caller key or session as |
| 403 | insufficient_scope | The key lacks the scope in |
| 404 | not_found | No such resource on this account; check the id. |
| 503 | The audit store is unavailable; retry later. |
curl
curl -sS -X GET "https://superbot.gg/v1/org/$ID/audit" \
-H "Authorization: Bearer $SUPERBOT_API_KEY"JavaScript
const id = 'ID';
const res = await fetch(`https://superbot.gg/v1/org/${id}/audit`, {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.SUPERBOT_API_KEY}`,
},
});
console.log(res.status, await res.json());Python
import os
import requests
id = "ID"
res = requests.request(
"GET",
f"https://superbot.gg/v1/org/{id}/audit",
headers={
"Authorization": f"Bearer {os.environ['SUPERBOT_API_KEY']}",
},
)
print(res.status_code, res.json())200 The rows, as an attachment.
application/x-ndjson: string400 The request is malformed or a parameter is invalid; `param` names the field.
{
"error": "invalid_request",
"message": "A parameter or body field is invalid; param names it and issues lists every problem.",
"doc_url": "https://superbot.gg/developers#errors-invalid_request",
"request_id": "req_5f1c0a9e2b7d4c3a1e0f9b8d"
}401 The bearer is missing, malformed or unknown.
{
"error": "unauthorized",
"message": "Send a live caller key or session as Authorization: Bearer … or x-api-key. No key yet: create one at /account/api, or sign a user in at /auth.md.",
"doc_url": "https://superbot.gg/developers#errors-unauthorized",
"request_id": "req_5f1c0a9e2b7d4c3a1e0f9b8d"
}403 The key lacks a scope (insufficient_scope), is revoked, or may not call this route.
{
"error": "insufficient_scope",
"message": "The key lacks the scope in required_scopes; mint a key that holds it.",
"doc_url": "https://superbot.gg/developers#errors-insufficient_scope",
"request_id": "req_5f1c0a9e2b7d4c3a1e0f9b8d"
}404 No such resource on this account.
{
"error": "not_found",
"message": "No such resource on this account; check the id.",
"doc_url": "https://superbot.gg/developers#errors-not_found",
"request_id": "req_5f1c0a9e2b7d4c3a1e0f9b8d"
}503 The audit store is unavailable; retry later.
{
"error": "insufficient_scope",
"message": "your-message",
"doc_url": "https://example.com",
"request_id": "req_5f1c0a9e2b7d4c3a1e0f9b8d",
"param": "your-param"
}List teamslink to List teams
GET /v1/teams
Every team the caller is a live member of, oldest first. A team key sees only its own team.
A caller key holding teams:read (Authorization: Bearer sbc_… or x-api-key: sbc_…), or a signed-in session.
Query parameters
limitinteger optionalItems per page, 1-100.
after_idstring optionalReturn the page after this resource id (the previous page’s
last_id).before_idstring optionalReturn the page before this resource id (the next page’s
first_id).
Response 200
One page of teams.
objectstring requiredOne of
list.dataarray of Team required9 fields
idstring requiredobjectstring requiredOne of
team.namestring requiredroleTeamRole requiredThe caller's role in this team. One of
owner,admin,editor,member.member_countinteger requiredcreated_atstring requiredshare_defaultsobject requiredWhat a new member pools by default, per kind.
3 fields
mcpboolean requiredrulesboolean requiredskillsboolean required
share_policystring requiredWho may add items to the pool. One of
members,editors.require_manual_confirmboolean required
has_moreboolean requiredfirst_idstring | null requiredId of the first item on this page; pass as
before_idfor the previous page.last_idstring | null requiredId of the last item on this page; pass as
after_idfor the next page.
Errors
| Status | Code | What to change |
|---|---|---|
| 400 | invalid_request | A parameter or body field is invalid; |
| 401 | unauthorized | Send a live caller key or session as |
| 403 | insufficient_scope | The key lacks the scope in |
curl
curl -sS -X GET "https://superbot.gg/v1/teams" \
-H "Authorization: Bearer $SUPERBOT_API_KEY"JavaScript
const res = await fetch(`https://superbot.gg/v1/teams`, {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.SUPERBOT_API_KEY}`,
},
});
console.log(res.status, await res.json());Python
import os
import requests
res = requests.request(
"GET",
"https://superbot.gg/v1/teams",
headers={
"Authorization": f"Bearer {os.environ['SUPERBOT_API_KEY']}",
},
)
print(res.status_code, res.json())200 One page of teams.
{
"object": "list",
"data": [
{
"id": "org_7c1e…",
"object": "team",
"name": "your-name",
"role": "owner",
"member_count": 0,
"created_at": "your-created-at",
"share_defaults": {
"mcp": true,
"rules": true,
"skills": true
},
"share_policy": "members",
"require_manual_confirm": true
}
],
"has_more": true,
"first_id": "your-first-id",
"last_id": "your-last-id"
}400 The request is malformed or a parameter is invalid; `param` names the field.
{
"error": "invalid_request",
"message": "A parameter or body field is invalid; param names it and issues lists every problem.",
"doc_url": "https://superbot.gg/developers#errors-invalid_request",
"request_id": "req_5f1c0a9e2b7d4c3a1e0f9b8d"
}401 The bearer is missing, malformed or unknown.
{
"error": "unauthorized",
"message": "Send a live caller key or session as Authorization: Bearer … or x-api-key. No key yet: create one at /account/api, or sign a user in at /auth.md.",
"doc_url": "https://superbot.gg/developers#errors-unauthorized",
"request_id": "req_5f1c0a9e2b7d4c3a1e0f9b8d"
}403 The key lacks a scope (insufficient_scope), is revoked, or may not call this route.
{
"error": "insufficient_scope",
"message": "The key lacks the scope in required_scopes; mint a key that holds it.",
"doc_url": "https://superbot.gg/developers#errors-insufficient_scope",
"request_id": "req_5f1c0a9e2b7d4c3a1e0f9b8d"
}Create a teamlink to Create a team
POST /v1/teams
Create a team with the caller as its one owner. The owner’s Helper sets up the team key when it next syncs.
A caller key holding teams:write (Authorization: Bearer sbc_… or x-api-key: sbc_…), or a signed-in session.
Request body
namestring required
Response 201
The new team.
idstring requiredobjectstring requiredOne of
team.namestring requiredroleTeamRole requiredThe caller's role in this team. One of
owner,admin,editor,member.member_countinteger requiredcreated_atstring requiredshare_defaultsobject requiredWhat a new member pools by default, per kind.
3 fields
mcpboolean requiredrulesboolean requiredskillsboolean required
share_policystring requiredWho may add items to the pool. One of
members,editors.require_manual_confirmboolean required
Errors
| Status | Code | What to change |
|---|---|---|
| 400 | invalid_request | A parameter or body field is invalid; |
| 401 | unauthorized | Send a live caller key or session as |
| 403 | insufficient_scope | The key lacks the scope in |
curl
curl -sS -X POST "https://superbot.gg/v1/teams" \
-H "Authorization: Bearer $SUPERBOT_API_KEY" \
-H "content-type: application/json" \
-d '{"name":"your-name"}'JavaScript
const res = await fetch(`https://superbot.gg/v1/teams`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SUPERBOT_API_KEY}`,
'content-type': 'application/json',
},
body: JSON.stringify({"name":"your-name"}),
});
console.log(res.status, await res.json());Python
import os
import requests
res = requests.request(
"POST",
"https://superbot.gg/v1/teams",
headers={
"Authorization": f"Bearer {os.environ['SUPERBOT_API_KEY']}",
"content-type": "application/json",
},
json={"name":"your-name"},
)
print(res.status_code, res.json())201 The new team.
{
"id": "org_7c1e…",
"object": "team",
"name": "your-name",
"role": "owner",
"member_count": 0,
"created_at": "your-created-at",
"share_defaults": {
"mcp": true,
"rules": true,
"skills": true
},
"share_policy": "members",
"require_manual_confirm": true
}400 The request is malformed or a parameter is invalid; `param` names the field.
{
"error": "invalid_request",
"message": "A parameter or body field is invalid; param names it and issues lists every problem.",
"doc_url": "https://superbot.gg/developers#errors-invalid_request",
"request_id": "req_5f1c0a9e2b7d4c3a1e0f9b8d"
}401 The bearer is missing, malformed or unknown.
{
"error": "unauthorized",
"message": "Send a live caller key or session as Authorization: Bearer … or x-api-key. No key yet: create one at /account/api, or sign a user in at /auth.md.",
"doc_url": "https://superbot.gg/developers#errors-unauthorized",
"request_id": "req_5f1c0a9e2b7d4c3a1e0f9b8d"
}403 The key lacks a scope (insufficient_scope), is revoked, or may not call this route.
{
"error": "insufficient_scope",
"message": "The key lacks the scope in required_scopes; mint a key that holds it.",
"doc_url": "https://superbot.gg/developers#errors-insufficient_scope",
"request_id": "req_5f1c0a9e2b7d4c3a1e0f9b8d"
}Get a teamlink to Get a team
GET /v1/teams/{team_id}
One team the caller is a member of, with the caller’s own role.
A caller key holding teams:read (Authorization: Bearer sbc_… or x-api-key: sbc_…), or a signed-in session.
Path parameters
team_idstring requiredThe team id.
Response 200
The team.
idstring requiredobjectstring requiredOne of
team.namestring requiredroleTeamRole requiredThe caller's role in this team. One of
owner,admin,editor,member.member_countinteger requiredcreated_atstring requiredshare_defaultsobject requiredWhat a new member pools by default, per kind.
3 fields
mcpboolean requiredrulesboolean requiredskillsboolean required
share_policystring requiredWho may add items to the pool. One of
members,editors.require_manual_confirmboolean required
Errors
| Status | Code | What to change |
|---|---|---|
| 401 | unauthorized | Send a live caller key or session as |
| 403 | insufficient_scope | The key lacks the scope in |
| 404 | not_found | No such resource on this account; check the id. |
curl
curl -sS -X GET "https://superbot.gg/v1/teams/$TEAM_ID" \
-H "Authorization: Bearer $SUPERBOT_API_KEY"JavaScript
const teamId = 'TEAM_ID';
const res = await fetch(`https://superbot.gg/v1/teams/${teamId}`, {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.SUPERBOT_API_KEY}`,
},
});
console.log(res.status, await res.json());Python
import os
import requests
team_id = "TEAM_ID"
res = requests.request(
"GET",
f"https://superbot.gg/v1/teams/{team_id}",
headers={
"Authorization": f"Bearer {os.environ['SUPERBOT_API_KEY']}",
},
)
print(res.status_code, res.json())200 The team.
{
"id": "org_7c1e…",
"object": "team",
"name": "your-name",
"role": "owner",
"member_count": 0,
"created_at": "your-created-at",
"share_defaults": {
"mcp": true,
"rules": true,
"skills": true
},
"share_policy": "members",
"require_manual_confirm": true
}401 The bearer is missing, malformed or unknown.
{
"error": "unauthorized",
"message": "Send a live caller key or session as Authorization: Bearer … or x-api-key. No key yet: create one at /account/api, or sign a user in at /auth.md.",
"doc_url": "https://superbot.gg/developers#errors-unauthorized",
"request_id": "req_5f1c0a9e2b7d4c3a1e0f9b8d"
}403 The key lacks a scope (insufficient_scope), is revoked, or may not call this route.
{
"error": "insufficient_scope",
"message": "The key lacks the scope in required_scopes; mint a key that holds it.",
"doc_url": "https://superbot.gg/developers#errors-insufficient_scope",
"request_id": "req_5f1c0a9e2b7d4c3a1e0f9b8d"
}404 No such resource on this account.
{
"error": "not_found",
"message": "No such resource on this account; check the id.",
"doc_url": "https://superbot.gg/developers#errors-not_found",
"request_id": "req_5f1c0a9e2b7d4c3a1e0f9b8d"
}Update a teamlink to Update a team
PATCH /v1/teams/{team_id}
Rename a team or change its sharing settings. Only the fields sent change. Admins and owners only.
A caller key holding teams:write (Authorization: Bearer sbc_… or x-api-key: sbc_…), or a signed-in session.
Path parameters
team_idstring requiredThe team id.
Request body
namestringshare_defaultsobjectWhat a new member pools by default, per kind.
3 fields
mcpboolean requiredrulesboolean requiredskillsboolean required
share_policystringWho may add items to the pool. One of
members,editors.require_manual_confirmbooleanWhether an admin must confirm each new member before they receive team secrets.
Response 200
The updated team.
idstring requiredobjectstring requiredOne of
team.namestring requiredroleTeamRole requiredThe caller's role in this team. One of
owner,admin,editor,member.member_countinteger requiredcreated_atstring requiredshare_defaultsobject requiredWhat a new member pools by default, per kind.
3 fields
mcpboolean requiredrulesboolean requiredskillsboolean required
share_policystring requiredWho may add items to the pool. One of
members,editors.require_manual_confirmboolean required
Errors
| Status | Code | What to change |
|---|---|---|
| 400 | invalid_request | A parameter or body field is invalid; |
| 401 | unauthorized | Send a live caller key or session as |
| 403 | insufficient_scope | The key lacks the scope in |
| 404 | not_found | No such resource on this account; check the id. |
curl
curl -sS -X PATCH "https://superbot.gg/v1/teams/$TEAM_ID" \
-H "Authorization: Bearer $SUPERBOT_API_KEY" \
-H "content-type: application/json" \
-d '{"name":"your-name","share_defaults":{"mcp":true,"rules":true,"skills":true},"share_policy":"members"}'JavaScript
const teamId = 'TEAM_ID';
const res = await fetch(`https://superbot.gg/v1/teams/${teamId}`, {
method: 'PATCH',
headers: {
Authorization: `Bearer ${process.env.SUPERBOT_API_KEY}`,
'content-type': 'application/json',
},
body: JSON.stringify({"name":"your-name","share_defaults":{"mcp":true,"rules":true,"skills":true},"share_policy":"members"}),
});
console.log(res.status, await res.json());Python
import os
import requests
team_id = "TEAM_ID"
res = requests.request(
"PATCH",
f"https://superbot.gg/v1/teams/{team_id}",
headers={
"Authorization": f"Bearer {os.environ['SUPERBOT_API_KEY']}",
"content-type": "application/json",
},
json={"name":"your-name","share_defaults":{"mcp":True,"rules":True,"skills":True},"share_policy":"members"},
)
print(res.status_code, res.json())200 The updated team.
{
"id": "org_7c1e…",
"object": "team",
"name": "your-name",
"role": "owner",
"member_count": 0,
"created_at": "your-created-at",
"share_defaults": {
"mcp": true,
"rules": true,
"skills": true
},
"share_policy": "members",
"require_manual_confirm": true
}400 The request is malformed or a parameter is invalid; `param` names the field.
{
"error": "invalid_request",
"message": "A parameter or body field is invalid; param names it and issues lists every problem.",
"doc_url": "https://superbot.gg/developers#errors-invalid_request",
"request_id": "req_5f1c0a9e2b7d4c3a1e0f9b8d"
}401 The bearer is missing, malformed or unknown.
{
"error": "unauthorized",
"message": "Send a live caller key or session as Authorization: Bearer … or x-api-key. No key yet: create one at /account/api, or sign a user in at /auth.md.",
"doc_url": "https://superbot.gg/developers#errors-unauthorized",
"request_id": "req_5f1c0a9e2b7d4c3a1e0f9b8d"
}403 The key lacks a scope (insufficient_scope), is revoked, or may not call this route.
{
"error": "insufficient_scope",
"message": "The key lacks the scope in required_scopes; mint a key that holds it.",
"doc_url": "https://superbot.gg/developers#errors-insufficient_scope",
"request_id": "req_5f1c0a9e2b7d4c3a1e0f9b8d"
}404 No such resource on this account.
{
"error": "not_found",
"message": "No such resource on this account; check the id.",
"doc_url": "https://superbot.gg/developers#errors-not_found",
"request_id": "req_5f1c0a9e2b7d4c3a1e0f9b8d"
}Delete a teamlink to Delete a team
DELETE /v1/teams/{team_id}
Delete a team and every membership in it. Owners only. This cannot be undone.
A caller key holding teams:write (Authorization: Bearer sbc_… or x-api-key: sbc_…), or a signed-in session.
Path parameters
team_idstring requiredThe team id.
Response 200
The team is gone.
idstring requiredobjectstring requiredOne of
team.deletedboolean requiredOne of
true.
Errors
| Status | Code | What to change |
|---|---|---|
| 401 | unauthorized | Send a live caller key or session as |
| 403 | insufficient_scope | The key lacks the scope in |
| 404 | not_found | No such resource on this account; check the id. |
curl
curl -sS -X DELETE "https://superbot.gg/v1/teams/$TEAM_ID" \
-H "Authorization: Bearer $SUPERBOT_API_KEY"JavaScript
const teamId = 'TEAM_ID';
const res = await fetch(`https://superbot.gg/v1/teams/${teamId}`, {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.SUPERBOT_API_KEY}`,
},
});
console.log(res.status, await res.json());Python
import os
import requests
team_id = "TEAM_ID"
res = requests.request(
"DELETE",
f"https://superbot.gg/v1/teams/{team_id}",
headers={
"Authorization": f"Bearer {os.environ['SUPERBOT_API_KEY']}",
},
)
print(res.status_code, res.json())200 The team is gone.
{
"id": "your-id",
"object": "team",
"deleted": true
}401 The bearer is missing, malformed or unknown.
{
"error": "unauthorized",
"message": "Send a live caller key or session as Authorization: Bearer … or x-api-key. No key yet: create one at /account/api, or sign a user in at /auth.md.",
"doc_url": "https://superbot.gg/developers#errors-unauthorized",
"request_id": "req_5f1c0a9e2b7d4c3a1e0f9b8d"
}403 The key lacks a scope (insufficient_scope), is revoked, or may not call this route.
{
"error": "insufficient_scope",
"message": "The key lacks the scope in required_scopes; mint a key that holds it.",
"doc_url": "https://superbot.gg/developers#errors-insufficient_scope",
"request_id": "req_5f1c0a9e2b7d4c3a1e0f9b8d"
}404 No such resource on this account.
{
"error": "not_found",
"message": "No such resource on this account; check the id.",
"doc_url": "https://superbot.gg/developers#errors-not_found",
"request_id": "req_5f1c0a9e2b7d4c3a1e0f9b8d"
}List team memberslink to List team members
GET /v1/teams/{team_id}/members
The team’s live members, paged by user id in join order.
A caller key holding teams:read (Authorization: Bearer sbc_… or x-api-key: sbc_…), or a signed-in session.
Path parameters
team_idstring requiredThe team id.
Query parameters
limitinteger optionalItems per page, 1-100.
after_idstring optionalReturn the page after this resource id (the previous page’s
last_id).before_idstring optionalReturn the page before this resource id (the next page’s
first_id).
Response 200
One page of members.
objectstring requiredOne of
list.dataarray of TeamMember required5 fields
objectstring requiredOne of
team_member.user_idstring requiredroleTeamRole requiredThe caller's role in this team. One of
owner,admin,editor,member.groupsarray of string requiredjoined_atstring required
has_moreboolean requiredfirst_idstring | null requiredId of the first item on this page; pass as
before_idfor the previous page.last_idstring | null requiredId of the last item on this page; pass as
after_idfor the next page.
Errors
| Status | Code | What to change |
|---|---|---|
| 400 | invalid_request | A parameter or body field is invalid; |
| 401 | unauthorized | Send a live caller key or session as |
| 403 | insufficient_scope | The key lacks the scope in |
| 404 | not_found | No such resource on this account; check the id. |
curl
curl -sS -X GET "https://superbot.gg/v1/teams/$TEAM_ID/members" \
-H "Authorization: Bearer $SUPERBOT_API_KEY"JavaScript
const teamId = 'TEAM_ID';
const res = await fetch(`https://superbot.gg/v1/teams/${teamId}/members`, {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.SUPERBOT_API_KEY}`,
},
});
console.log(res.status, await res.json());Python
import os
import requests
team_id = "TEAM_ID"
res = requests.request(
"GET",
f"https://superbot.gg/v1/teams/{team_id}/members",
headers={
"Authorization": f"Bearer {os.environ['SUPERBOT_API_KEY']}",
},
)
print(res.status_code, res.json())200 One page of members.
{
"object": "list",
"data": [
{
"object": "team_member",
"user_id": "your-user-id",
"role": "owner",
"groups": [
"your-groups"
],
"joined_at": "your-joined-at"
}
],
"has_more": true,
"first_id": "your-first-id",
"last_id": "your-last-id"
}400 The request is malformed or a parameter is invalid; `param` names the field.
{
"error": "invalid_request",
"message": "A parameter or body field is invalid; param names it and issues lists every problem.",
"doc_url": "https://superbot.gg/developers#errors-invalid_request",
"request_id": "req_5f1c0a9e2b7d4c3a1e0f9b8d"
}401 The bearer is missing, malformed or unknown.
{
"error": "unauthorized",
"message": "Send a live caller key or session as Authorization: Bearer … or x-api-key. No key yet: create one at /account/api, or sign a user in at /auth.md.",
"doc_url": "https://superbot.gg/developers#errors-unauthorized",
"request_id": "req_5f1c0a9e2b7d4c3a1e0f9b8d"
}403 The key lacks a scope (insufficient_scope), is revoked, or may not call this route.
{
"error": "insufficient_scope",
"message": "The key lacks the scope in required_scopes; mint a key that holds it.",
"doc_url": "https://superbot.gg/developers#errors-insufficient_scope",
"request_id": "req_5f1c0a9e2b7d4c3a1e0f9b8d"
}404 No such resource on this account.
{
"error": "not_found",
"message": "No such resource on this account; check the id.",
"doc_url": "https://superbot.gg/developers#errors-not_found",
"request_id": "req_5f1c0a9e2b7d4c3a1e0f9b8d"
}Change a member’s rolelink to Change a member’s role
PATCH /v1/teams/{team_id}/members/{user_id}
Set a member’s role. You can only grant a role below your own, to a member below your own. Ownership never moves here.
A caller key holding teams:write (Authorization: Bearer sbc_… or x-api-key: sbc_…), or a signed-in session.
Path parameters
team_idstring requiredThe team id.
user_idstring requiredThe member’s account id.
Request body
roleTeamRole requiredThe caller's role in this team. One of
owner,admin,editor,member.
Response 200
The member.
objectstring requiredOne of
team_member.user_idstring requiredroleTeamRole requiredThe caller's role in this team. One of
owner,admin,editor,member.groupsarray of string requiredjoined_atstring required
Errors
| Status | Code | What to change |
|---|---|---|
| 400 | invalid_request | A parameter or body field is invalid; |
| 401 | unauthorized | Send a live caller key or session as |
| 403 | insufficient_scope | The key lacks the scope in |
| 404 | not_found | No such resource on this account; check the id. |
curl
curl -sS -X PATCH "https://superbot.gg/v1/teams/$TEAM_ID/members/$USER_ID" \
-H "Authorization: Bearer $SUPERBOT_API_KEY" \
-H "content-type: application/json" \
-d '{"role":"owner"}'JavaScript
const teamId = 'TEAM_ID';
const userId = 'USER_ID';
const res = await fetch(`https://superbot.gg/v1/teams/${teamId}/members/${userId}`, {
method: 'PATCH',
headers: {
Authorization: `Bearer ${process.env.SUPERBOT_API_KEY}`,
'content-type': 'application/json',
},
body: JSON.stringify({"role":"owner"}),
});
console.log(res.status, await res.json());Python
import os
import requests
team_id = "TEAM_ID"
user_id = "USER_ID"
res = requests.request(
"PATCH",
f"https://superbot.gg/v1/teams/{team_id}/members/{user_id}",
headers={
"Authorization": f"Bearer {os.environ['SUPERBOT_API_KEY']}",
"content-type": "application/json",
},
json={"role":"owner"},
)
print(res.status_code, res.json())200 The member.
{
"object": "team_member",
"user_id": "your-user-id",
"role": "owner",
"groups": [
"your-groups"
],
"joined_at": "your-joined-at"
}400 The request is malformed or a parameter is invalid; `param` names the field.
{
"error": "invalid_request",
"message": "A parameter or body field is invalid; param names it and issues lists every problem.",
"doc_url": "https://superbot.gg/developers#errors-invalid_request",
"request_id": "req_5f1c0a9e2b7d4c3a1e0f9b8d"
}401 The bearer is missing, malformed or unknown.
{
"error": "unauthorized",
"message": "Send a live caller key or session as Authorization: Bearer … or x-api-key. No key yet: create one at /account/api, or sign a user in at /auth.md.",
"doc_url": "https://superbot.gg/developers#errors-unauthorized",
"request_id": "req_5f1c0a9e2b7d4c3a1e0f9b8d"
}403 The key lacks a scope (insufficient_scope), is revoked, or may not call this route.
{
"error": "insufficient_scope",
"message": "The key lacks the scope in required_scopes; mint a key that holds it.",
"doc_url": "https://superbot.gg/developers#errors-insufficient_scope",
"request_id": "req_5f1c0a9e2b7d4c3a1e0f9b8d"
}404 No such resource on this account.
{
"error": "not_found",
"message": "No such resource on this account; check the id.",
"doc_url": "https://superbot.gg/developers#errors-not_found",
"request_id": "req_5f1c0a9e2b7d4c3a1e0f9b8d"
}Remove a team memberlink to Remove a team member
DELETE /v1/teams/{team_id}/members/{user_id}
Remove a member. Admins remove members below them; owners remove anyone except the last owner (409 last_owner).
A caller key holding teams:write (Authorization: Bearer sbc_… or x-api-key: sbc_…), or a signed-in session.
Path parameters
team_idstring requiredThe team id.
user_idstring requiredThe member’s account id.
Response 200
The member is removed.
objectstring requiredOne of
team_member.user_idstring requireddeletedboolean requiredOne of
true.
Errors
| Status | Code | What to change |
|---|---|---|
| 401 | unauthorized | Send a live caller key or session as |
| 403 | insufficient_scope | The key lacks the scope in |
| 404 | not_found | No such resource on this account; check the id. |
| 409 | conflict | The resource is not in a state that allows this change. |
curl
curl -sS -X DELETE "https://superbot.gg/v1/teams/$TEAM_ID/members/$USER_ID" \
-H "Authorization: Bearer $SUPERBOT_API_KEY"JavaScript
const teamId = 'TEAM_ID';
const userId = 'USER_ID';
const res = await fetch(`https://superbot.gg/v1/teams/${teamId}/members/${userId}`, {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.SUPERBOT_API_KEY}`,
},
});
console.log(res.status, await res.json());Python
import os
import requests
team_id = "TEAM_ID"
user_id = "USER_ID"
res = requests.request(
"DELETE",
f"https://superbot.gg/v1/teams/{team_id}/members/{user_id}",
headers={
"Authorization": f"Bearer {os.environ['SUPERBOT_API_KEY']}",
},
)
print(res.status_code, res.json())200 The member is removed.
{
"object": "team_member",
"user_id": "your-user-id",
"deleted": true
}401 The bearer is missing, malformed or unknown.
{
"error": "unauthorized",
"message": "Send a live caller key or session as Authorization: Bearer … or x-api-key. No key yet: create one at /account/api, or sign a user in at /auth.md.",
"doc_url": "https://superbot.gg/developers#errors-unauthorized",
"request_id": "req_5f1c0a9e2b7d4c3a1e0f9b8d"
}403 The key lacks a scope (insufficient_scope), is revoked, or may not call this route.
{
"error": "insufficient_scope",
"message": "The key lacks the scope in required_scopes; mint a key that holds it.",
"doc_url": "https://superbot.gg/developers#errors-insufficient_scope",
"request_id": "req_5f1c0a9e2b7d4c3a1e0f9b8d"
}404 No such resource on this account.
{
"error": "not_found",
"message": "No such resource on this account; check the id.",
"doc_url": "https://superbot.gg/developers#errors-not_found",
"request_id": "req_5f1c0a9e2b7d4c3a1e0f9b8d"
}409 The resource is not in a state that allows this change.
{
"error": "conflict",
"message": "The resource is not in a state that allows this change.",
"doc_url": "https://superbot.gg/developers#errors-conflict",
"request_id": "req_5f1c0a9e2b7d4c3a1e0f9b8d"
}List pending team inviteslink to List pending team invites
GET /v1/teams/{team_id}/invites
Invites not yet accepted, revoked or expired, paged by invite code in the order they were sent. Admins and owners only.
A caller key holding teams:read (Authorization: Bearer sbc_… or x-api-key: sbc_…), or a signed-in session.
Path parameters
team_idstring requiredThe team id.
Query parameters
limitinteger optionalItems per page, 1-100.
after_idstring optionalReturn the page after this resource id (the previous page’s
last_id).before_idstring optionalReturn the page before this resource id (the next page’s
first_id).
Response 200
One page of invites.
objectstring requiredOne of
list.dataarray of TeamInvite required6 fields
objectstring requiredOne of
team_invite.codestring requiredemailstring requiredroleTeamRole requiredThe caller's role in this team. One of
owner,admin,editor,member.created_atstring requiredexpires_atstring
has_moreboolean requiredfirst_idstring | null requiredId of the first item on this page; pass as
before_idfor the previous page.last_idstring | null requiredId of the last item on this page; pass as
after_idfor the next page.
Errors
| Status | Code | What to change |
|---|---|---|
| 400 | invalid_request | A parameter or body field is invalid; |
| 401 | unauthorized | Send a live caller key or session as |
| 403 | insufficient_scope | The key lacks the scope in |
| 404 | not_found | No such resource on this account; check the id. |
curl
curl -sS -X GET "https://superbot.gg/v1/teams/$TEAM_ID/invites" \
-H "Authorization: Bearer $SUPERBOT_API_KEY"JavaScript
const teamId = 'TEAM_ID';
const res = await fetch(`https://superbot.gg/v1/teams/${teamId}/invites`, {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.SUPERBOT_API_KEY}`,
},
});
console.log(res.status, await res.json());Python
import os
import requests
team_id = "TEAM_ID"
res = requests.request(
"GET",
f"https://superbot.gg/v1/teams/{team_id}/invites",
headers={
"Authorization": f"Bearer {os.environ['SUPERBOT_API_KEY']}",
},
)
print(res.status_code, res.json())200 One page of invites.
{
"object": "list",
"data": [
{
"object": "team_invite",
"code": "your-code",
"email": "[email protected]",
"role": "owner",
"created_at": "your-created-at",
"expires_at": "your-expires-at"
}
],
"has_more": true,
"first_id": "your-first-id",
"last_id": "your-last-id"
}400 The request is malformed or a parameter is invalid; `param` names the field.
{
"error": "invalid_request",
"message": "A parameter or body field is invalid; param names it and issues lists every problem.",
"doc_url": "https://superbot.gg/developers#errors-invalid_request",
"request_id": "req_5f1c0a9e2b7d4c3a1e0f9b8d"
}401 The bearer is missing, malformed or unknown.
{
"error": "unauthorized",
"message": "Send a live caller key or session as Authorization: Bearer … or x-api-key. No key yet: create one at /account/api, or sign a user in at /auth.md.",
"doc_url": "https://superbot.gg/developers#errors-unauthorized",
"request_id": "req_5f1c0a9e2b7d4c3a1e0f9b8d"
}403 The key lacks a scope (insufficient_scope), is revoked, or may not call this route.
{
"error": "insufficient_scope",
"message": "The key lacks the scope in required_scopes; mint a key that holds it.",
"doc_url": "https://superbot.gg/developers#errors-insufficient_scope",
"request_id": "req_5f1c0a9e2b7d4c3a1e0f9b8d"
}404 No such resource on this account.
{
"error": "not_found",
"message": "No such resource on this account; check the id.",
"doc_url": "https://superbot.gg/developers#errors-not_found",
"request_id": "req_5f1c0a9e2b7d4c3a1e0f9b8d"
}Invite someone to a teamlink to Invite someone to a team
POST /v1/teams/{team_id}/invites
Email an invite for a role below your own (default member). A pending invite to the same address is replaced. Invites expire after 7 days.
A caller key holding teams:write (Authorization: Bearer sbc_… or x-api-key: sbc_…), or a signed-in session.
Path parameters
team_idstring requiredThe team id.
Request body
emailstring requiredroleTeamRoleThe caller's role in this team. One of
owner,admin,editor,member.
Response 201
The invite, already mailed.
objectstring requiredOne of
team_invite.codestring requiredemailstring requiredroleTeamRole requiredThe caller's role in this team. One of
owner,admin,editor,member.created_atstring requiredexpires_atstring
Errors
| Status | Code | What to change |
|---|---|---|
| 400 | invalid_request | A parameter or body field is invalid; |
| 401 | unauthorized | Send a live caller key or session as |
| 403 | insufficient_scope | The key lacks the scope in |
| 404 | not_found | No such resource on this account; check the id. |
curl
curl -sS -X POST "https://superbot.gg/v1/teams/$TEAM_ID/invites" \
-H "Authorization: Bearer $SUPERBOT_API_KEY" \
-H "content-type: application/json" \
-d '{"email":"[email protected]"}'JavaScript
const teamId = 'TEAM_ID';
const res = await fetch(`https://superbot.gg/v1/teams/${teamId}/invites`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SUPERBOT_API_KEY}`,
'content-type': 'application/json',
},
body: JSON.stringify({"email":"[email protected]"}),
});
console.log(res.status, await res.json());Python
import os
import requests
team_id = "TEAM_ID"
res = requests.request(
"POST",
f"https://superbot.gg/v1/teams/{team_id}/invites",
headers={
"Authorization": f"Bearer {os.environ['SUPERBOT_API_KEY']}",
"content-type": "application/json",
},
json={"email":"[email protected]"},
)
print(res.status_code, res.json())201 The invite, already mailed.
{
"object": "team_invite",
"code": "your-code",
"email": "[email protected]",
"role": "owner",
"created_at": "your-created-at",
"expires_at": "your-expires-at"
}400 The request is malformed or a parameter is invalid; `param` names the field.
{
"error": "invalid_request",
"message": "A parameter or body field is invalid; param names it and issues lists every problem.",
"doc_url": "https://superbot.gg/developers#errors-invalid_request",
"request_id": "req_5f1c0a9e2b7d4c3a1e0f9b8d"
}401 The bearer is missing, malformed or unknown.
{
"error": "unauthorized",
"message": "Send a live caller key or session as Authorization: Bearer … or x-api-key. No key yet: create one at /account/api, or sign a user in at /auth.md.",
"doc_url": "https://superbot.gg/developers#errors-unauthorized",
"request_id": "req_5f1c0a9e2b7d4c3a1e0f9b8d"
}403 The key lacks a scope (insufficient_scope), is revoked, or may not call this route.
{
"error": "insufficient_scope",
"message": "The key lacks the scope in required_scopes; mint a key that holds it.",
"doc_url": "https://superbot.gg/developers#errors-insufficient_scope",
"request_id": "req_5f1c0a9e2b7d4c3a1e0f9b8d"
}404 No such resource on this account.
{
"error": "not_found",
"message": "No such resource on this account; check the id.",
"doc_url": "https://superbot.gg/developers#errors-not_found",
"request_id": "req_5f1c0a9e2b7d4c3a1e0f9b8d"
}Revoke a team invitelink to Revoke a team invite
DELETE /v1/teams/{team_id}/invites/{code}
Revoke an invite. Its link stops working at once.
A caller key holding teams:write (Authorization: Bearer sbc_… or x-api-key: sbc_…), or a signed-in session.
Path parameters
team_idstring requiredThe team id.
codestring requiredThe invite code.
Response 200
The invite is revoked.
objectstring requiredOne of
team_invite.codestring requiredrevokedboolean requiredOne of
true.
Errors
| Status | Code | What to change |
|---|---|---|
| 401 | unauthorized | Send a live caller key or session as |
| 403 | insufficient_scope | The key lacks the scope in |
| 404 | not_found | No such resource on this account; check the id. |
curl
curl -sS -X DELETE "https://superbot.gg/v1/teams/$TEAM_ID/invites/$CODE" \
-H "Authorization: Bearer $SUPERBOT_API_KEY"JavaScript
const teamId = 'TEAM_ID';
const code = 'CODE';
const res = await fetch(`https://superbot.gg/v1/teams/${teamId}/invites/${code}`, {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.SUPERBOT_API_KEY}`,
},
});
console.log(res.status, await res.json());Python
import os
import requests
team_id = "TEAM_ID"
code = "CODE"
res = requests.request(
"DELETE",
f"https://superbot.gg/v1/teams/{team_id}/invites/{code}",
headers={
"Authorization": f"Bearer {os.environ['SUPERBOT_API_KEY']}",
},
)
print(res.status_code, res.json())200 The invite is revoked.
{
"object": "team_invite",
"code": "your-code",
"revoked": true
}401 The bearer is missing, malformed or unknown.
{
"error": "unauthorized",
"message": "Send a live caller key or session as Authorization: Bearer … or x-api-key. No key yet: create one at /account/api, or sign a user in at /auth.md.",
"doc_url": "https://superbot.gg/developers#errors-unauthorized",
"request_id": "req_5f1c0a9e2b7d4c3a1e0f9b8d"
}403 The key lacks a scope (insufficient_scope), is revoked, or may not call this route.
{
"error": "insufficient_scope",
"message": "The key lacks the scope in required_scopes; mint a key that holds it.",
"doc_url": "https://superbot.gg/developers#errors-insufficient_scope",
"request_id": "req_5f1c0a9e2b7d4c3a1e0f9b8d"
}404 No such resource on this account.
{
"error": "not_found",
"message": "No such resource on this account; check the id.",
"doc_url": "https://superbot.gg/developers#errors-not_found",
"request_id": "req_5f1c0a9e2b7d4c3a1e0f9b8d"
}Resend a team invitelink to Resend a team invite
POST /v1/teams/{team_id}/invites/{code}/resend
Replace a pending invite with a fresh code and mail it again. The old link stops working.
A caller key holding teams:write (Authorization: Bearer sbc_… or x-api-key: sbc_…), or a signed-in session.
Path parameters
team_idstring requiredThe team id.
codestring requiredThe invite code.
Response 200
The new invite, already mailed.
objectstring requiredOne of
team_invite.codestring requiredemailstring requiredroleTeamRole requiredThe caller's role in this team. One of
owner,admin,editor,member.created_atstring requiredexpires_atstring
Errors
| Status | Code | What to change |
|---|---|---|
| 401 | unauthorized | Send a live caller key or session as |
| 403 | insufficient_scope | The key lacks the scope in |
| 404 | not_found | No such resource on this account; check the id. |
| 409 | conflict | The resource is not in a state that allows this change. |
curl
curl -sS -X POST "https://superbot.gg/v1/teams/$TEAM_ID/invites/$CODE/resend" \
-H "Authorization: Bearer $SUPERBOT_API_KEY"JavaScript
const teamId = 'TEAM_ID';
const code = 'CODE';
const res = await fetch(`https://superbot.gg/v1/teams/${teamId}/invites/${code}/resend`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SUPERBOT_API_KEY}`,
},
});
console.log(res.status, await res.json());Python
import os
import requests
team_id = "TEAM_ID"
code = "CODE"
res = requests.request(
"POST",
f"https://superbot.gg/v1/teams/{team_id}/invites/{code}/resend",
headers={
"Authorization": f"Bearer {os.environ['SUPERBOT_API_KEY']}",
},
)
print(res.status_code, res.json())200 The new invite, already mailed.
{
"object": "team_invite",
"code": "your-code",
"email": "[email protected]",
"role": "owner",
"created_at": "your-created-at",
"expires_at": "your-expires-at"
}401 The bearer is missing, malformed or unknown.
{
"error": "unauthorized",
"message": "Send a live caller key or session as Authorization: Bearer … or x-api-key. No key yet: create one at /account/api, or sign a user in at /auth.md.",
"doc_url": "https://superbot.gg/developers#errors-unauthorized",
"request_id": "req_5f1c0a9e2b7d4c3a1e0f9b8d"
}403 The key lacks a scope (insufficient_scope), is revoked, or may not call this route.
{
"error": "insufficient_scope",
"message": "The key lacks the scope in required_scopes; mint a key that holds it.",
"doc_url": "https://superbot.gg/developers#errors-insufficient_scope",
"request_id": "req_5f1c0a9e2b7d4c3a1e0f9b8d"
}404 No such resource on this account.
{
"error": "not_found",
"message": "No such resource on this account; check the id.",
"doc_url": "https://superbot.gg/developers#errors-not_found",
"request_id": "req_5f1c0a9e2b7d4c3a1e0f9b8d"
}409 The resource is not in a state that allows this change.
{
"error": "conflict",
"message": "The resource is not in a state that allows this change.",
"doc_url": "https://superbot.gg/developers#errors-conflict",
"request_id": "req_5f1c0a9e2b7d4c3a1e0f9b8d"
}Accept a team invitelink to Accept a team invite
POST /v1/team_invites/{code}/accept
Join the team an invite names. The account’s email must match the invite; an account with no email adds one in Sign-in methods first (invite_needs_email). share chooses what you pool into the team; MCP servers stay unshared unless you set mcp.
A caller key holding teams:write (Authorization: Bearer sbc_… or x-api-key: sbc_…), or a signed-in session.
Path parameters
codestring requiredThe invite code.
Request body
shareobjectWhat to pool into the team, per kind.
3 fields
mcpbooleanrulesbooleanskillsboolean
Response 200
The team you joined.
idstring requiredobjectstring requiredOne of
team.namestring requiredroleTeamRole requiredThe caller's role in this team. One of
owner,admin,editor,member.member_countinteger requiredcreated_atstring requiredshare_defaultsobject requiredWhat a new member pools by default, per kind.
3 fields
mcpboolean requiredrulesboolean requiredskillsboolean required
share_policystring requiredWho may add items to the pool. One of
members,editors.require_manual_confirmboolean required
Errors
| Status | Code | What to change |
|---|---|---|
| 401 | unauthorized | Send a live caller key or session as |
| 403 | insufficient_scope | The key lacks the scope in |
| 404 | not_found | No such resource on this account; check the id. |
| 409 | conflict | The resource is not in a state that allows this change. |
curl
curl -sS -X POST "https://superbot.gg/v1/team_invites/$CODE/accept" \
-H "Authorization: Bearer $SUPERBOT_API_KEY" \
-H "content-type: application/json" \
-d '{"share":{"mcp":true,"rules":true,"skills":true}}'JavaScript
const code = 'CODE';
const res = await fetch(`https://superbot.gg/v1/team_invites/${code}/accept`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SUPERBOT_API_KEY}`,
'content-type': 'application/json',
},
body: JSON.stringify({"share":{"mcp":true,"rules":true,"skills":true}}),
});
console.log(res.status, await res.json());Python
import os
import requests
code = "CODE"
res = requests.request(
"POST",
f"https://superbot.gg/v1/team_invites/{code}/accept",
headers={
"Authorization": f"Bearer {os.environ['SUPERBOT_API_KEY']}",
"content-type": "application/json",
},
json={"share":{"mcp":True,"rules":True,"skills":True}},
)
print(res.status_code, res.json())200 The team you joined.
{
"id": "org_7c1e…",
"object": "team",
"name": "your-name",
"role": "owner",
"member_count": 0,
"created_at": "your-created-at",
"share_defaults": {
"mcp": true,
"rules": true,
"skills": true
},
"share_policy": "members",
"require_manual_confirm": true
}401 The bearer is missing, malformed or unknown.
{
"error": "unauthorized",
"message": "Send a live caller key or session as Authorization: Bearer … or x-api-key. No key yet: create one at /account/api, or sign a user in at /auth.md.",
"doc_url": "https://superbot.gg/developers#errors-unauthorized",
"request_id": "req_5f1c0a9e2b7d4c3a1e0f9b8d"
}403 The key lacks a scope (insufficient_scope), is revoked, or may not call this route.
{
"error": "insufficient_scope",
"message": "The key lacks the scope in required_scopes; mint a key that holds it.",
"doc_url": "https://superbot.gg/developers#errors-insufficient_scope",
"request_id": "req_5f1c0a9e2b7d4c3a1e0f9b8d"
}404 No such resource on this account.
{
"error": "not_found",
"message": "No such resource on this account; check the id.",
"doc_url": "https://superbot.gg/developers#errors-not_found",
"request_id": "req_5f1c0a9e2b7d4c3a1e0f9b8d"
}409 The resource is not in a state that allows this change.
{
"error": "conflict",
"message": "The resource is not in a state that allows this change.",
"doc_url": "https://superbot.gg/developers#errors-conflict",
"request_id": "req_5f1c0a9e2b7d4c3a1e0f9b8d"
}No operation matches this filter.