> ## Documentation Index
> Fetch the complete documentation index at: https://composio-preview.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Get required scopes for tools (DEPRECATED)

> DEPRECATED: Use POST /api/v3.1/toolkits/{toolkit_slug}/scopes/recommended instead, discovering its `grant_context` options with GET /api/v3.1/toolkits/{toolkit_slug}/scopes/grant_context. Resolves required scopes for the specified tools at a given toolkit version. All requested tools must belong to the same toolkit. Returns the flat scope union plus per-tool structured scope requirements when available.



## OpenAPI

````yaml api-reference/openapi.json POST /api/v3.1/tools/scopes/required
openapi: 3.1.0
info:
  version: 3.1.0
  title: Composio Platform API v3.1
  description: >-
    Composio v3.1 API — all endpoints available under /api/v3.1/. Tool endpoints
    default to the latest tool version.
  contact:
    name: Composio Support
    url: https://composio.dev/support
    email: support@composio.dev
  license:
    name: Proprietary
    url: https://composio.dev/terms
servers:
  - url: https://backend.composio.dev
    description: Composio production API
security:
  - ApiKeyAuth: []
tags:
  - name: Authentication
    description: Authentication related endpoints
    x-group: Authentication
  - name: Auth Configs
    description: Authentication configuration management
    x-group: Auth Configs
  - name: Connected Accounts
    description: Connected account management
    x-group: Connected Accounts
  - name: Logs
    description: Logging and monitoring
    x-group: Logs
  - name: OpenAPI
    description: OpenAPI specification management
    x-group: OpenAPI
  - name: Organization
    description: Organization management
    x-group: Organization
  - name: API Keys
    description: API key management
    x-group: API Keys
  - name: Webhooks
    description: Webhook configuration
    x-group: Webhooks
  - name: Webhook Endpoints
    description: >-
      Per-OAuth-app webhook ingress endpoints. Inbound URLs the provider posts
      to, plus signing secret storage and verification.
    x-group: Webhook Endpoints
  - name: Webhook Subscriptions
    description: >-
      Webhook delivery subscriptions. Outbound URLs Composio posts trigger
      events to, plus signing secret rotation and event-type filters.
    x-group: Webhook Subscriptions
  - name: Team
    description: Team member management
    x-group: Team
  - name: Consumer Skills
    description: Organization-authored Skill management
    x-group: Consumer Skills
  - name: Toolkits
    description: Toolkit and tool management
    x-group: Toolkits
  - name: Tools
    description: Tool execution endpoints
    x-group: Tools
  - name: Triggers
    description: Trigger management and execution
    x-group: Triggers
  - name: Payments
    description: Payment and subscription management
    x-group: Payments
  - name: Billing
    description: Dashboard billing state — usage, subscription, contract (cookie-auth only)
    x-group: Billing
  - name: Compliance
    description: Organization compliance agreements and acceptance state
    x-group: Compliance
  - name: Files
    description: File management
    x-group: Files
  - name: MCP
    description: MCP server management
    x-group: MCP
  - name: MCP Partner
    description: MCP partner management
    x-group: MCP Partner
  - name: Stripe Projects
    description: Stripe Projects provisioning
    x-group: Stripe Projects
  - name: Tool Router
    description: (Labs) Tool router endpoints
    x-group: Sessions (Prev Tool Router)
  - name: Playground
    description: Dashboard playground chat
    x-group: Playground
  - name: Arena
    description: Arena conversations, messages and terms
    x-group: Arena
  - name: Projects
    description: Projects API endpoints.
    x-group: Projects
  - name: Organization Management
    description: Organization Management API endpoints.
    x-group: Organization Management
  - name: Webhook Events
    description: Events delivered by Composio to your registered webhook endpoints
    x-group: Webhook Events
paths:
  /api/v3.1/tools/scopes/required:
    post:
      tags:
        - Tools
      summary: Get required scopes for tools (DEPRECATED)
      description: >-
        DEPRECATED: Use POST
        /api/v3.1/toolkits/{toolkit_slug}/scopes/recommended instead,
        discovering its `grant_context` options with GET
        /api/v3.1/toolkits/{toolkit_slug}/scopes/grant_context. Resolves
        required scopes for the specified tools at a given toolkit version. All
        requested tools must belong to the same toolkit. Returns the flat scope
        union plus per-tool structured scope requirements when available.
      operationId: postToolsScopesRequired
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                tools:
                  type: array
                  items:
                    type: string
                  minItems: 1
                  description: >-
                    Tool slugs to resolve scopes for. All tools must belong to
                    the same toolkit.
                  example:
                    - GMAIL_FETCH_EMAILS
                    - GMAIL_SEND_EMAIL
                version:
                  type: string
                  description: >-
                    Toolkit version to resolve scopes against for the requested
                    toolkit. Defaults to the latest published version ("latest")
                    when omitted.
                  example: latest
              required:
                - tools
      responses:
        '200':
          description: Successfully retrieved scopes for the specified tools
          content:
            application/json:
              schema:
                type: object
                properties:
                  scopes_required:
                    type: array
                    items:
                      type: string
                    description: >-
                      A combined list of all unique scopes required by the
                      specified tools
                    example:
                      - channels:read
                      - chat:write
                      - https://www.googleapis.com/auth/gmail.modify
                      - repo
                      - user:email
                  per_tool_requirements:
                    type: array
                    items:
                      type: object
                      properties:
                        tool:
                          type: string
                        scope_requirements:
                          type:
                            - object
                            - 'null'
                          properties:
                            all_of:
                              type: array
                              items:
                                anyOf:
                                  - type: string
                                  - type: object
                                    properties:
                                      any_of:
                                        type: array
                                        items:
                                          anyOf:
                                            - type: string
                                            - type: object
                                              properties:
                                                all_of:
                                                  type: array
                                                  items:
                                                    type: string
                                                  minItems: 1
                                                source:
                                                  type: array
                                                  items:
                                                    type: string
                                                    minLength: 1
                                                  minItems: 1
                                              required:
                                                - all_of
                                        minItems: 1
                                      when:
                                        type: object
                                        additionalProperties:
                                          type: array
                                          items:
                                            type: string
                                          minItems: 1
                                      source:
                                        type: array
                                        items:
                                          type: string
                                          minLength: 1
                                        minItems: 1
                                    required:
                                      - any_of
                            source:
                              type: array
                              items:
                                type: string
                                minLength: 1
                              minItems: 1
                          required:
                            - all_of
                      required:
                        - tool
                        - scope_requirements
                    description: >-
                      Per-tool structured scope requirements. Null
                      scope_requirements marks unmigrated legacy tools.
                required:
                  - scopes_required
                  - per_tool_requirements
        '400':
          description: >-
            Bad request - Invalid body parameters or tools from different
            toolkits
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized - Authentication credentials are missing or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: >-
            Not found - One or more tools could not be resolved for the
            requested version
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal server error - Something went wrong on the server
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      deprecated: true
      security:
        - ApiKeyAuth: []
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
            code:
              type: number
            slug:
              type: string
            status:
              type: number
            request_id:
              type: string
            suggested_fix:
              type: string
            errors:
              type: array
              items:
                type: string
          required:
            - message
            - code
            - slug
            - status
      required:
        - error
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        Your Composio project API key. Create or copy it from the Composio
        dashboard.
      x-default: your-project-api-key

````