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

# Create an authenticated preview

> Runs the repository-owned preview auth hook inside the workspace. URL results can be opened directly; local_storage results require explicit client-side application.



## OpenAPI

````yaml api-reference/openapi.v1.json POST /workspaces/{workspaceID}/preview-auth
openapi: 3.1.0
info:
  title: Aether Public API
  version: 0.1.0
  description: >-
    The versioned, public Aether REST API. Authenticate with an `aether_`
    platform API key or a session token.
servers:
  - url: https://api.runaether.dev/v1
security:
  - bearerAuth: []
paths:
  /workspaces/{workspaceID}/preview-auth:
    post:
      tags:
        - workspaces
      summary: Create an authenticated preview
      description: >-
        Runs the repository-owned preview auth hook inside the workspace. URL
        results can be opened directly; local_storage results require explicit
        client-side application.
      operationId: createWorkspacePreviewAuth
      parameters:
        - in: path
          name: workspaceID
          required: true
          schema:
            format: uuid
            type: string
      requestBody:
        content:
          application/json:
            schema:
              additionalProperties: false
              properties:
                port:
                  maximum: 65535
                  minimum: 1
                  type: integer
                sibling_ports:
                  items:
                    maximum: 65535
                    minimum: 1
                    type: integer
                  maxItems: 128
                  type: array
              required:
                - port
              type: object
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                additionalProperties: false
                properties:
                  kind:
                    enum:
                      - url
                      - local_storage
                    type: string
                  local_storage:
                    additionalProperties:
                      type: string
                    type: object
                  reload:
                    type: boolean
                  requires_client_application:
                    type: boolean
                  url:
                    format: uri
                    type: string
                required:
                  - kind
                  - requires_client_application
                type: object
          description: OK
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/ErrorResponse'
                  - $ref: '#/components/schemas/OrgAuthorizationErrorResponse'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkspacePreviewAuthError'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkspacePreviewAuthError'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkspacePreviewAuthError'
          description: Unprocessable Entity
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Internal Server Error
        '502':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Bad Gateway
        '503':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Service Unavailable
components:
  schemas:
    ErrorResponse:
      additionalProperties: false
      properties:
        code:
          type: string
        error:
          minLength: 1
          type: string
      required:
        - error
      type: object
    OrgAuthorizationErrorResponse:
      additionalProperties: false
      properties:
        code:
          enum:
            - org_membership_required
            - org_role_insufficient
            - org_suspended
          type: string
        error:
          minLength: 1
          type: string
      required:
        - error
        - code
      type: object
    WorkspacePreviewAuthError:
      additionalProperties: false
      properties:
        code:
          minLength: 1
          type: string
        error:
          minLength: 1
          type: string
        stderr_tail:
          type: string
      required:
        - error
      type: object
  securitySchemes:
    bearerAuth:
      bearerFormat: JWT
      scheme: bearer
      type: http

````