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

# Create a short-lived session artifact upload request

> Reference path for the global session_upload.presign_url. Implementations may host this endpoint elsewhere. A typical AWS implementation returns an S3 presigned PUT and any headers that were included in its signature.




## OpenAPI

````yaml /openapi/next.yaml post /session-uploads/presign
openapi: 3.1.0
info:
  title: Blue — Service Contract
  version: 0.1.0
  description: >
    The client-side contract the `blue` CLI expects from the provisioned
    service. The reference `control-api` implements it; any BYO service that
    honors these shapes can be swapped in. Gateway-mode inference JWT issuance
    is OPTIONAL — governance-only deployments need only `GET
    /governance-config`. CLI callers use OAuth 2.0 access tokens issued through
    RFC 8628 device authorization; dashboard callers use an HTTP-only Better
    Auth session cookie.
servers:
  - url: https://harness.example.com
    description: Replace with the Control API URL for your deployment.
security:
  - oauthDevice: []
tags:
  - name: System
    description: Service health and authenticated identity.
  - name: Configuration
    description: Personalized governance policy and client reconciliation state.
  - name: Gateway
    description: Per-user managed inference-gateway credential lifecycle.
  - name: Sessions
    description: Raw-session upload, metadata, and download lifecycle.
  - name: Administration
    description: Organization-administrator policy and client operations.
  - name: User management
    description: >-
      Organization user lifecycle, session revocation, and invitation
      operations.
  - name: Identity provisioning
    description: SCIM 2.0 user and group provisioning for an external identity provider.
paths:
  /session-uploads/presign:
    post:
      tags:
        - Sessions
      summary: Create a short-lived session artifact upload request
      description: >
        Reference path for the global session_upload.presign_url.
        Implementations may host this endpoint elsewhere. A typical AWS
        implementation returns an S3 presigned PUT and any headers that were
        included in its signature.
      operationId: presignSessionUpload
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SessionUploadPresignRequest'
      responses:
        '200':
          description: Short-lived provider-specific upload request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PresignedUpload'
        '401':
          description: Missing/invalid session token
components:
  schemas:
    SessionUploadPresignRequest:
      type: object
      required:
        - harness
        - session_id
        - sha256
        - size_bytes
        - content_type
      properties:
        harness:
          type: string
          description: Harness key from the compiled registry
        compatibility_profile:
          type: string
          example: claude-v1
          description: >-
            Compiled harness adapter profile that produced the upload. When
            omitted, the upload is recorded without a profile.
        session_id:
          type: string
          example: codex-session-20260827
        sha256:
          type: string
          pattern: ^[a-f0-9]{64}$
          example: 0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef
        size_bytes:
          type: integer
          example: 48217
        content_type:
          type: string
          example: application/x-ndjson
        cwd:
          type:
            - string
            - 'null'
        artifact_format:
          type: string
          enum:
            - legacy-raw
            - blue-session-bundle-v1
          default: legacy-raw
        resumable:
          type: boolean
          default: false
        title:
          type:
            - string
            - 'null'
          maxLength: 256
        summary:
          type:
            - string
            - 'null'
          maxLength: 1024
        captured_at_unix_ms:
          type: integer
          minimum: 0
        repository_root:
          type:
            - string
            - 'null'
          maxLength: 4096
        repository_remote:
          type:
            - string
            - 'null'
          maxLength: 4096
    PresignedUpload:
      type: object
      required:
        - upload_id
        - status
        - headers
      properties:
        upload_id:
          type: string
          format: uuid
        status:
          type: string
          enum:
            - pending
            - complete
        upload_url:
          type:
            - string
            - 'null'
          format: uri
        method:
          type:
            - string
            - 'null'
          enum:
            - PUT
            - POST
            - null
        headers:
          type: object
          additionalProperties:
            type: string
        complete_url:
          type:
            - string
            - 'null'
          description: Authenticated endpoint called after blob upload
  securitySchemes:
    oauthDevice:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >
        OAuth 2.0 access token obtained through RFC 8628 at
        /api/auth/device/code and /api/auth/oauth2/token. The API enforces
        governance:read, session:write, and client-status:write as appropriate.

````