---
title: "Reserve study attachment sources"
method: POST
path: "/api/v1/research/study-attachment-sources/reserve"
tags: ["research"]
---

# Reserve study attachment sources

`POST /api/v1/research/study-attachment-sources/reserve`

## Request

- Base URL: `https://point11.ai`
- URL: `https://point11.ai/api/v1/research/study-attachment-sources/reserve`
- Auth: one of:
  - HTTP bearer
  - OAuth 2 (authorization code, authorization URL `https://auth.point11.ai/oauth2/authorize`, token URL `https://auth.point11.ai/oauth2/token`)

Reserve the upload of a file Point11 converts into a study file: a picture a study cannot read as it is (GIF, HEIC or HEIF, AVIF, TIFF, BMP or SVG, or a JPEG, PNG or WebP past what reserve-upload admits), any video (MOV, M4V, MKV, AVI, MPEG, 3GP or WMV, or an MP4 or WebM of any codec), a sound (M4A or AAC, OGG or Opus, FLAC, AIFF, WebM audio or WMA, or MP3 or WAV past 4 MiB) or a document (PowerPoint, Keynote, Word, OpenDocument or RTF, or a PDF past 4 MiB). Declare its filename, media type and size: a picture at most 50 MiB, a video 500 MiB, a sound 200 MiB, a document 100 MiB. Its type is the one its name's extension names, else its declared type. Upload the exact bytes using the returned presigned request, then call research_study_attachment_sources_convert. Reuse the same Idempotency-Key and input after a lost response.

## Headers

- `Point11-Organization` string, uuid
- `Idempotency-Key` string, uuid, required

## Request body

- ResearchStudyAttachmentSourcesReserveRequest
  - `filename` string, required: The file's name as the editor shows it.
  - `mediaType` string, required: The type the file's sender names it by; its name's extension comes first.
  - `byteLength` integer, required: Exact size in bytes: a picture at most 50 MiB, a video 500 MiB, a sound 200 MiB, a document 100 MiB.

## Response `200`

Success.

- ResearchStudyAttachmentSourcesReserveResponse
  - `source` object, required
    - `id` string, uuid, required: Pass it to research.study-attachment-sources.convert.v1.
    - `filename` string, required
    - `mediaType` 'image/png' | 'image/jpeg' | 'image/webp' | 'image/gif' | 'image/heic' | 'image/heif' | 'image/avif' | 'image/tiff' | 'image/bmp' | 'image/svg+xml' | 'video/mp4' | 'video/webm' | 'video/quicktime' | 'video/x-m4v' | 'video/x-matroska' | 'video/x-msvideo' | 'video/mpeg' | 'video/3gpp' | 'video/x-ms-wmv' | 'audio/mpeg' | 'audio/wav' | 'audio/mp4' | 'audio/aac' | 'audio/ogg' | 'audio/flac' | 'audio/aiff' | 'audio/webm' | 'audio/x-ms-wma' | 'application/pdf' | 'application/vnd.openxmlformats-officedocument.presentationml.presentation' | 'application/vnd.ms-powerpoint' | 'application/vnd.apple.keynote' | 'application/vnd.oasis.opendocument.presentation' | 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' | 'application/msword' | 'application/vnd.oasis.opendocument.text' | 'application/rtf', required: The type the original is converted from.
    - `byteLength` integer, required
  - `upload` object, nullable, required: Send the file as the body of exactly this request before expiresAt; the response body is JSON naming the stored file's etag. Null when the file was already uploaded: call research.study-attachment-sources.convert.v1.
    - `method` 'PUT', required
    - `url` string, uri, required
    - `headers` object, required
    - `expiresAt` string, date-time, required

## Other responses

- `400`: The input, query, or Idempotency-Key is invalid.
- `401`: The bearer is missing, expired, or not accepted.
- `402`: Billing refused the write: the code names the reason and `details.reason` carries it.
- `403`: The credential lacks the operation's scope or role, or the operation needs a different door.
- `404`: The resource or organization does not exist for this caller.
- `405`: This path takes another HTTP method, named in `Allow`.
- `409`: The request conflicts with current state or with prior use of its Idempotency-Key.
- `413`: The request, or the answer it asks for, is too large; narrow it.
- `429`: The credential's rate budget is spent; retry after `Retry-After` seconds.
- `500`: An unexpected server failure; retry later. Only `request_id` identifies it.
- `503`: A dependency is temporarily unavailable; retry after `Retry-After` seconds.
- `default`: Another status a product answers for its own refusal (for example `415` for an unsupported attachment); branch on `code`.

---

[API](https://skmtc.dev/point11/apis/point11-api.md) · [All operations](https://skmtc.dev/point11/apis/point11-api/llms.txt) · [OpenAPI document](https://skmtc.dev/point11/apis/point11-api/revisions/36a84c7aca11?raw)
