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

# Sign Upload

> Returns presigned POST payload + final CDN URL.



## OpenAPI

````yaml /api-reference/bko/openapi.json post /api/v1/bko/storage/uploads
openapi: 3.0.0
info:
  title: DEVMOB BKO API
  version: '1.0'
servers: []
security: []
tags:
  - name: Auth
    description: Authentication endpoints.
  - name: Benefit Category
    description: Global fare benefit category endpoints.
  - name: Benefit Program
    description: Platform fare benefit program endpoints.
  - name: Invite
    description: Invitation endpoints.
  - name: Member
    description: BKO internal member endpoints.
  - name: Order
    description: Order query endpoints.
  - name: Organization
    description: Organization management endpoints.
  - name: Organization Address
    description: Organization address endpoints.
  - name: Payment
    description: Payment query endpoints.
  - name: Permission
    description: Permission catalog endpoints.
  - name: Place
    description: Place lookup endpoints.
  - name: Point
    description: Global point catalog endpoints.
  - name: Profile
    description: Authenticated BKO profile endpoints.
  - name: Receivable
    description: Receivable query endpoints.
  - name: Report
    description: Platform report endpoints.
  - name: Role
    description: Internal and reusable role endpoints.
  - name: Storage
    description: Storage upload signing endpoints.
  - name: Transfer
    description: Transfer query endpoints.
  - name: User
    description: Platform user administration endpoints.
paths:
  /api/v1/bko/storage/uploads:
    post:
      tags:
        - Storage
      summary: Sign Upload
      description: Returns presigned POST payload + final CDN URL.
      operationId: signUpload
      parameters:
        - name: fields
          required: false
          in: query
          description: >-
            Comma-separated list of fields to include in the response. Supports
            dot notation for nested projection (e.g.
            `id,name,user.email,trips.route.id`). Unknown fields are silently
            dropped.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SignUploadRequest'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SignUpload'
          description: OK
        '400':
          content:
            application/json:
              example:
                errors:
                  - message: required
                    path: name
                message: Bad Request Error
                statusCode: 400
              schema:
                properties:
                  message:
                    type: string
                  statusCode:
                    enum:
                      - 400
                    type: number
                  errors:
                    items:
                      properties:
                        message:
                          type: string
                        path:
                          type: string
                      required:
                        - message
                        - path
                      type: object
                    type: array
                required:
                  - message
                  - statusCode
                type: object
          description: Bad Request Error
        '401':
          content:
            application/json:
              example:
                message: Missing or invalid access token
                statusCode: 401
              schema:
                properties:
                  message:
                    type: string
                  statusCode:
                    enum:
                      - 401
                    type: number
                required:
                  - message
                  - statusCode
                type: object
          description: Unauthorized
        '403':
          content:
            application/json:
              example:
                message: Insufficient permissions
                statusCode: 403
              schema:
                properties:
                  message:
                    type: string
                  statusCode:
                    enum:
                      - 403
                    type: number
                required:
                  - message
                  - statusCode
                type: object
          description: Forbidden
        '500':
          content:
            application/json:
              example:
                message: Internal Server Error
                statusCode: 500
              schema:
                properties:
                  message:
                    type: string
                  statusCode:
                    enum:
                      - 500
                    type: number
                required:
                  - message
                  - statusCode
                type: object
          description: Internal Server Error
      security:
        - bearer: []
components:
  schemas:
    SignUploadRequest:
      type: object
      properties:
        context:
          type: string
          enum:
            - USER_AVATAR
            - ORGANIZATION_LOGO
          description: Upload context
        fileName:
          type: string
          description: Original file name
        contentType:
          type: string
          enum:
            - image/png
            - image/jpeg
            - image/webp
          description: Allowed MIME type
      required:
        - context
        - fileName
        - contentType
      description: Sign upload payload
    SignUpload:
      type: object
      properties:
        key:
          type: string
          description: Object key
          example: >-
            temp/users/0195e7a1-8b5c-7d3e-9f4a-2c6b8d0e1f3a/user-avatar/0195e7b2-4a3c-7d3e-9f4a-2c6b8d0e1f3b.png
        cdnUrl:
          type: string
          format: uri
          description: Public CDN URL
          example: >-
            https://dev.static.devmob.app.br/user/0195e7a1-8b5c-7d3e-9f4a-2c6b8d0e1f3a/avatar/0195e7b2-4a3c-7d3e-9f4a-2c6b8d0e1f3b.png
        upload:
          type: object
          properties:
            url:
              type: string
              format: uri
              description: Form action URL
              example: https://dev.static.devmob.app.br/
            fields:
              type: object
              additionalProperties:
                type: string
              description: Form fields to include in multipart POST
          required:
            - url
            - fields
          description: Presigned POST upload payload
        expiresIn:
          type: integer
          exclusiveMinimum: true
          description: Presign TTL in seconds
          example: 900
          minimum: 0
      required:
        - key
        - cdnUrl
        - upload
        - expiresIn
      description: Sign upload result
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http

````