> ## 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.

# Updates a workspace



## OpenAPI

````yaml patch /api/v1/workspace/{id}
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}:
    patch:
      summary: Updates a workspace
      operationId: updateWorkspace
      parameters:
        - schema:
            type: string
            description: The workspace id.
          required: true
          name: id
          in: path
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateWorkspaceRequest'
      responses:
        '200':
          description: Workspace
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateWorkspaceResponse'
        '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:
    UpdateWorkspaceRequest:
      type: object
      properties:
        defaultKeyPrefix:
          type: string
          nullable: true
        defaultAllowedIPs:
          type: array
          items:
            type: string
        defaultRateLimitPerSecond:
          type: integer
          nullable: true
          minimum: 0
          exclusiveMinimum: true
        defaultExpiration:
          type: integer
          nullable: true
          minimum: 0
          exclusiveMinimum: true
      required:
        - defaultKeyPrefix
        - defaultAllowedIPs
        - defaultRateLimitPerSecond
        - defaultExpiration
    UpdateWorkspaceResponse:
      type: object
      properties:
        workspace:
          $ref: '#/components/schemas/Workspace'
      required:
        - workspace
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: number
              minimum: 0
              exclusiveMinimum: true
            message:
              type: string
          required:
            - code
            - message
      required:
        - error
    Workspace:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        teamId:
          type: string
        defaultKeyPrefix:
          type: string
          nullable: true
        defaultAllowedIPs:
          type: array
          items:
            type: string
        defaultRateLimitPerSecond:
          type: integer
          nullable: true
          minimum: 0
          exclusiveMinimum: true
        defaultExpiration:
          type: integer
          nullable: true
          minimum: 0
          exclusiveMinimum: true
        createdAt:
          type: string
        updatedAt:
          type: string
      required:
        - id
        - name
        - teamId
        - defaultKeyPrefix
        - defaultAllowedIPs
        - defaultRateLimitPerSecond
        - defaultExpiration
        - createdAt
        - updatedAt
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````