---
title: "Mint an upload URL"
method: POST
path: "/v1/files/tickets"
tags: ["v1", "App Files"]
---

# Mint an upload URL

`POST /v1/files/tickets`

## Request

- Base URL: `https://memory.papr.ai`
- URL: `https://memory.papr.ai/v1/files/tickets`
- Auth: one of:
  - API key in header `X-API-Key`
  - HTTP bearer

## Request body

- TicketRequest
  - `app_id` string, required: Mini-app UUID the file belongs to
  - `sha256` string, required: SHA-256 of the file content, hex
  - `size_bytes` integer, required: Exact byte length of the file
  - `file_name` string, nullable: Display name
  - `mime` string, nullable: Content type
  - `scope` 'app' | 'user': 'app' shares the file with everyone who can see the app. 'user' keeps it private to the uploader even if the app is public.
  - `namespace_id` string, nullable: Override namespace (must match the caller's access)

## Response `200`

Successful Response

- TicketResponse
  - `object_key` string, required
  - `upload_url` string, nullable
  - `already_exists` boolean
  - `scope` string
  - `max_bytes` integer

## Other responses

- `422`: Validation Error

## Changes

- **2026-10-16** `0e7a5c0d125d`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/papr-ai/apis/papr-memory-api/changes/v1/files/tickets/post.md)

---

[API](https://skmtc.dev/papr-ai/apis/papr-memory-api.md) - [All operations](https://skmtc.dev/papr-ai/apis/papr-memory-api/llms.txt) - [OpenAPI document](https://skmtc.dev/papr-ai/apis/papr-memory-api/revisions/6fc381dc78b3?raw)
