---
title: "Upload the document's bytes through the platform"
method: PUT
path: "/v1/documents/{doc_id}/content"
tags: ["REST v1"]
---

# Upload the document's bytes through the platform

`PUT /v1/documents/{doc_id}/content`

## Request

- Base URL: `https://platform.anpheros.com`
- URL: `https://platform.anpheros.com/v1/documents/{doc_id}/content`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-Api-Key`
  - OAuth 2 (authorization code, authorization URL `https://platform.anpheros.com/oauth/authorize`, token URL `https://platform.anpheros.com/oauth/token`; client credentials, token URL `https://platform.anpheros.com/oauth/token`, scopes: `patient/*.rs`, `patient/Observation.rs`, `patient/Observation.rs?category=laboratory`, `patient/Condition.rs`, `patient/MedicationStatement.rs`, `patient/DocumentReference.rs`, `patient/AllergyIntolerance.rs`, `offline_access`, `openid`, `fhirUser`, `anpheros/patterns`)

## Path parameters

- `doc_id` string, required

## Headers

- `authorization` string, nullable
- `X-Api-Key` string, nullable
- `X-Anpheros-Acting-As` string, nullable
- `X-Anpheros-On-Behalf-Of` string, nullable

## Response `200`

Successful Response

- DocumentOut
  - `id` string, required
  - `patient` string, required
  - `kind` string, required
  - `identifiers` object[]
  - `title` string, nullable, required
  - `description` string, nullable, required
  - `date` string, nullable, required
  - `content_type` string, nullable, required
  - `size` integer, nullable, required
  - `sha256` string, nullable, required
  - `status` string, required
  - `download_url` string, nullable
  - `upload` UploadInfo
    - `url` string, required
    - `method` string, required
    - `headers` object, required
    - `expires_in_seconds` integer, required
  - `updated_at` string, nullable, required
  - `fhir` string, required

## Other responses

- `401`: Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`).
- `403`: The credential's scope or the patient's consent does not allow this.
- `409`: Already final.
- `413`: Over the document size limit.
- `422`: Validation Error
- `429`: Rate limit exceeded; wait `Retry-After` seconds.

---

[API](https://skmtc.dev/anpheros/apis/anpheros-platform.md) · [All operations](https://skmtc.dev/anpheros/apis/anpheros-platform/llms.txt) · [OpenAPI document](https://skmtc.dev/anpheros/apis/anpheros-platform/revisions/ff567b232dc3?raw)
