Discord · Schema

Discord Role

A role in Discord represents a set of permissions and visual attributes that can be assigned to guild members to control access and display hierarchy.

ChatCommunicationsGamingMessagingSocialVideoVoice

Properties

Name Type Description
id string Role ID (Snowflake)
name string Role name
color integer Integer representation of hexadecimal color code
hoist boolean Whether this role is pinned in the user listing
icon stringnull Role icon hash
unicode_emoji stringnull Role unicode emoji
position integer Position of this role (higher = more authority)
permissions string Permission bit set
managed boolean Whether this role is managed by an integration
mentionable boolean Whether this role is mentionable
tags object
flags integer Role flags combined as a bitfield
View JSON Schema on GitHub

JSON Schema

discord-role-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://discord.com/developers/schemas/discord/role.json",
  "title": "Discord Role",
  "description": "A role in Discord represents a set of permissions and visual attributes that can be assigned to guild members to control access and display hierarchy.",
  "type": "object",
  "required": ["id", "name", "color", "hoist", "position", "permissions", "managed", "mentionable"],
  "properties": {
    "id": {
      "type": "string",
      "description": "Role ID (Snowflake)",
      "pattern": "^[0-9]+$"
    },
    "name": {
      "type": "string",
      "description": "Role name",
      "maxLength": 100
    },
    "color": {
      "type": "integer",
      "description": "Integer representation of hexadecimal color code"
    },
    "hoist": {
      "type": "boolean",
      "description": "Whether this role is pinned in the user listing"
    },
    "icon": {
      "type": ["string", "null"],
      "description": "Role icon hash"
    },
    "unicode_emoji": {
      "type": ["string", "null"],
      "description": "Role unicode emoji"
    },
    "position": {
      "type": "integer",
      "description": "Position of this role (higher = more authority)"
    },
    "permissions": {
      "type": "string",
      "description": "Permission bit set"
    },
    "managed": {
      "type": "boolean",
      "description": "Whether this role is managed by an integration"
    },
    "mentionable": {
      "type": "boolean",
      "description": "Whether this role is mentionable"
    },
    "tags": {
      "$ref": "#/$defs/RoleTags"
    },
    "flags": {
      "type": "integer",
      "description": "Role flags combined as a bitfield"
    }
  },
  "$defs": {
    "RoleTags": {
      "type": "object",
      "description": "Tags indicating special properties of the role",
      "properties": {
        "bot_id": {
          "type": "string",
          "description": "ID of the bot this role belongs to"
        },
        "integration_id": {
          "type": "string",
          "description": "ID of the integration this role belongs to"
        },
        "premium_subscriber": {
          "type": "null",
          "description": "Whether this is the guild's Booster role (present if true)"
        },
        "subscription_listing_id": {
          "type": "string",
          "description": "ID of this role's subscription SKU and listing"
        },
        "available_for_purchase": {
          "type": "null",
          "description": "Whether this role is available for purchase (present if true)"
        },
        "guild_connections": {
          "type": "null",
          "description": "Whether this role is a guild's linked role (present if true)"
        }
      }
    }
  }
}

Work with this as data

Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for schemas

4 MCP tools reach this
  • find_json_schemasBrowse and filter every JSON Schema in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/discord-role"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.