Discord Role Connections API

Manage application role connection metadata

Operations 4

GET /applications/{application_id}/role-connections/metadata Discord List application role connection metadata #
PUT /applications/{application_id}/role-connections/metadata Discord Update application role connection metadata #
GET /users/@me/applications/{application_id}/role-connection Discord Get user application role connection #
PUT /users/@me/applications/{application_id}/role-connection Discord Update user application role connection #

Work with this as data

Every API 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 apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • 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 API
curl "https://apis.io/api/v1/apis/discord-role-connections-api"
All apis
curl "https://apis.io/api/v1/apis?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.

OpenAPI Specification

discord-role-connections-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Discord Interactions Application Commands Role Connections API
  description: The Discord Interactions API enables applications to create and respond to application commands (slash commands), message components, and modals. It supports both Gateway-based and webhook-based interaction handling, allowing bots to build rich, interactive user experiences within Discord.
  version: '10'
  contact:
    name: Discord Support
    url: https://support-dev.discord.com/hc/en-us
    email: support@discord.com
  termsOfService: https://discord.com/developers/docs/policies-and-agreements/developer-terms-of-service
servers:
- url: https://discord.com/api/v10
  description: Discord API v10
security:
- BotToken: []
tags:
- name: Role Connections
  description: Manage application role connection metadata
paths:
  /applications/{application_id}/role-connections/metadata:
    get:
      operationId: getApplicationRoleConnectionMetadataRecords
      summary: Discord List application role connection metadata
      description: Returns a list of application role connection metadata objects for the given application.
      tags:
      - Role Connections
      parameters:
      - $ref: '#/components/parameters/applicationId'
      responses:
        '200':
          description: List of role connection metadata objects
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ApplicationRoleConnectionMetadata'
        4XX:
          $ref: '#/components/responses/ClientError'
    put:
      operationId: updateApplicationRoleConnectionMetadataRecords
      summary: Discord Update application role connection metadata
      description: Updates and returns a list of application role connection metadata objects for the given application. An application can have up to 5 metadata records.
      tags:
      - Role Connections
      parameters:
      - $ref: '#/components/parameters/applicationId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/ApplicationRoleConnectionMetadata'
              maxItems: 5
      responses:
        '200':
          description: Updated role connection metadata
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ApplicationRoleConnectionMetadata'
        4XX:
          $ref: '#/components/responses/ClientError'
  /users/@me/applications/{application_id}/role-connection:
    get:
      operationId: getUserApplicationRoleConnection
      summary: Discord Get user application role connection
      description: Returns the application role connection for the user. Requires an OAuth2 access token with role_connections.write scope.
      tags:
      - Role Connections
      security:
      - BearerToken: []
      parameters:
      - $ref: '#/components/parameters/applicationId'
      responses:
        '200':
          description: Application role connection object
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApplicationRoleConnection'
        4XX:
          $ref: '#/components/responses/ClientError'
    put:
      operationId: updateUserApplicationRoleConnection
      summary: Discord Update user application role connection
      description: Updates and returns the application role connection for the user. Requires an OAuth2 access token with role_connections.write scope.
      tags:
      - Role Connections
      security:
      - BearerToken: []
      parameters:
      - $ref: '#/components/parameters/applicationId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateApplicationRoleConnectionRequest'
      responses:
        '200':
          description: Updated application role connection
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApplicationRoleConnection'
        4XX:
          $ref: '#/components/responses/ClientError'
components:
  schemas:
    ApplicationRoleConnectionMetadata:
      type: object
      properties:
        type:
          type: integer
          description: 1=INTEGER_LESS_THAN_OR_EQUAL, 2=INTEGER_GREATER_THAN_OR_EQUAL, 3=INTEGER_EQUAL, 4=INTEGER_NOT_EQUAL, 5=DATETIME_LESS_THAN_OR_EQUAL, 6=DATETIME_GREATER_THAN_OR_EQUAL, 7=BOOLEAN_EQUAL, 8=BOOLEAN_NOT_EQUAL
        key:
          type: string
          description: Dictionary key for the metadata field (max 50 chars, a-z, 0-9, _)
          maxLength: 50
          pattern: ^[a-z0-9_]+$
        name:
          type: string
          description: Human-readable name (max 100 chars)
          maxLength: 100
        name_localizations:
          type: object
          additionalProperties:
            type: string
          nullable: true
        description:
          type: string
          description: Human-readable description (max 200 chars)
          maxLength: 200
        description_localizations:
          type: object
          additionalProperties:
            type: string
          nullable: true
      required:
      - type
      - key
      - name
      - description
    ApplicationRoleConnection:
      type: object
      properties:
        platform_name:
          type: string
          nullable: true
          description: Vanity name of the platform (max 50 chars)
          maxLength: 50
        platform_username:
          type: string
          nullable: true
          description: Username on the platform (max 100 chars)
          maxLength: 100
        metadata:
          type: object
          additionalProperties:
            type: string
          description: Object mapping metadata keys to their string-ified values
    UpdateApplicationRoleConnectionRequest:
      type: object
      properties:
        platform_name:
          type: string
          maxLength: 50
        platform_username:
          type: string
          maxLength: 100
        metadata:
          type: object
          additionalProperties:
            type: string
  responses:
    ClientError:
      description: Client error response
      content:
        application/json:
          schema:
            type: object
            properties:
              code:
                type: integer
              message:
                type: string
  parameters:
    applicationId:
      name: application_id
      in: path
      required: true
      schema:
        type: string
      description: The ID of the application
  securitySchemes:
    BotToken:
      type: http
      scheme: bearer
      description: Bot token authentication
externalDocs:
  description: Discord Interactions Documentation
  url: https://discord.com/developers/docs/interactions/overview