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

# Create a reward image upload URL

> Mints a single-use URL for uploading a reward image. The body takes `contentType`, which accepts `image/jpeg`, `image/png` and `image/webp`, and `fileSize` in bytes, which has an upper bound. The response `data` carries `uploadUrl` to PUT the file to and `imageKey` to record on the reward. A content type or a size outside those bounds returns 422.



## OpenAPI

````yaml /openapi/kintra-app.json post /tenant/{tenantId}/rewards/image/presigned
openapi: 3.0.0
info:
  description: >-
    Tenant portal API for the Kintra loyalty platform. Requests are
    authenticated with an Auth0 bearer token and address a tenant by id in the
    path.
  title: Kintra Portal API
  version: 1.0.0
servers:
  - description: Production environment
    url: https://api.kintra.io/api/v1
security: []
paths:
  /tenant/{tenantId}/rewards/image/presigned:
    post:
      tags:
        - Rewards
      summary: Create a reward image upload URL
      description: >-
        Mints a single-use URL for uploading a reward image. The body takes
        `contentType`, which accepts `image/jpeg`, `image/png` and `image/webp`,
        and `fileSize` in bytes, which has an upper bound. The response `data`
        carries `uploadUrl` to PUT the file to and `imageKey` to record on the
        reward. A content type or a size outside those bounds returns 422.
      operationId: CreateRewardImagePresignedUrl
      parameters:
        - in: path
          name: tenantId
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IRewardImagePresignRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse_IRewardImagePresignResponse_'
          description: Ok
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse_IRewardImagePresignResponse_'
          description: ''
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse_null_'
          description: Unauthorized
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse_null_'
          description: Tenant not found
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse_null_'
          description: Invalid image content type or size
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse_null_'
          description: Internal server error
      security:
        - auth0_jwt: []
components:
  schemas:
    IRewardImagePresignRequest:
      additionalProperties: false
      description: Request body for minting a presigned reward-image upload URL.
      properties:
        contentType:
          description: >-
            Pinned into the presigned policy; only these MIME types are
            accepted.
          enum:
            - image/jpeg
            - image/png
            - image/webp
          type: string
        fileSize:
          description: Declared upload size in bytes; must be ≤ 5 * 1024 * 1024.
          format: double
          type: number
      required:
        - contentType
        - fileSize
      type: object
    ApiResponse_IRewardImagePresignResponse_:
      additionalProperties: false
      properties:
        data:
          $ref: '#/components/schemas/IRewardImagePresignResponse'
        errors:
          items:
            properties:
              message:
                type: string
              path:
                type: string
            required:
              - path
              - message
            type: object
          type: array
        message:
          type: string
        success:
          type: boolean
      required:
        - success
      type: object
    ApiResponse_null_:
      additionalProperties: false
      properties:
        data:
          enum:
            - null
          nullable: true
          type: number
        errors:
          items:
            properties:
              message:
                type: string
              path:
                type: string
            required:
              - path
              - message
            type: object
          type: array
        message:
          type: string
        success:
          type: boolean
      required:
        - success
      type: object
    IRewardImagePresignResponse:
      additionalProperties: false
      description: Response for a minted presigned reward-image upload URL.
      properties:
        imageKey:
          description: >-
            Server-generated tenant-scoped object key:
            `tenant/<tenantId>/rewards/<uuidv7>.<ext>`.
          type: string
        uploadUrl:
          description: >-
            Presigned S3 PUT URL (single use; never persisted or logged in
            full).
          type: string
      required:
        - uploadUrl
        - imageKey
      type: object
  securitySchemes:
    auth0_jwt:
      bearerFormat: JWT
      description: Auth0 access token
      scheme: bearer
      type: http

````