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

# Generate a presigned URL for uploading an attachment



## OpenAPI

````yaml https://opscape.com/api/v1/openapi.json post /cards/{cardPublicId}/attachments/upload-url
openapi: 3.0.0
info:
  title: Kan API
  description: OpenAPI compliant REST API
  version: 1.0.0
  contact: {}
servers: []
security: []
tags: []
paths:
  /cards/{cardPublicId}/attachments/upload-url:
    post:
      tags:
        - Attachments
      summary: Generate a presigned URL for uploading an attachment
      operationId: generateAttachmentUploadUrl
      parameters:
        - name: cardPublicId
          required: true
          in: path
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GenerateUploadUrlDto'
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UploadUrlResponseDto_Output'
      security:
        - bearer: []
components:
  schemas:
    GenerateUploadUrlDto:
      type: object
      properties:
        filename:
          type: string
          minLength: 1
          maxLength: 255
        contentType:
          type: string
        size:
          type: number
          exclusiveMinimum: true
          maximum: 52428800
          minimum: 0
      required:
        - filename
        - contentType
        - size
    UploadUrlResponseDto_Output:
      type: object
      properties:
        url:
          type: string
        key:
          type: string
      required:
        - url
        - key
      additionalProperties: false
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.