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

# Create Attachment Upload Url

> Mint a presigned PUT for a task attachment uploaded directly to the store.

The client-declared sha256 is bound into the signature as ``ChecksumSHA256``,
so the object store rejects a body that does not hash to it — the upload is
content-verified without the API ever seeing the bytes. The returned ``ref``
is consumed by the task-create endpoint exactly like a server-proxied one.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/files/upload-url
openapi: 3.1.0
info:
  description: >-
    Modular and extensible framework for building AI agents. This API requires
    JWT Bearer token authentication for most endpoints. Include your JWT token
    in the Authorization header. Public endpoints include /, /health, /docs,
    /redoc, and /openapi.json.
  title: AgentArea API
  version: 0.1.0
servers: []
security:
  - bearer: []
paths:
  /v1/files/upload-url:
    post:
      tags:
        - v1
        - protected
        - files
      summary: Create Attachment Upload Url
      description: >-
        Mint a presigned PUT for a task attachment uploaded directly to the
        store.


        The client-declared sha256 is bound into the signature as
        ``ChecksumSHA256``,

        so the object store rejects a body that does not hash to it — the upload
        is

        content-verified without the API ever seeing the bytes. The returned
        ``ref``

        is consumed by the task-create endpoint exactly like a server-proxied
        one.
      operationId: create_attachment_upload_url_v1_files_upload_url_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PresignUploadRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PresignUploadResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      security:
        - HTTPBearer: []
components:
  schemas:
    PresignUploadRequest:
      additionalProperties: false
      properties:
        content_type:
          minLength: 1
          title: Content Type
          type: string
        filename:
          minLength: 1
          title: Filename
          type: string
        sha256:
          title: Sha256
          type: string
        size:
          title: Size
          type: integer
      required:
        - filename
        - content_type
        - sha256
        - size
      title: PresignUploadRequest
      type: object
    PresignUploadResponse:
      properties:
        expires_in:
          title: Expires In
          type: integer
        ref:
          title: Ref
          type: string
        upload_url:
          title: Upload Url
          type: string
      required:
        - ref
        - upload_url
        - expires_in
      title: PresignUploadResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
  securitySchemes:
    bearer:
      bearerFormat: JWT
      description: JWT Bearer token for authentication
      scheme: bearer
      type: http
    HTTPBearer:
      scheme: bearer
      type: http

````