Omniplex Docs
PopplioStaging

Teams

These API endpoints are related to our teams system

GET
/teams/meta/permissions

Get Team Permissions

Gets all permissions that a team can have

/teams/meta/permissions
curl -X GET "https://spider-staging.omniplex.gg/teams/meta/permissions"

Success

{
  "perms": [
    {
      "category": "string",
      "dangerous": true,
      "desc": "string",
      "id": "string",
      "name": "string"
    }
  ]
}

GET
/teams/{id}

Get Team

Gets a team by ID

/teams/{id}

Path Parameters

id
Required
string

Team ID

Query Parameters

targets
Required
string

Entities to get. Can be one of the following: team_member, bot, server. Comma-seperated

curl -X GET "https://spider-staging.omniplex.gg/teams/string?targets=string"

Success

{
  "approximate_votes": 0,
  "created_at": "2019-08-24T14:15:22Z",
  "entities": {
    "bots": [
      {
        "approximate_votes": 0,
        "bot_id": "string",
        "clicks": 0,
        "created_at": "2019-08-24T14:15:22Z",
        "invite_clicks": 0,
        "library": "string",
        "nsfw": true,
        "premium": true,
        "servers": 0,
        "shards": 0,
        "short": "string",
        "tags": [
          "string"
        ],
        "type": "string",
        "user": {
          "avatar": "string",
          "bot": true,
          "display_name": "string",
          "extra_data": {
            "property1": null,
            "property2": null
          },
          "flags": [
            "string"
          ],
          "id": "string",
          "status": "string",
          "username": "string"
        },
        "vanity": "string",
        "vanity_ref": "e1b95001-3370-4367-9787-1fb904c7b8c7",
        "votes": 0
      }
    ],
    "members": [
      {
        "created_at": "2019-08-24T14:15:22Z",
        "data_holder": true,
        "flags": [
          "string"
        ],
        "itag": "6b5f8e7b-1e8c-4611-b693-ee8faa950c62",
        "mentionable": true,
        "service": "string",
        "team_id": "string",
        "user": {
          "avatar": "string",
          "bot": true,
          "display_name": "string",
          "extra_data": {
            "property1": null,
            "property2": null
          },
          "flags": [
            "string"
          ],
          "id": "string",
          "status": "string",
          "username": "string"
        }
      }
    ],
    "servers": [
      {
        "approximate_votes": 0,
        "avatar": "string",
        "clicks": 0,
        "invite_clicks": 0,
        "name": "string",
        "nsfw": true,
        "online_members": 0,
        "premium": true,
        "server_id": "string",
        "short": "string",
        "state": "string",
        "tags": [
          "string"
        ],
        "total_members": 0,
        "type": "string",
        "vanity": "string",
        "vanity_ref": "e1b95001-3370-4367-9787-1fb904c7b8c7",
        "votes": 0
      }
    ],
    "targets": [
      "string"
    ]
  },
  "extra_links": [
    {
      "name": "string",
      "value": "string"
    }
  ],
  "id": "string",
  "name": "string",
  "nsfw": true,
  "service": "string",
  "short": "string",
  "tags": [
    "string"
  ],
  "updated_at": "2019-08-24T14:15:22Z",
  "vanity": "string",
  "vanity_ref": "e1b95001-3370-4367-9787-1fb904c7b8c7",
  "vote_banned": true,
  "votes": 0
}

GET
/teams/{id}/seo

Get Team SEO Info

Gets the minimal SEO information about a team for embed/search purposes. Used by v4 website for meta tags

/teams/{id}/seo

Path Parameters

id
Required
string

The team ID, name or vanity

curl -X GET "https://spider-staging.omniplex.gg/teams/string/seo"

Success

{
  "avatar": "string",
  "id": "string",
  "name": "string",
  "short": "string"
}

POST
/teams

Create Team

Creates a team. Returns a 201 with the team ID on success.

/teams

The Authorization access token

Authorization

User-Auth<token>

Requires a user token. Should be prefixed with User in Authorization header.

In: header

Request Body

application/jsonRequired

extra_linksarray<object> | null

The team's links that it wishes to advertise

namestring

nsfwboolean | null

Whether the team is NSFW (primarily makes NSFW content)

shortstring | null

tagsarray<string> | null

curl -X POST "https://spider-staging.omniplex.gg/teams" \
  -H "User-Auth: <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "extra_links": [
      {
        "name": "string",
        "value": "string"
      }
    ],
    "name": "string",
    "nsfw": true,
    "short": "string",
    "tags": [
      "string"
    ]
  }'

Success

{
  "team_id": "string"
}

GET
/users/{id}/{target_type}/{target_id}/perms

Get Entity Permissions

Returns the resolved permissions a user has on an entity

/users/{id}/{target_type}/{target_id}/perms

Path Parameters

id
Required
string

The user's ID

target_type
Required
string

The target type of the entity

target_id
Required
string

The target ID of the entity

curl -X GET "https://spider-staging.omniplex.gg/users/string/string/string/perms"

Success

{
  "perms": [
    "string"
  ]
}

PATCH
/teams/{tid}

Edit Team Info

Edits a team. Returns a 204 on success.

/teams/{tid}

The Authorization access token

Authorization

User-Auth<token>

Requires a user token. Should be prefixed with User in Authorization header.

In: header

Team-Auth<token>

Requires a team API session token. Should be prefixed with Team in Authorization header.

In: header

Request Body

application/jsonRequired

extra_linksarray<object> | null

The team's links that it wishes to advertise

namestring

nsfwboolean | null

Whether the team is NSFW (primarily makes NSFW content)

shortstring | null

tagsarray<string> | null

Path Parameters

tid
Required
string

Team ID

curl -X PATCH "https://spider-staging.omniplex.gg/teams/string" \
  -H "User-Auth: <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "extra_links": [
      {
        "name": "string",
        "value": "string"
      }
    ],
    "name": "string",
    "nsfw": true,
    "short": "string",
    "tags": [
      "string"
    ]
  }'

Success

{
  "context": {
    "property1": "string",
    "property2": "string"
  },
  "message": "string"
}

DELETE
/teams/{tid}

Delete Team

Deletes the team. Requires the 'Owner' permission. Returns a 204 on success

/teams/{tid}

The Authorization access token

Authorization

User-Auth<token>

Requires a user token. Should be prefixed with User in Authorization header.

In: header

Team-Auth<token>

Requires a team API session token. Should be prefixed with Team in Authorization header.

In: header

Path Parameters

tid
Required
string

Team ID

curl -X DELETE "https://spider-staging.omniplex.gg/teams/string" \
  -H "User-Auth: <token>"

Success

{
  "context": {
    "property1": "string",
    "property2": "string"
  },
  "message": "string"
}

PUT
/teams/{tid}/members

Add Team Member

Adds a member to a team. Returns a 204 on success

/teams/{tid}/members

The Authorization access token

Authorization

User-Auth<token>

Requires a user token. Should be prefixed with User in Authorization header.

In: header

Team-Auth<token>

Requires a team API session token. Should be prefixed with Team in Authorization header.

In: header

Request Body

application/jsonRequired

permsarray<string>

The initial permissions to give to the user

user_idstring

The ID of the user to add to the team

Path Parameters

tid
Required
string

Team ID

curl -X PUT "https://spider-staging.omniplex.gg/teams/string/members" \
  -H "User-Auth: <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "perms": [
      "string"
    ],
    "user_id": "string"
  }'

Success

{
  "context": {
    "property1": "string",
    "property2": "string"
  },
  "message": "string"
}

PATCH
/teams/{tid}/members/{mid}

Edit Team Member Permissions

Edits a members permissions on a team. Returns a 204 on success

/teams/{tid}/members/{mid}

The Authorization access token

Authorization

User-Auth<token>

Requires a user token. Should be prefixed with User in Authorization header.

In: header

Team-Auth<token>

Requires a team API session token. Should be prefixed with Team in Authorization header.

In: header

Request Body

application/jsonRequired

data_holderboolean | null

Whether the user is a data holder responsible for all data on the team. That is, should performing mass-scale operations on them affect the team

mentionableboolean | null

Whether the user is mentionable Whether the user is mentionable (for alerts in bot-logs etc.)

permsarray<string> | null

The permissions to set. If empty, will not update

Path Parameters

tid
Required
string

Team ID

mid
Required
string

Team Member ID

curl -X PATCH "https://spider-staging.omniplex.gg/teams/string/members/string" \
  -H "User-Auth: <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "data_holder": true,
    "mentionable": true,
    "perms": [
      "string"
    ]
  }'

Success

{
  "context": {
    "property1": "string",
    "property2": "string"
  },
  "message": "string"
}

DELETE
/teams/{tid}/members/{mid}

Delete Team Member

Deletes a member from the team. Users can always delete themselves. Returns a 204 on success

/teams/{tid}/members/{mid}

The Authorization access token

Authorization

User-Auth<token>

Requires a user token. Should be prefixed with User in Authorization header.

In: header

Team-Auth<token>

Requires a team API session token. Should be prefixed with Team in Authorization header.

In: header

Path Parameters

tid
Required
string

Team ID

mid
Required
string

Member ID

curl -X DELETE "https://spider-staging.omniplex.gg/teams/string/members/string" \
  -H "User-Auth: <token>"

Success

{
  "context": {
    "property1": "string",
    "property2": "string"
  },
  "message": "string"
}