Skip to main content
The Guilds API provides endpoints to retrieve information about Discord servers (guilds) where the bot is installed, including channels, roles, and user permissions.

Get User Guilds

Retrieve a list of all guilds the authenticated user has access to, along with information about which guilds have the bot installed. Endpoint: GET /users/@me/guilds
Get User Guilds
curl -X GET "https://splashtail-staging.antiraid.xyz/users/@me/guilds?refresh=false" \
  -H "Authorization: YOUR_TOKEN"
refresh
boolean
default:"false"
Whether to refresh the guild cache from Discord. If false, uses cached data if available.
This endpoint currently requires a login or app_login session type (OAuth2). API tokens are not supported for this endpoint.
{
  "guilds": [
    {
      "id": "123456789012345678",
      "name": "My Discord Server",
      "icon": "a_1234567890abcdef",
      "permissions": "2147483647",
      "owner": true
    },
    {
      "id": "987654321098765432",
      "name": "Another Server",
      "icon": null,
      "permissions": "104189504",
      "owner": false
    }
  ],
  "bot_in_guilds": [
    "123456789012345678"
  ]
}
guilds
array
List of all guilds the user has access to
bot_in_guilds
array
Array of guild IDs where the bot is currently installed

Get Guild User Info

Retrieve detailed information about a specific guild, including the user’s permissions, channels, and roles. Endpoint: GET /users/@me/guilds/{guild_id}
Get Guild Info
curl -X GET https://splashtail-staging.antiraid.xyz/users/@me/guilds/123456789012345678 \
  -H "Authorization: YOUR_TOKEN"
guild_id
string
required
The Discord ID of the guild to retrieve information for
{
  "owner_id": "123456789012345678",
  "name": "My Discord Server",
  "icon": "https://cdn.discordapp.com/icons/123456789012345678/a_1234567890abcdef.png",
  "roles": [
    {
      "id": "123456789012345678",
      "name": "@everyone",
      "position": 0,
      "permissions": "104324097"
    },
    {
      "id": "987654321098765432",
      "name": "Admin",
      "position": 10,
      "permissions": "8"
    }
  ],
  "user_roles": [
    "987654321098765432"
  ],
  "bot_roles": [
    "555555555555555555"
  ],
  "channels": [
    {
      "user": "1024",
      "bot": "3072",
      "channel": {
        "id": "111111111111111111",
        "name": "general",
        "position": 0,
        "parent_id": null,
        "type": 0
      }
    },
    {
      "user": "1024",
      "bot": "3072",
      "channel": {
        "id": "222222222222222222",
        "name": "announcements",
        "position": 1,
        "parent_id": null,
        "type": 0
      }
    }
  ]
}
owner_id
string
The Discord user ID of the guild owner
name
string
The guild’s name
icon
string | null
Full URL to the guild’s icon (or null if no icon)
roles
array
All roles in the guild
user_roles
array
Array of role IDs that the authenticated user has in this guild
bot_roles
array
Array of role IDs that the bot has in this guild
channels
array
All channels in the guild with permission information

Permission Calculations

Permissions are returned as bitfield strings. Here are some common Discord permission values:
PermissionValue
View Channel1024
Send Messages2048
Manage Messages8192
Manage Channels16
Administrator8
For a complete list of Discord permissions, see the Discord API documentation.

Error Responses

{
  "message": "Guild to get settings for does not have the bot?",
  "code": "NotFound"
}

Use Cases

The Guilds API is useful for:
  • Building guild selection interfaces
  • Checking if the bot is installed in a guild
  • Displaying available channels for configuration
  • Validating user permissions before allowing actions
  • Creating role-based access controls
Guild data is cached to improve performance. Use the refresh=true parameter on the /users/@me/guilds endpoint to force a refresh from Discord.

Build docs developers (and LLMs) love