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

# Create a workspace scope



## OpenAPI

````yaml post /api/v1/workspace/{id}/scope
openapi: 3.0.0
info:
  title: Oneloop API
  version: 1.0.0
  description: API Key Management
servers:
  - url: https://prod.oneloop.ai
    description: Production server
security:
  - bearerAuth: []
paths:
  /api/v1/workspace/{id}/scope:
    post:
      summary: Create a workspace scope
      operationId: createWorkspaceScopes
      parameters:
        - schema:
            type: string
            description: The workspace id.
          required: true
          name: id
          in: path
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateWorkspaceScopeRequest'
      responses:
        '200':
          description: The created scope
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateWorkspaceScopeResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    CreateWorkspaceScopeRequest:
      type: object
      properties:
        name:
          type: string
        representation:
          type: string
        description:
          type: string
      required:
        - name
        - representation
    CreateWorkspaceScopeResponse:
      type: object
      properties:
        scope:
          $ref: '#/components/schemas/WorkspaceScope'
      required:
        - scope
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: number
              minimum: 0
              exclusiveMinimum: true
            message:
              type: string
          required:
            - code
            - message
      required:
        - error
    WorkspaceScope:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        representation:
          type: string
        description:
          type: string
          nullable: true
        createdAt:
          type: string
        updatedAt:
          type: string
      required:
        - id
        - name
        - representation
        - description
        - createdAt
        - updatedAt
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````