> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tai42.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Add a URL to a scope

> Map ``url`` to ``scope_id`` (optionally with a dynamic match ``pattern``).



## OpenAPI

````yaml /openapi.json post /api/auth/scopes
openapi: 3.1.0
info:
  description: The operator HTTP surface served under /api/*.
  title: tai42-skeleton API
  version: 0.1.1
servers: []
security: []
paths:
  /api/auth/scopes:
    post:
      tags:
        - access-control
      summary: Add a URL to a scope
      description: >-
        Map ``url`` to ``scope_id`` (optionally with a dynamic match
        ``pattern``).
      operationId: post_api_auth_scopes
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ScopeUrlAdd'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  data: {}
                required:
                  - data
                type: object
          description: Success.
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Malformed request.
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Missing or invalid api key.
      security:
        - ApiKeyAuth: []
components:
  schemas:
    ScopeUrlAdd:
      description: Add a URL (optionally a match ``pattern``) to a scope.
      properties:
        pattern:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Pattern
        scope_id:
          title: Scope Id
          type: string
        url:
          title: Url
          type: string
      required:
        - scope_id
        - url
      title: ScopeUrlAdd
      type: object
    Error:
      properties:
        error:
          type: string
      required:
        - error
      type: object
  securitySchemes:
    ApiKeyAuth:
      in: header
      name: x-api-key
      type: apiKey

````